Re: Chicken/egg problem with range types - Mailing list pgsql-general

From Alban Hertroys
Subject Re: Chicken/egg problem with range types
Date
Msg-id 692FA3C9-20BA-4DD3-8601-3B2E2F1F46C5@gmail.com
Whole thread Raw
In response to Re: Chicken/egg problem with range types  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Chicken/egg problem with range types
List pgsql-general
On 18 Jul 2012, at 5:08, Tom Lane wrote:

> Scott Bailey <artacus72@gmail.com> writes:
>> I'm trying to create a discrete range type and I'm having trouble with
>> the canonical function.

> I wonder whether we could improve this by postponing the no-shell-types
> check from creation to function runtime.  It would be annoying to have
> to make an additional catalog lookup at runtime just for typisdefined,
> but I think that probably we could fold it in with an existing fetch of
> the pg_type row during parsing of the calling query, so that no run-time
> overhead is added.


I don't suppose it'd be possible to treat it as a deferred constraint? Then the check would be moved to the end of the
transaction.

Alban Hertroys

--
Screwing up is an excellent way to attach something to the ceiling.


pgsql-general by date:

Previous
From: KOTa
Date:
Subject: Re: installation problem with postgres password
Next
From: Thomas Munro
Date:
Subject: Re: index update