Re: array variables
От | Pavel Stehule |
---|---|
Тема | Re: array variables |
Дата | |
Msg-id | 162867790811130547h7d19aec3if6d8514244563e40@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: array variables (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: array variables
|
Список | pgsql-sql |
2008/11/13 Tom Lane <tgl@sss.pgh.pa.us>: > "Pavel Stehule" <pavel.stehule@gmail.com> writes: >> 2008/11/13 Tom Lane <tgl@sss.pgh.pa.us>: >>> Sure you can, if you're using a version new enough to have arrays of >>> composite types. > >> I don't expect so user use devel version ;) > > My example was done in 8.3. > >> - and result is array of >> some composite type, not two dimensional array > I tested it with error: postgres=# create table f(a int, b int); CREATE TABLE postgres=# insert into f values(10,20); INSERT 0 1 postgres=# select array(select row(a,b) from f); ERROR: could not find array type for datatype record postgres=# select version(); version ----------------------------------------------------------------------------------------------------PostgreSQL 8.3.0 on i686-pc-linux-gnu,compiled by GCC gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33) (1 row) I forgot on casting, so I was confused. Regards Pavel Stehule > Well, if the columns are of different types then you'll never be able to > represent them as a 2-D array, so I thought this was a more general answer. ok > > regards, tom lane >
В списке pgsql-sql по дате отправления: