Search Postgresql Archives

Re: Error 42704 - does mean what?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/15/2012 03:37 PM, Kim Bisgaard wrote:
[Cross post from -SQL]

Hi,

I am trying to model a macro system where I have simple things, and more
complex thing consisting of simple things. To do that I have "invented"
this table definition:

Didn't I recently see something like this on Stack Overflow? I can't seem to find the question in searches but I remember that description.

ERROR: could not find array type for data type text[]
SQL state: 42704

According to:

http://www.postgresql.org/docs/current/static/errcodes-appendix.html

42704 is "undefined_object".


What it really means is that a multi-dimensional array is not just an array of arrays.

regress=# SELECT pg_typeof(ARRAY[['a','b'],['c','d']]);
 pg_typeof
-----------
 text[]
(1 row)

regress=# WITH arr(x) AS (VALUES (ARRAY['a','b']), (ARRAY['c','d'])) SELECT array_agg(x) FROM arr;
ERROR:  could not find array type for data type text[]



--
Craig Ringer


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux