Re: [GENERAL] Chicken/egg problem with range types

2012-07-18 Thread Alban Hertroys
On 18 Jul 2012, at 16:15, Tom Lane wrote: > Alban Hertroys writes: >> On 18 Jul 2012, at 5:08, Tom Lane wrote: >>> I wonder whether we could improve this by postponing the no-shell-types >>> check from creation to function runtime. > >> I don't suppose it'd be possible to treat it as a deferred

Re: [GENERAL] Chicken/egg problem with range types

2012-07-18 Thread Scott Bailey
On 07/17/2012 08:08 PM, Tom Lane wrote: 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

Re: [GENERAL] Chicken/egg problem with range types

2012-07-18 Thread Tom Lane
Alban Hertroys writes: > On 18 Jul 2012, at 5:08, Tom Lane wrote: >> I wonder whether we could improve this by postponing the no-shell-types >> check from creation to function runtime. > I don't suppose it'd be possible to treat it as a deferred constraint? Then > the check would be moved to the

Re: [GENERAL] Chicken/egg problem with range types

2012-07-18 Thread Alban Hertroys
On 18 Jul 2012, at 5:08, Tom Lane wrote: > Scott Bailey 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

Re: [GENERAL] Chicken/egg problem with range types

2012-07-17 Thread Tom Lane
Scott Bailey writes: > I'm trying to create a discrete range type and I'm having trouble with > the canonical function. Yeah, right now you really can't write canonical functions in anything except C, for which we don't enforce the no-shell-types restriction. Before range types, this wasn't a b