Re: ALTER TYPE 3: add facility to identify further no-work cases

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Noah Misch <noah@leadboat.com>, pgsql-hackers@postgresql.org
Date: 2011-01-27T16:37:26Z
Lists: pgsql-hackers
On Thu, Jan 27, 2011 at 11:35 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> My personal view is that we ought to try to be increasing the number
>> of places where type modifiers behave like they're really part of the
>> type, rather than being an afterthought that we deal with when
>> convenient and otherwise ignore.
>
> And this argument is 100% irrelevant to the problem.  The problem is
> that you want to put an optimization into the wrong phase of processing.
> That is going to hurt us, tomorrow if not today, and it has got *no*
> redeeming social value in terms of beng more flexible about what typmods
> are or how "well integrated" they are.

The only thing we're deciding here is whether or not a cast requires a
function.   That's a function of the type OIDs and the typemods.  I
don't see why it's wrong to do the portion that involves the types in
the same place as the portion that involves the typemods.  Perhaps you
could explain.

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