| From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com> |
| Subject: | recapitulation: FOREACH-IN-ARRAY |
| Date: | 2010-12-23 08:10:26 |
| Message-ID: | AANLkTimD39qswcrWaYeFfNKuaN_UbkiQ6PZ-m+ob_5pK@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello
I reread a discus to this topic. It's look like we can to find a
agreement on following syntax:
FOREACH var [,var [..]] [SLICE number] IN expr
LOOP
END LOOP;
In default mode, without keyword SLICE, it will iterate over every
field like "unnest" does. With SLICE keyword, it iterate over nested
arrays. Deep can be chosen. I don't see a reason why the deep should
be a dynamic. There can be a constant.
variable list is used only when item is record or row type.
I am not sure what is better keyword - SLICE or SLICING ?
Regards
Pavel Stehule
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Magnus Hagander | 2010-12-23 09:53:10 | Streaming replication as a separate permissions |
| Previous Message | Jie Li | 2010-12-23 07:33:12 | Why is sorting on two columns so slower than sorting on one column? |