Re: Command Triggers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Command Triggers
Дата
Msg-id 20982.1326897974@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Command Triggers  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Ответы Re: Command Triggers  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Список pgsql-hackers
Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> It doesn't, and it shouldn't have to.  If those nodes get to the
>> rewriter then somebody forgot to apply parse analysis.  What's your test
>> case?

> I'm trying to rewrite the command string from the parse tree, and the
> simple example that I use to raise an ERROR is the following:

>   create table foo (id serial, foo integer default 1, primary key(id));

That needs to go through transformCreateStmt().  The comments at the
head of parse_utilcmd.c might be informative.

While I've not looked at your patch, I can't escape the suspicion that
this means you are trying to do the wrong things in the wrong places.
Calling transformCreateStmt() from some random place is not going to
make things better; it is going to break CREATE TABLE, which expects to
do that for itself.
        regards, tom lane


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

Предыдущее
От: Jim Mlodgenski
Дата:
Сообщение: Re: Client Messages
Следующее
От: Jaime Casanova
Дата:
Сообщение: Re: Measuring relation free space