Re: PL/pgSQL 2 - Mailing list pgsql-hackers

From Marko Tiikkaja
Subject Re: PL/pgSQL 2
Date
Msg-id 5405F58C.3070201@joh.to
Whole thread Raw
In response to Re: PL/pgSQL 2  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: PL/pgSQL 2
List pgsql-hackers
On 9/2/14 6:03 PM, Heikki Linnakangas wrote:
> Marko posted a patch to add assertions to PL/pgSQL last year, see
> http://www.postgresql.org/message-id/5234AF3F.4000409@joh.to. It was a
> long thread, but in the end I think everyone was more or less OK with
> the syntax "ASSERT <condition>;". I also think that syntax is fine, and
> it would be a nice feature, assuming we can avoid reserving the ASSERT
> keyword.

Did you really mean to say "more or less OK"?  I didn't wade through the 
thread, but my recollection is that I was the only one truly OK with it, 
some people expressed concerns but appeared undecided, and the rest of 
the participants were completely against it.

> I think that would actually be a good way to enforce the rule that an
> UPDATE only updates a single row. Just put a "ASSERT ROW_COUNT=1;" after
> the update.

I agree with Joel here; I think a shorter syntax is necessary.


.marko



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PL/pgSQL 2
Next
From: Joel Jacobson
Date:
Subject: Re: PL/pgSQL 2