Re: Domains versus arrays versus typmods - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Domains versus arrays versus typmods
Date
Msg-id 25573.1287583418@sss.pgh.pa.us
Whole thread Raw
In response to Re: Domains versus arrays versus typmods  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Domains versus arrays versus typmods
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Oct 19, 2010 at 9:17 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> We've already accepted the cost of doing getBaseTypeAndTypmod() in a
>> whole lot of performance-critical parsing paths, on the off chance that
>> the target datatype might be a domain. �It's not apparent to me that
>> array subscripting is so important as to deserve an exemption from that.
>> Especially when not doing so doesn't work.

> Hmm... so are there no cases where zeroing out the typelem will cost
> us an otherwise-unnecessary syscache lookup?

My point is that anyplace that is relying on the surface typelem,
without drilling down to see what the base type is, is wrong.
So yeah, those lookups are (will be) necessary.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: leaky views, yet again
Next
From: Tom Lane
Date:
Subject: Re: PostgreSQL and HugePage