2

I'm using the following program https://sourceforge.net/projects/jailer/ to extract a subset of data from my database with correct associations following my foreign key constraints. The program outputs raw SQL insert and update statements than can be loaded into my development database - all very nice and handy. However - I recently started using Hstore in postgres and now I'm encountering some strange syntax in the SQL files. If I have a table witch has a column of type store then update and insert statements are outputted like so:

Update public.some_table set brand='Ford', model_name='Focus', additional_attrs={engine_size=1.6, weight=1100}, created_at=timestamp '2013-11-05 17:21:38.667085', updated_at=timestamp '2013-11-05 17:21:38.667085' Where id=246747;

Witch gives me the following error, when I try to execute it:

ERROR: syntax error at or near "{"
LINE 1: ...rand='Ford', model_name='Focus', additional_attrs={engine_si...
 ^
********** Error **********
ERROR: syntax error at or near "{"
SQL state: 42601
Character: 81

As far as I know from postgresql hstore {key=value} is not a valid syntax so my questions are:

  • Is it in fact valid syntax?
  • Why would the program output syntax like this, is it likely a bug in the program or something more related to postgres e.g. the postgres jdbc driver?
  • Any suggestions on how I might overcome this problem?
asked Nov 29, 2013 at 12:23
1
  • 1
    That syntax is plainly invalid. You should submit it as a bug to jailer developers. Commented Nov 30, 2013 at 16:33

1 Answer 1

0
answered Dec 2, 2013 at 8:40

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.