Re: Weird EXECUTE ... USING behaviour

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Weird EXECUTE ... USING behaviour
Дата
Msg-id 2957.1263305624@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Weird EXECUTE ... USING behaviour  (Vincenzo Romano <vincenzo.romano@notorand.it>)
Ответы Re: Weird EXECUTE ... USING behaviour  (Vincenzo Romano <vincenzo.romano@notorand.it>)
Список pgsql-general
Vincenzo Romano <vincenzo.romano@notorand.it> writes:
> In a PL/PgSQL function I have the following:
> ----
>             execute $l2$
>               alter table $l2$||ct||$l2$ add check(
> data>=$1::timestamp and data<$2::timestamp and maga=$3 )
>             $l2$ using rec.d0,rec.d1,rec.maga;
> ----
> which yields to this error messsge:
> ERROR:  there is no parameter $1

You can't use a parameter of the function in a CHECK constraint on a
table.  The CHECK constraint is permanent and can't refer to transient
state like that.

            regards, tom lane

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

Предыдущее
От: Sergey Levchenko
Дата:
Сообщение: Re: need help with query, how to fold select result to array?
Следующее
От: Vincenzo Romano
Дата:
Сообщение: Re: Weird EXECUTE ... USING behaviour