Re: [HACKERS] updated patch for foreach stmt

2011-02-15 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Feb 8, 2011 at 3:26 PM, Stephen Frost sfr...@snowman.net wrote: Alright, so, like I said, I really like this feature and would like to see it included. Amen to that! I think the syntax Tom suggested before was FOREACH thingy IN ARRAY arr

Re: [HACKERS] updated patch for foreach stmt

2011-02-15 Thread Robert Haas
On Tue, Feb 15, 2011 at 8:44 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Feb 8, 2011 at 3:26 PM, Stephen Frost sfr...@snowman.net wrote: Alright, so, like I said, I really like this feature and would like to see it included. Amen to that! I

Re: [HACKERS] updated patch for foreach stmt

2011-02-15 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: On Tue, Feb 15, 2011 at 8:44 PM, Tom Lane t...@sss.pgh.pa.us wrote: Anyway I'm going to start on this patch next, so last chance for opinions about the syntax ... Oh, I was looking at this one:

Re: [HACKERS] updated patch for foreach stmt

2011-02-15 Thread Andrew Dunstan
On 02/15/2011 08:59 PM, Robert Haas wrote: On Tue, Feb 15, 2011 at 8:44 PM, Tom Lanet...@sss.pgh.pa.us wrote: Robert Haasrobertmh...@gmail.com writes: On Tue, Feb 8, 2011 at 3:26 PM, Stephen Frostsfr...@snowman.net wrote: Alright, so, like I said, I really like this feature and would

Re: [HACKERS] updated patch for foreach stmt

2011-02-15 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 02/15/2011 08:59 PM, Robert Haas wrote: Anyhoo, forcing the explicit ARRAY keyword in there seems like pretty cheap future-proofing to me. YMMV. If this is the syntax that makes you do things like: FOREACH foo IN ARRAY ARRAY[1,2,3] I have

Re: [HACKERS] updated patch for foreach stmt

2011-02-15 Thread Pavel Stehule
2011/2/16 Tom Lane t...@sss.pgh.pa.us: Andrew Dunstan and...@dunslane.net writes: On 02/15/2011 08:59 PM, Robert Haas wrote: Anyhoo, forcing the explicit ARRAY keyword in there seems like pretty cheap future-proofing to me.  YMMV. If this is the syntax that makes you do things like:      

Re: [HACKERS] updated patch for foreach stmt

2011-02-15 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: * Pavel Stehule (pavel.steh...@gmail.com) wrote: There is only bad keywords in doc - SCALE instead SLICE and a maybe a usage of slicing need a example. Err, yeah, a couple of stupid documentation issues, sorry about that. Applied with assorted

Re: [HACKERS] updated patch for foreach stmt

2011-02-08 Thread Stephen Frost
Greetings, * Pavel Stehule (pavel.steh...@gmail.com) wrote: I resend a patch with last update of this patch Alright, so, like I said, I really like this feature and would like to see it included. To that end, I've done perhaps a bit more than a review of the patch. Pavel, if you could go over

Re: [HACKERS] updated patch for foreach stmt

2011-02-08 Thread Robert Haas
On Tue, Feb 8, 2011 at 3:26 PM, Stephen Frost sfr...@snowman.net wrote: Greetings, * Pavel Stehule (pavel.steh...@gmail.com) wrote: I resend a patch with last update of this patch Alright, so, like I said, I really like this feature and would like to see it included.  To that end, I've done

Re: [HACKERS] updated patch for foreach stmt

2011-02-08 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: Amen to that! Hopefully it helped. :) I think the syntax Tom suggested before was FOREACH thingy IN ARRAY arr rather than just FOREACH thingy IN arr. That's probably a good idea, because it gives us an escape hatch against needing to invent yet

Re: [HACKERS] updated patch for foreach stmt

2011-02-08 Thread Pavel Stehule
2011/2/8 Stephen Frost sfr...@snowman.net: Greetings, * Pavel Stehule (pavel.steh...@gmail.com) wrote: I resend a patch with last update of this patch Alright, so, like I said, I really like this feature and would like to see it included.  To that end, I've done perhaps a bit more than a

Re: [HACKERS] updated patch for foreach stmt

2011-02-08 Thread Pavel Stehule
2011/2/8 Stephen Frost sfr...@snowman.net: * Robert Haas (robertmh...@gmail.com) wrote: Amen to that! Hopefully it helped. :) I think the syntax Tom suggested before was FOREACH thingy IN ARRAY arr rather than just FOREACH thingy IN arr.  That's probably a good idea, because it gives us an

Re: [HACKERS] updated patch for foreach stmt

2011-02-08 Thread Stephen Frost
* Pavel Stehule (pavel.steh...@gmail.com) wrote: There is only bad keywords in doc - SCALE instead SLICE and a maybe a usage of slicing need a example. Err, yeah, a couple of stupid documentation issues, sorry about that. commit 9460c0831f5de71e31823b7e9d8511d2d8124776 Author: Stephen Frost

Re: [HACKERS] updated patch for foreach stmt

2011-02-08 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: I think the syntax Tom suggested before was FOREACH thingy IN ARRAY arr rather than just FOREACH thingy IN arr. That's probably a good idea, because it gives us an escape hatch against needing to invent yet another variant of this syntax - the word