Re: Some array semantics issues - Mailing list pgsql-hackers

From Joe Conway
Subject Re: Some array semantics issues
Date
Msg-id 437D251B.50304@joeconway.com
Whole thread Raw
In response to Re: Some array semantics issues  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Some array semantics issues
List pgsql-hackers
Tom Lane wrote:
> Joe Conway <mail@joeconway.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




pgsql-hackers by date:

Previous
From: "Dann Corbit"
Date:
Subject: Re: Improving count(*)
Next
From: Gavin Sherry
Date:
Subject: Re: Improving count(*)