could not find array type for data type character varying[]

From: Viktor Rosenfeld <listuser36(at)googlemail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: could not find array type for data type character varying[]
Date: 2009-10-28 15:17:32
Message-ID: 20091028151732.GD7012@stan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'm trying to aggregate a list of table attributes into an array.

The actual code looks something like this:

SELECT
node_ref AS id,
array_agg(DISTINCT ARRAY[namespace, name, value]) as annotations
...
GROUP BY id;

I guess the minimal example that reproduces the error is:

annis=> select array_agg(array['a'::varchar, 'b', 'c']);
ERROR: could not find array type for data type character varying[]

Why doesn't this work?

Cheers,
Viktor

Responses

Browse pgsql-general by date

  From Date Subject
Next Message JC Praud 2009-10-28 15:21:11 Re: auto truncate/vacuum full
Previous Message Peter Hunsberger 2009-10-28 15:12:19 Re: still on joining array/inline values was and is: design, ref integrity and performance