Re: [PATCHES] PLpgSQL: list of scalars as row for assign stmt, fore

2005-12-22 Thread David Fetter
On Wed, Dec 21, 2005 at 09:26:35AM +0800, Christopher Kings-Lynne wrote: x, y := r; That strikes me as a really bad idea. It weakens both syntax and semantic error checking, to accomplish how much? Could use PHP-style thingy: LIST(x, y) := r; Better still, the pg way: [ROW](x, y)

[PATCHES] PLpgSQL: list of scalars as row for assign stmt, fore and fors stms

2005-12-20 Thread Pavel Stehule
Hello This patch enhance possibilities fore, fors, assign statements and remove not needed using row or record variable. create function a(out x integer, out y integer) returns setof record as $$ declare r record; begin for x, y in select form data loop return next; end loop; -- or --

Re: [PATCHES] PLpgSQL: list of scalars as row for assign stmt, fore and fors stms

2005-12-20 Thread Tom Lane
Pavel Stehule [EMAIL PROTECTED] writes: x, y := r; That strikes me as a really bad idea. It weakens both syntax and semantic error checking, to accomplish how much? regards, tom lane ---(end of broadcast)--- TIP 5:

Re: [PATCHES] PLpgSQL: list of scalars as row for assign stmt, fore and fors stms

2005-12-20 Thread Andrew Dunstan
Tom Lane said: Pavel Stehule [EMAIL PROTECTED] writes: x, y := r; That strikes me as a really bad idea. It weakens both syntax and semantic error checking, to accomplish how much? Where does the idea come from anyway? Has it been discussed on -hackers? I don't recall seeing it. Just

Re: [PATCHES] PLpgSQL: list of scalars as row for assign stmt, fore and fors stm

2005-12-20 Thread Pavel Stehule
Pavel Stehule [EMAIL PROTECTED] writes: x, y := r; That strikes me as a really bad idea. It weakens both syntax and semantic error checking, to accomplish how much? It's same as select into or execute into (using same code). And behave is like row variable := row variable. I am not

Re: [PATCHES] PLpgSQL: list of scalars as row for assign stmt, fore and fors stm

2005-12-20 Thread Pavel Stehule
Tom Lane said: Pavel Stehule [EMAIL PROTECTED] writes: x, y := r; That strikes me as a really bad idea. It weakens both syntax and semantic error checking, to accomplish how much? Where does the idea come from anyway? Has it been discussed on -hackers? I don't recall seeing it. Just

Re: [PATCHES] PLpgSQL: list of scalars as row for assign stmt, fore

2005-12-20 Thread Christopher Kings-Lynne
x, y := r; That strikes me as a really bad idea. It weakens both syntax and semantic error checking, to accomplish how much? Could use PHP-style thingy: LIST(x, y) := r; Chris ---(end of broadcast)--- TIP 9: In versions below 8.0, the

Re: [PATCHES] PLpgSQL: list of scalars as row for assign stmt, fore and fors stm

2005-12-20 Thread Pavel Stehule
x, y := r; That strikes me as a really bad idea. It weakens both syntax and semantic error checking, to accomplish how much? Could use PHP-style thingy: LIST(x, y) := r; Chris It's inconsystency :-(. EXECUTE INTO and SELECT INTO use scalar of vectors without anything. Pavel

Re: [PATCHES] PLpgSQL: list of scalars as row for assign stmt, fore

2005-12-20 Thread Christopher Kings-Lynne
Pavel Stehule wrote: x, y := r; That strikes me as a really bad idea. It weakens both syntax and semantic error checking, to accomplish how much? Could use PHP-style thingy: LIST(x, y) := r; Chris It's inconsystency :-(. EXECUTE INTO and SELECT INTO use scalar of vectors

Re: [PATCHES] PLpgSQL: list of scalars as row for assign stmt, fore and fors stm

2005-12-20 Thread Pavel Stehule
Pavel Stehule [EMAIL PROTECTED] writes: x, y := r; That strikes me as a really bad idea. It weakens both syntax and semantic error checking, to accomplish how much? Could use PHP-style thingy: LIST(x, y) := r; Actually, ROW(x, y) would be the right spelling per SQL convention. I am