Re: [HACKERS] updated patch for foreach stmt

2011-02-15 Thread Tom Lane
Stephen Frost 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 cleanup. I left the

Re: [HACKERS] updated patch for foreach stmt

2011-02-15 Thread Pavel Stehule
2011/2/16 Tom Lane : > Andrew Dunstan 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

Re: [HACKERS] updated patch for foreach stmt

2011-02-15 Thread Tom Lane
Andrew Dunstan 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 to say I fin

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 Lane wrote: Robert Haas writes: On Tue, Feb 8, 2011 at 3:26 PM, Stephen Frost 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 To

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 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: > > http://archives.postgresql.org/pgsql-hackers/2010-12/msg01

Re: [HACKERS] updated patch for foreach stmt

2011-02-15 Thread Robert Haas
On Tue, Feb 15, 2011 at 8:44 PM, Tom Lane wrote: > Robert Haas writes: >> On Tue, Feb 8, 2011 at 3:26 PM, Stephen Frost 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 FOREA

Re: [HACKERS] updated patch for foreach stmt

2011-02-15 Thread Tom Lane
Robert Haas writes: > On Tue, Feb 8, 2011 at 3:26 PM, Stephen Frost 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 rather than just FOREACH thingy IN

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 w

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 Pavel Stehule
2011/2/8 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

Re: [HACKERS] updated patch for foreach stmt

2011-02-08 Thread Pavel Stehule
2011/2/8 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 t

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 >

Re: [HACKERS] updated patch for foreach stmt

2011-02-08 Thread Robert Haas
On Tue, Feb 8, 2011 at 3:26 PM, Stephen Frost 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 perhaps a

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