diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-04-08 19:29:40 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-04-08 19:29:40 +0000 |
commit | bb7e5dc2c0d7c8f1ecd383994f66e931fc19fc22 (patch) | |
tree | c1c4065a103138e4944e22bd8817939b49ac38d7 | |
parent | b64e76859521526f998ae70229675a67bdac882a (diff) | |
download | postgresql-bb7e5dc2c0d7c8f1ecd383994f66e931fc19fc22.tar.gz postgresql-bb7e5dc2c0d7c8f1ecd383994f66e931fc19fc22.zip |
Tweak TypeCategory to treat new BIT types as of STRING category, rather
than not knowing what they are at all. Perhaps they should have their own
type category? Hard to say. In the meantime, doing it this way allows
SELECT 'unknown' || 'unknown' to continue being resolved as textcat,
instead of spitting out an ambiguous-operator error.
-rw-r--r-- | src/backend/parser/parse_coerce.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c index 70b2d13aa5b..26b6934b3d5 100644 --- a/src/backend/parser/parse_coerce.c +++ b/src/backend/parser/parse_coerce.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.40 2000/03/23 07:36:03 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.41 2000/04/08 19:29:40 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -331,6 +331,19 @@ TypeCategory(Oid inType) result = STRING_TYPE; break; + /* + * Kluge added 4/8/00 by tgl: treat the new BIT types as strings, + * so that 'unknown' || 'unknown' continues to resolve as textcat + * rather than generating an ambiguous-operator error. Probably + * BIT types should have their own type category, or maybe they + * should be numeric? Need a better way of handling unknown types + * first. + */ + case (ZPBITOID): + case (VARBITOID): + result = STRING_TYPE; + break; + case (OIDOID): case (REGPROCOID): case (INT2OID): |