PL/PgSQL STRICT

From: Marko Tiikkaja <pgmail(at)joh(dot)to>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: PL/PgSQL STRICT
Date: 2012-12-21 15:14:19
Message-ID: 50D47CCB.3010201@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
strict.patch text/plain 5.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-12-21 15:39:59 Re: PL/PgSQL STRICT
Previous Message Kevin Grittner 2012-12-21 14:48:26 Re: Review of Row Level Security