Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bb7e5dc

Browse files
committed
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.
1 parent b64e768 commit bb7e5dc

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/backend/parser/parse_coerce.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.40 2000/03/23 07:36:03 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.41 2000/04/08 19:29:40 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -331,6 +331,19 @@ TypeCategory(Oid inType)
331331
result = STRING_TYPE;
332332
break;
333333

334+
/*
335+
* Kluge added 4/8/00 by tgl: treat the new BIT types as strings,
336+
* so that 'unknown' || 'unknown' continues to resolve as textcat
337+
* rather than generating an ambiguous-operator error. Probably
338+
* BIT types should have their own type category, or maybe they
339+
* should be numeric? Need a better way of handling unknown types
340+
* first.
341+
*/
342+
case (ZPBITOID):
343+
case (VARBITOID):
344+
result = STRING_TYPE;
345+
break;
346+
334347
case (OIDOID):
335348
case (REGPROCOID):
336349
case (INT2OID):

0 commit comments

Comments
 (0)