| От | Tom Lane |
|---|---|
| Тема | Re: plpgsql raise - parameters can be expressions |
| Дата | |
| Msg-id | 2346.1118843856@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: plpgsql raise - parameters can be expressions (Neil Conway <neilc@samurai.com>) |
| Список | pgsql-patches |
Neil Conway <neilc@samurai.com> writes:
> BTW, is there any value in a separate "EXCEPTION" type? ISTM that an
> exception is just a SQLSTATE, which is in turn just a string. A separate
> exception type does simplify the parsing of RAISE, but I wonder if it
> would be useful to be able to also allow specifying the SQLSTATE code as
> a string literal.
It would save some typing, but I do not think we can make the proposed
syntax work if we do it that way:
>> RAISE level [ exception_name , ] format_string [ , parameters ] ;
>>
>> where "level" is one of the already-defined level keywords?
How will you tell whether the string literal just after "level" is meant
to be a SQLSTATE or a format? Maybe with some ad-hoc tests, but ugh ...
regards, tom lane
В списке pgsql-patches по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера