Re: Some array semantics issues

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Some array semantics issues
Date: 2005-11-18 00:49:31
Message-ID: 437D251B.50304@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Joe Conway <mail(at)joeconway(dot)com> writes:
>>... My hope was that eventually anyarray I/O functions
>>could eliminate the need to create an array type for every data type you
>>wanted to use as an array element.
>
> Interesting thought, but then how do you declare the type of an array
> column, or the type of a function argument that's not supposed to range
> over every array type? If we can't use an OID to identify a data type
> completely, we're going to have lots of problems.
>

You only really need two pieces of information to uniquely identify an
array data type -- the OID of the (leaf-node) scalar elements, and the
fact that what you have is an array. Even if it is a nested structure
of arrays, by recursing (max 5 times), you can eventually find the
scalar elements. Last year I played around with this and had it
partially working, but then got too busy to pursue it further.

Joe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Sherry 2005-11-18 00:51:23 Re: Improving count(*)
Previous Message mark 2005-11-18 00:48:13 Re: Improving count(*)