Re: Proposal: make "opaque" obsolete - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Proposal: make "opaque" obsolete
Date
Msg-id 19248.1029868284@sss.pgh.pa.us
Whole thread Raw
In response to Re: Proposal: make "opaque" obsolete  (Rod Taylor <rbt@zort.ca>)
List pgsql-hackers
Rod Taylor <rbt@zort.ca> writes:
>> anyarraytype    -- for array_eq, array_dims

> Will this allow generic array iterator functions in the future?

Hm.  Not directly; there's still the issue of how to tell what element
type the array is.  array_dims doesn't care, and I think that we have
some kluge for array_eq, but in general it'd be a problem for generic
functions.

I had been thinking that as long as we are going to break datafile
compatibility (due to Manfred's tuple-header changes) this would be
a good time to try to clean up the representation of arrays.  It's
bothered me for a long while that the array code is not doing alignment
correctly --- it seems not to matter for any standard type, but arrays
of, say, interval are not aligned the way pg_type says they should be.

The reason I bring this up is that if we are changing the internal
representation of arrays, we could add type OID and perhaps typmod to
the array header, thus making an array value interpretable without any
outside info.  Then you could actually do something interesting with
a function taking anyarraytype.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: CREATE CAST WITHOUT FUNCTION should require superuserness?
Next
From: Tom Lane
Date:
Subject: Re: @(#) Mordred Labs advisory 0x0001: Buffer overflow in