Dmitry Koterov dmitry at koterov.ru
Fri Jul 6 05:46:43 PDT 2007
Hello.

I feed the following syntax-correct query to slonik:

CREATE RULE "position_get_last_id_on_insert" AS ON INSERT TO
"public"."position"
DO (SELECT currval('position_position_id_seq'::regclass) AS id;);

And in pg logs I see:

2007-07-06 12:39:08 GMT 87.250.244.99(34424)ERROR:  syntax error at end of
input at character 149
2007-07-06 12:39:08 GMT 87.250.244.99(34424)STATEMENT:
        CREATE RULE "position_get_last_id_on_insert" AS ON INSERT TO
"public"."position"
        DO (SELECT currval('position_position_id_seq'::regclass) AS id;

Seems slonik treats intermediate ";" as a queries delimiter and splits
queries by it.
Possibly slonik should care about correct brackets nesting?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20070706/=
68bfba97/attachment.htm


More information about the Slony1-general mailing list