| From: | David Johnston <polobo(at)yahoo(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Dynamic insert into ARRAY? plpgsql |
| Date: | 2014-02-08 20:57:45 |
| Message-ID: | 1391893065704-5791094.post@n5.nabble.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
alexandros_e wrote
> You must a) join the 2 tables on the orderID ... where orderID=15 and then
> GROUP BY the result by the order ID and concat the orderlines by a custom
> aggregate function like:
> http://www.postgresql.org/message-id/db7789b.0309131210.625da358@posting.google.com
Maybe back in 2003 when that message was written...
The OP did join the tables but tried to create an array literal instead of
using a now standard array creation function. And you do not need to
specify a specific, single, order if you formulate the group by correctly.
You should avoid blindly repeating information, especially if it is more
than a few years old.
David J.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Dynamic-insert-into-ARRAY-plpgsql-tp5791090p5791094.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Johnston | 2014-02-08 21:11:00 | Re: PL/pgSQL Copy data from one table to another |
| Previous Message | alexandros_e | 2014-02-08 20:42:44 | Re: Dynamic insert into ARRAY? plpgsql |