Re: Proposal: PL/PgSQL strict_mode - Mailing list pgsql-hackers

From Marko Tiikkaja
Subject Re: Proposal: PL/PgSQL strict_mode
Date
Msg-id 5233E9D1.7000203@joh.to
Whole thread Raw
In response to Proposal: PL/PgSQL strict_mode  (Marko Tiikkaja <marko@joh.to>)
List 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 by date:

Previous
From: Marko Tiikkaja
Date:
Subject: Proposal: PL/PgSQL strict_mode
Next
From: chris travers
Date:
Subject: Re: Proposal: PL/PgSQL strict_mode