diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-07-30 19:35:13 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-07-30 19:35:13 +0000 |
commit | 7df49cef7258d06a7db819d7b5025d131cc226a2 (patch) | |
tree | 0e9f993563da2e977802ca70d7a069dc26b7e0b8 /src/backend/commands/typecmds.c | |
parent | 42be2c790f013fdd2df37e80eda35648b8016761 (diff) | |
download | postgresql-7df49cef7258d06a7db819d7b5025d131cc226a2.tar.gz postgresql-7df49cef7258d06a7db819d7b5025d131cc226a2.zip |
Flip the default typispreferred setting from true to false. This affects
only type categories in which the previous coding made *every* type
preferred; so there is no change in effective behavior, because the function
resolution rules only do something different when faced with a choice
between preferred and non-preferred types in the same category. It just
seems safer and less surprising to have CREATE TYPE default to non-preferred
status ...
Diffstat (limited to 'src/backend/commands/typecmds.c')
-rw-r--r-- | src/backend/commands/typecmds.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index 84d8036057c..1b3caab2e1b 100644 --- a/src/backend/commands/typecmds.c +++ b/src/backend/commands/typecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.120 2008/07/30 17:05:04 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.121 2008/07/30 19:35:13 tgl Exp $ * * DESCRIPTION * The "DefineFoo" routines take the parse tree and pick out the @@ -112,7 +112,7 @@ DefineType(List *names, List *parameters) char *defaultValue = NULL; bool byValue = false; char category = TYPCATEGORY_USER; - bool preferred = true; + bool preferred = false; char delimiter = DEFAULT_TYPDELIM; char alignment = 'i'; /* default alignment */ char storage = 'p'; /* default TOAST storage method */ @@ -475,7 +475,7 @@ DefineType(List *names, List *parameters) -1, /* internal size (always varlena) */ TYPTYPE_BASE, /* type-type (base type) */ TYPCATEGORY_ARRAY, /* type-category (array) */ - true, /* all array types are preferred */ + false, /* array types are never preferred */ DEFAULT_TYPDELIM, /* array element delimiter */ F_ARRAY_IN, /* input procedure */ F_ARRAY_OUT, /* output procedure */ @@ -919,7 +919,7 @@ DefineDomain(CreateDomainStmt *stmt) internalLength, /* internal size */ TYPTYPE_DOMAIN, /* type-type (domain type) */ category, /* type-category */ - false, /* domains are never preferred types */ + false, /* domain types are never preferred */ delimiter, /* array element delimiter */ inputProcedure, /* input procedure */ outputProcedure, /* output procedure */ @@ -1032,7 +1032,7 @@ DefineEnum(CreateEnumStmt *stmt) sizeof(Oid), /* internal size */ TYPTYPE_ENUM, /* type-type (enum type) */ TYPCATEGORY_ENUM, /* type-category (enum type) */ - true, /* all enum types are preferred */ + false, /* enum types are never preferred */ DEFAULT_TYPDELIM, /* array element delimiter */ F_ENUM_IN, /* input procedure */ F_ENUM_OUT, /* output procedure */ @@ -1070,7 +1070,7 @@ DefineEnum(CreateEnumStmt *stmt) -1, /* internal size (always varlena) */ TYPTYPE_BASE, /* type-type (base type) */ TYPCATEGORY_ARRAY, /* type-category (array) */ - true, /* all array types are preferred */ + false, /* array types are never preferred */ DEFAULT_TYPDELIM, /* array element delimiter */ F_ARRAY_IN, /* input procedure */ F_ARRAY_OUT, /* output procedure */ |