PL/PgSQL STRICT

Marko Tiikkaja <pgmail@joh.to>

From: Marko Tiikkaja <pgmail@joh.to>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2012-12-21T15:14:19Z
Lists: pgsql-hackers

Attachments

Hi,

Courtesy of me, Christmas comes a bit early this year.  I wrote a patch 
which allows you to add STRICT into PERFORM and INSERT/UPDATE/DELETE 
without specifying an INTO clause.  Observe:

=# create table foo(a int);
CREATE TABLE
=# create function foof() returns void as $$ begin update strict foo set 
a=a+1; end $$ language plpgsql;
CREATE FUNCTION
=# select foof();
ERROR:  query returned no rows

I know everyone obviously wants this, so I will be sending another 
version with regression tests and documentation later.  The code is a 
bit ugly at places, but I'm going to work on that too.


Regards,
Marko Tiikkaja