Re: Comparing arrays
| От | Tom Lane |
|---|---|
| Тема | Re: Comparing arrays |
| Дата | |
| Msg-id | 5328.1060439647@sss.pgh.pa.us обсуждение |
| Ответ на | Comparing arrays (Bertrand Petit <pgsql-sql@phoe.frmug.org>) |
| Список | pgsql-sql |
Bertrand Petit <pgsql-sql@phoe.frmug.org> writes:
> That query can't be planed because of the following error: "Unable to
> identify an ordering operator '<' for type 'character varying[]'".
This shortcoming is (at long last) repaired for 7.4. There is no simple
solution in earlier releases, I fear.
> I'm signaled that the array_out procedure is not defined: "ERROR:
> TypeCreate: function array_out(attributes) does not exist". That error
> sounds strange as the CREATE TYPE manual describes uniform array type
> creation as illustrated above and that array_out() seems to exist as
> shown bellow.
CREATE TYPE wants an *exact* match of the argument/result datatypes.
You could fake it out by creating another pg_proc row pointing at the
same internal procedure. However, I think creating a private datatype
is the hard way to go about this. A better short-run solution is just
to create = and < operators for varchar[].
regards, tom lane
В списке pgsql-sql по дате отправления: