Re: Proposal: PL/PgSQL strict_mode

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: PL/PgSQL strict_mode
Date: 2013-09-14 04:45:05
Message-ID: 5233E9D1.7000203@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message chris travers 2013-09-14 04:53:52 Re: Proposal: PL/PgSQL strict_mode
Previous Message Marko Tiikkaja 2013-09-14 04:28:16 Proposal: PL/PgSQL strict_mode