Re: [GENERAL] Rules

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] Rules
Дата
Msg-id 4936.1006984149@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: [GENERAL] Rules  (Mårten Gustafsson <marten@ditt.as>)
Re: [GENERAL] Rules  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
"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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: reina@nsi.edu (Tony Reina)
Дата:
Сообщение: Questions about SERIAL type
Следующее
От: Bill Studenmund
Дата:
Сообщение: Re: FW: [ppa-dev] Severe bug in debian - phppgadmin opens