Skip site navigation (1) Skip section navigation (2)

Re: Avoiding rewrite in ALTER TABLE ALTER TYPE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Noah Misch <noah(at)leadboat(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Avoiding rewrite in ALTER TABLE ALTER TYPE
Date: 2010-12-29 17:14:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Dec 29, 2010, at 7:56 AM, Noah Misch <noah(at)leadboat(dot)com> wrote:
>> The exemptor shall have this signature:
>> exemptor_func(
>> integer, -- source_typmod
>> integer  -- dest_typmod
>> ) RETURNS boolean
>> The exemptor shall return true iff datumIsEqual(x, x::target_type(dest_typmod))
>> for every x in source_type most recently coerced to source_type(source_typmod).

> I am not sure whether it's worth trying to be general here. Maybe we should just hard-code the known cases involving core datatypes.

I find the idea of hard coding to be pretty icky.  However, the elephant
in the room here is the possibility of typmod getting replaced by some
other representation.  It would make life simpler if we didn't invent
this additional type-specific API until that dust has settled.  So maybe
the plan should be hard-coding in the short term and add an API later.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2010-12-29 17:29:23
Subject: Re: and it's not a bunny rabbit, either
Previous:From: Tom LaneDate: 2010-12-29 16:16:23
Subject: Re: Avoiding rewrite in ALTER TABLE ALTER TYPE

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group