Re: Domains versus arrays versus typmods

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Richard Huxton <dev(at)archonet(dot)com>
Subject: Re: Domains versus arrays versus typmods
Date: 2010-10-20 14:47:50
Message-ID: AANLkTikAoM8D8TgA9jQ87160=x3q1ECr60B_9Q8yx_qR@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 20, 2010 at 10:03 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Tue, Oct 19, 2010 at 9:17 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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.

OK. In that case, +1 from me.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-10-20 14:49:37 Re: leaky views, yet again
Previous Message Tom Lane 2010-10-20 14:46:53 Re: Extensions, this time with a patch