Make UNKNOWN into an actual pseudo-type.
Tom Lane <tgl@sss.pgh.pa.us>
Make UNKNOWN into an actual pseudo-type. Previously, type "unknown" was labeled as a base type in pg_type, which perhaps had some sense to it because you were allowed to create tables with unknown-type columns. But now that we don't allow that, it makes more sense to label it a pseudo-type. This has the additional effects of forbidding use of "unknown" as a domain base type, cast source or target type, PL function argument or result type, or plpgsql local variable type; all of which seem like good holes to plug. Discussion: https://postgr.es/m/CAH2L28uwwbL9HUM-WR=hromW1Cvamkn7O-g8fPY2m=_7muJ0oA@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/datatype.sgml | modified | +12 −1 |
| doc/src/sgml/ddl.sgml | modified | +1 −1 |
| doc/src/sgml/plhandler.sgml | modified | +1 −1 |
| doc/src/sgml/protocol.sgml | modified | +1 −1 |
| doc/src/sgml/queries.sgml | modified | +1 −1 |
| doc/src/sgml/ref/create_function.sgml | modified | +3 −3 |
| doc/src/sgml/ref/create_type.sgml | modified | +1 −1 |
| src/backend/catalog/heap.c | modified | +1 −2 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_type.h | modified | +1 −1 |
| src/test/regress/expected/type_sanity.out | modified | +2 −3 |
| src/test/regress/sql/type_sanity.sql | modified | +1 −1 |
Documentation touched
Discussion
- Assignment of valid collation for SET operations on queries with UNKNOWN types. 33 messages · 2016-11-17 → 2017-01-26