diff options
| author | Tom Lane | 2017-01-25 14:27:09 +0000 |
|---|---|---|
| committer | Tom Lane | 2017-01-25 14:27:09 +0000 |
| commit | d8d32d9a56a3cecfb14e8f47ebd50b780edffe60 (patch) | |
| tree | f06a9fe35cc90008aabb19146fa29d344814a29a /src/backend | |
| parent | 1e7c4bb0049732ece651d993d03bb6772e5d281a (diff) | |
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
Diffstat (limited to 'src/backend')
| -rw-r--r-- | src/backend/catalog/heap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index d7a3513d295..7ce91158325 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -490,8 +490,7 @@ CheckAttributeType(const char *attname, char att_typtype = get_typtype(atttypid); Oid att_typelem; - if (atttypid == UNKNOWNOID || - att_typtype == TYPTYPE_PSEUDO) + if (att_typtype == TYPTYPE_PSEUDO) { /* * Refuse any attempt to create a pseudo-type column, except for a |
