> 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