Re: PL/PgSQL STRICT

Lists: pgsql-hackers
From: "Marko Tiikkaja" <marko(at)joh(dot)to>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Subject: Re: PL/PgSQL STRICT
Date: 2013-02-26 21:28:41
Message-ID: op.ws4tx3qyqnwpxt@blue.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

If I'm counting correctly, we have four votes for this patch and two votes
against it.

Any other opinions?

Regards,
Marko Tiikkaja


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Marko Tiikkaja" <marko(at)joh(dot)to>
Cc: pgsql-hackers(at)postgresql(dot)org, "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Subject: Re: PL/PgSQL STRICT
Date: 2013-02-26 22:03:42
Message-ID: 27477.1361916222@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Marko Tiikkaja" <marko(at)joh(dot)to> writes:
> If I'm counting correctly, we have four votes for this patch and two votes
> against it.

> Any other opinions?

FWIW, I share Peter's poor opinion of this syntax. I can see the
appeal of not having to write an explicit check of the rowcount
afterwards, but that appeal is greatly weakened by the strange syntax.
(IOW, if you were counting me as a + vote, that was only a vote for
the concept --- on reflection I don't much like this implementation.)

regards, tom lane


From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PL/PgSQL STRICT
Date: 2013-02-26 22:34:24
Message-ID: 512D3870.5060007@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


> FWIW, I share Peter's poor opinion of this syntax. I can see the
> appeal of not having to write an explicit check of the rowcount
> afterwards, but that appeal is greatly weakened by the strange syntax.
> (IOW, if you were counting me as a + vote, that was only a vote for
> the concept --- on reflection I don't much like this implementation.)

I agree with other commentators that it would be useful, but that the
word STRICT should be near the word INTO, making it clear that the
STRICTness is tied to the variable assignment.

I do think we can deal with the "more than one" case once PL/pgSQL INTO
actually supports assigning more than one row to a variable, which
currently it doesn't. At that time, we'll just have to remember to
update the code for STRICT as well.

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com