From: | Craig Ringer <ringerc(at)ringerc(dot)id(dot)au> |
---|---|
To: | Kim Bisgaard <kim+pg(at)alleroedderne(dot)adsl(dot)dk> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Error 42704 - does mean what? |
Date: | 2012-10-15 07:52:29 |
Message-ID: | 507BC0BD.8070906@ringerc.id.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | WEB ADMINISTRATOR | 2012-10-15 08:03:30 | UGRADE YOUR WEB ACCOUNT |
Previous Message | Kim Bisgaard | 2012-10-15 07:37:43 | Error 42704 - does mean what? |