Skip site navigation (1) Skip section navigation (2)

Re: PL/pgSQL proposal: using list of scalars in assign stmts, fore and fors stmts

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Fetter <david(at)fetter(dot)org>
Cc: Pavel Stehule <pavel(dot)stehule(at)hotmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PL/pgSQL proposal: using list of scalars in assign stmts, fore and fors stmts
Date: 2005-12-22 23:29:29
Message-ID: 1623.1135294169@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
David Fetter <david(at)fetter(dot)org> writes:
> How about:
> <target2> := {row|record|variable|'[ROW](' comma separated list of scalar vars ')'}
> instead, where the ROW is optional?

If we're going to do this at all (which I'm still agin), I think the ROW
keyword is important to minimize ambiguity.  If you are allowed to start
a statement with just "(x, ..." then there will be way too many
situations where the parser gets confused by slightly bad input,
resulting in way-off-base syntax error reports.  Or worse, no syntax
error, but a function that does something else than you expected.

I know that ROW is optional in the bit of SQL syntax that this proposal
is based on, but that's only because the SQL spec says we have to, not
because it's a good idea.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Hannu KrosingDate: 2005-12-22 23:32:30
Subject: Re: Oracle PL/SQL Anonymous block equivalent in postgres
Previous:From: Hannu KrosingDate: 2005-12-22 23:28:18
Subject: what is the smallest working page size for postgresql

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group