Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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?
share|improve this question
1  
That syntax is plainly invalid. You should submit it as a bug to jailer developers. –  Daniel Vérité Nov 30 '13 at 16:33

1 Answer 1

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.