Re: pg_get_triggerdef in pg_dump - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_get_triggerdef in pg_dump
Date
Msg-id 5766.1055989997@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_get_triggerdef in pg_dump  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Responses Re: pg_get_triggerdef in pg_dump
Re: pg_get_triggerdef in pg_dump
List pgsql-hackers
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
>> There might be other cases of legal direct change of system catalog 
>> entries, e,g. varchar to text, if they all are only names for internally 
>> identical data structures. Can you tell which datatypes may be legally 
>> interchanged?

> Yes, you can check if they're binary compatible from the pg_cast table....

But nearly all of the interesting cases require you to understand the
type's interpretation of typmod, and you can't learn that from a table.
How many cases are there where blindly looking for a binary-compatible
cast in pg_cast will really do you much good?  AFAICS you'd have to set
atttypmod to -1 if you change atttypid without knowing very specifically
what you are changing from and to.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Two weeks to feature freeze
Next
From: Tom Lane
Date:
Subject: Re: src/bin/scripts seems a bit of a misnomer now