Re: potential bug in trigger with boolean params

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: potential bug in trigger with boolean params
Дата
Msg-id 201105111121.35909.andres@anarazel.de
обсуждение исходный текст
Ответ на Re: potential bug in trigger with boolean params  (Andreas Joseph Krogh <andreak@officenet.no>)
Ответы Re: potential bug in trigger with boolean params
Список pgsql-hackers
On Wednesday, May 11, 2011 11:01:56 AM Andreas Joseph Krogh wrote:
> På onsdag 11. mai 2011 kl 10:56:19 skrev <tv@fuzzy.cz>:
> > > CREATE TRIGGER trig_x_bool BEFORE INSERT ON x FOR EACH ROW EXECUTE
> > > PROCEDURE
> > > trigger_x(true);
> > The docs clearly state what the valid values are and the literal 'true'
> > is not one of them (TRUE is). See this:
> >
> > http://www.postgresql.org/docs/9.0/interactive/datatype-boolean.html
>
> What are you trying to accomplish? "CREATE OR REPLACE FUNCTION trigger_x()"
> does not declare any formal-parameters, so calling it with arguments
> doesn't make sense. I'm surprised creating the other triggers didn't
> produce an error stating "No function defined with the name trigger_ix and
> the given argument-type".
Read the docs. Parameters for triggers are not passed as normal function
parameters. Thats why you access them via via TG_ARGV in plpgsql.

The grammar accepts only a very limited amount of parameters there:


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

Предыдущее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: potential bug in trigger with boolean params
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: time-delayed standbys