Re: User's exception plpgsql

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: User's exception plpgsql
Дата
Msg-id 42CC7EB4.5090201@samurai.com
обсуждение исходный текст
Ответ на Re: User's exception plpgsql  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: User's exception plpgsql
Список pgsql-patches
Tom Lane wrote:
>     RAISE NOTICE '12' !! '345', ...
>
> Is !! an infix operator (using both strings as arguments) or a postfix
> operator (in which case '345' is the format)?

Ah, I see. I would be content to allow opt_sqlstate to be either a
string literal, a T_WORD (predefined error condition), or a TEXT
variable. If users need to throw a sqlstate that is derived from a SQL
expression, they can always assign to a TEXT variable and then specify
that variable to RAISE.

>>     RAISE [ opt_sqlstate ] LEVEL 'fmt' [ , expr ... ]

This syntax might be slightly better anyway, as allowing two string
literals without any intervening tokens is a bit ugly. We would still
need to restrict opt_sqlstate as described above, though.

-Neil

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Autovacuum integration
Следующее
От: Gavin Sherry
Дата:
Сообщение: Patch to remove deadcode from dbcommands.c