Re: pg_dump doesn't dump binary compatible casts

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_dump doesn't dump binary compatible casts
Дата
Msg-id 17710.1064332325@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_dump doesn't dump binary compatible casts  (Jan Wieck <JanWieck@Yahoo.com>)
Ответы Re: pg_dump doesn't dump binary compatible casts  (Jan Wieck <JanWieck@Yahoo.com>)
Список pgsql-hackers
Jan Wieck <JanWieck@Yahoo.com> writes:
> I classify this problem as a bug. Objections?

The question is not whether it is a bug, the question is what is correct
behavior instead.

> IMHO a binary compatible cast should be dumped if one or both namespaces 
> of the underlying data types is included in the dump.

That would just replace one bug with another (viz, failure to restore
if one of the datatypes wasn't included in the dump).  Also, what of
user-defined casts between two system datatypes?  pg_catalog is never
considered part of the dump AFAIR.

The first idea that came to mind is to dump the cast if both underlying
types are either system types or included in the dump.  But I think that
would end up dumping built-in binary casts, which is no good either.
I hate to think of looking at the cast's OID vs. lastsysoid to decide
if it was a built-in cast, but maybe there's no other way.

Ideas anyone?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jan Wieck
Дата:
Сообщение: pg_dump doesn't dump binary compatible casts
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Can't Build 7.3.4 on OS X