Re: [HACKERS] Assignment of valid collation for SET operations on queries with UNKNOWN types. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Assignment of valid collation for SET operations on queries with UNKNOWN types.
Date
Msg-id 16223.1485269601@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Assignment of valid collation for SET operations onqueries with UNKNOWN types.  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [HACKERS] Assignment of valid collation for SET operations on queries with UNKNOWN types.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Michael Paquier <michael.paquier@gmail.com> writes:
> As unknown is a pseudo type, I don't think you need
> TYPCATEGORY_UNKNOWN in pg_type.h or even the mention to the unknown
> type in catalogs.sgml as that becomes a pseudo-type.

I wondered whether to remove TYPCATEGORY_UNKNOWN but thought it was an
unnecessary change.  "unknown" is different from the other pseudotypes
in that type resolution treats it very specially, so it doesn't seem
unreasonable for it to continue to have its own typcategory.  Also,
since type resolution sometimes takes into account whether types are
of the same category or not, I'm a bit worried about whether moving
"unknown" into the pseudotype category might have unexpected side effects.

> The table of Pseudo-Types needs to be updated as well with unknown in
> datatype.sgml.

Check.

> For domains, it is still necessary to add an extra check in pg_upgrade
> and fail the upgrade if one of the domains declared uses the type
> unknown. Domains are not listed in pg_class, and are only present in
> pg_type. If you don't do that, the binary restore would just fail.

Meh.  I think this would largely be a useless check --- who would
create such a domain?  Also, it's not like the system will crash and
burn if we don't check for it, it will just fail a bit further into
the pg_upgrade process.  That's not like the matview situation where
it would appear to go through and then you'd have a broken matview.
        regards, tom lane



pgsql-hackers by date:

Previous
From: "Aaron W. Swenson"
Date:
Subject: Re: [HACKERS] PostgreSQL 8.2 installation error on Windows 2016server
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Assignment of valid collation for SET operations on queries with UNKNOWN types.