Re: Proposal: PL/PgSQL strict_mode

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: Proposal: PL/PgSQL strict_mode
Дата
Msg-id 5233E9D1.7000203@joh.to
обсуждение исходный текст
Ответ на Proposal: PL/PgSQL strict_mode  (Marko Tiikkaja <marko@joh.to>)
Список pgsql-hackers
On 14/09/2013 06:28, I wrote:
>     2) Checking row_count for a statement is ugly and cumbersome, so
> often it just isn't checked.  I often use RETURNING TRUE INTO STRICT _OK
> for DML, but that a) requires an extra variable, and b) isn't possible
> if 0 rows affected is not an error in the application logic.

The b) part here wasn't exactly true; you could use RETURNING TRUE INTO 
OK as INSERT/UPDATE/DELETE with RETURNING .. INTO raises an exception if 
it returns more than one row, but it's even more convoluted than the 
RETURNING TRUE INTO STRICT _OK, and it's repetitive.


Regards,
Marko Tiikkaja



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

Предыдущее
От: Marko Tiikkaja
Дата:
Сообщение: Proposal: PL/PgSQL strict_mode
Следующее
От: chris travers
Дата:
Сообщение: Re: Proposal: PL/PgSQL strict_mode