Re: Changing column types...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
Cc: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Changing column types...
Date: 2002-04-04 15:34:42
Message-ID: 23600.1017934482@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
> 3. Is there any way of checking pg_type to check that two types are binary
> compatible and can be substiuted in this way?

Binary compatibility is not represented in pg_type (which is a shortcoming).
You have to use the IsBinaryCompatible() routine provided by
parse_coerce.h.

> 4. Is there any worth in me submitting a patch that will allow rudimentary
> column type changing, so long as the types are binary compatible???

Hmm. Seems like that case, and the various ones involving adjustment of
char/varchar length by hacking atttypmod, would be useful to support via
ALTER COLUMN even if we don't have a full implementation. Essentially
this would be taking the existing folklore about safe ways to hack
pg_attribute and reducing them to code --- why not do it?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-04-04 15:57:39 Re: Bidirectional hard joins (fwd)
Previous Message Hannu Krosing 2002-04-04 15:31:47 Re: Bidirectional hard joins (fwd)