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