Re: SQL99 ARRAY support proposal

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Hannu Krosing <hannu(at)tm(dot)ee>, "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SQL99 ARRAY support proposal
Date: 2003-03-10 17:20:26
Message-ID: 18272.1047316826@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Joe Conway <mail(at)joeconway(dot)com> writes:
> So if I understand correctly, all instances of anyarray and anyelement
> in a function definition would need to be self-consistent, but the group
> could represent essentially any datatype with its corresponding array
> type. If we need more than one of these self consistent groups, we could
> resort to anyarray1/anyelement1, etc. Does this sound correct?

Right.

> Also, an implementation question: if I have a type oid for an element,
> what is the preferred method for determining the corresponding array?
> I'm thinking that the most efficient method might be to use the
> element-type name with a '_' prepended to get the array-type oid, but
> that seems ugly. Thoughts?

I was thinking about that earlier. Right now there is no other way.
We could consider adding a column to pg_type to link to the array type,
but I'm not sure it's worth the trouble. I think if you look around,
there's probably already a subroutine someplace that does the lookup
using the '_foo' approach.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-03-10 17:23:33 Re: Backends created by ODBC live forever ...
Previous Message Jason M. Felice 2003-03-10 17:04:06 Re: SQL99 ARRAY support proposal

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-03-10 17:34:42 Re: spelling corrections
Previous Message Neil Conway 2003-03-10 16:57:46 spelling corrections