Re: PL/pgSQL 1.2

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: PL/pgSQL 1.2
Дата
Msg-id 540B4737.4080108@joh.to
обсуждение исходный текст
Ответ на Re: PL/pgSQL 1.2  (Oskari Saarenmaa <os@ohmu.fi>)
Список pgsql-hackers
On 2014-09-06 7:34 PM, Oskari Saarenmaa wrote:
> Anyway, I think the discussed feature to make select, update and delete
> throw an error if they returned or modified <> 1 row would be more
> useful as an extension of the basic sql statements instead of a plpgsql
> (2) only feature to make it possible to use it from other languages and
> outside functions.

I can't really say I object to this, but doing it in the PL allows the 
parameters to be printed as well, akin to the 
plpgsql.print_strict_params setting added in 9.4.  Though I wonder if 
that would still be possible if PL/PgSQL peeked inside the parse tree a 
bit to pull out these constraints or something *waves hands*.  Or 
perhaps there's a better way to attach a helpful DETAIL line to the error.


.marko



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

Предыдущее
От: Oskari Saarenmaa
Дата:
Сообщение: Re: PL/pgSQL 1.2
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: plpgsql - Assert statement