"Albert Bartoszko" <albertb@nt.kegel.com.pl> writes:
> [ src/interfaces/libpq++/examples/testlibpq2.sql fails ]
> What is wrong?
As best I can tell, psql is falling down on the job: it's not treating
square brackets as something to be matched up, as it does with
parentheses. It ships this command to the backend as two separate
queries. Trying it with psql -e shows what's happening:
regression=# CREATE RULE r1 AS ON INSERT TO TBL1 DO [INSERT INTO TBL2 values (new.i); NOTIFY TBL2];
CREATE RULE r1 AS ON INSERT TO TBL1 DO [INSERT INTO TBL2 values (new.i);
ERROR: parser: parse error at or near ""
NOTIFY TBL2];
ERROR: parser: parse error at or near "]"
regression=#
While this clearly ought to be fixed, I think it's a bit late in the
cycle to consider fixing it for 7.2, especially seeing as how no
functionality is lost (multi-rule actions work fine if you put
parentheses rather than square brackets around them).
For 7.3, we should either fix psql or remove the option to use square
brackets in rule action lists. Comments anyone?
regards, tom lane