Re: [GENERAL] arrays of rows and dblink

2014-04-30 Thread David G Johnston
Torsten Förtsch wrote Hi, we have the ROW type and we have arrays. We also can create arrays of rows like: select array_agg(r) from (values (1::int, 'today'::timestamp, 'a'::text), (2, 'yesterday', 'b')) r(a,b,c); array_agg

Re: [GENERAL] arrays of rows and dblink

2014-04-30 Thread Torsten Förtsch
On 30/04/14 20:19, David G Johnston wrote: ISTM that you have to CREATE TYPE ... as appropriate then ... tb ( col_alias type_created_above[] ) There is only so much you can do with anonymous types (which is what the ROW construct creates; ROW is not a type but an expression anchor - like

Re: [GENERAL] arrays of rows and dblink

2014-04-30 Thread David G Johnston
Torsten Förtsch wrote On 30/04/14 20:19, David G Johnston wrote: ISTM that you have to CREATE TYPE ... as appropriate then ... tb ( col_alias type_created_above[] ) There is only so much you can do with anonymous types (which is what the ROW construct creates; ROW is not a type but an

Re: [GENERAL] arrays of rows and dblink

2014-04-30 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/30/2014 12:52 PM, Torsten Förtsch wrote: Hi, we have the ROW type and we have arrays. We also can create arrays of rows like: select array_agg(r) from (values (1::int, 'today'::timestamp, 'a'::text), (2, 'yesterday', 'b')) r(a,b,c);