Skip to content

Commit 52aa720

Browse files
committed
Add separate type category for bit string types, allowing mixed bit/varbit
function calls to work.
1 parent 8a35ac2 commit 52aa720

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/backend/parser/parse_coerce.c

Lines changed: 6 additions & 2 deletions
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.49 2000/11/16 22:30:27 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.50 2000/11/17 19:57:47 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -458,7 +458,7 @@ TypeCategory(Oid inType)
458458
*/
459459
case (ZPBITOID):
460460
case (VARBITOID):
461-
result = STRING_TYPE;
461+
result = BITSTRING_TYPE;
462462
break;
463463

464464
case (OIDOID):
@@ -543,6 +543,10 @@ PreferredType(CATEGORY category, Oid type)
543543
result = TEXTOID;
544544
break;
545545

546+
case (BITSTRING_TYPE):
547+
result = VARBITOID;
548+
break;
549+
546550
case (NUMERIC_TYPE):
547551
if (type == OIDOID)
548552
result = OIDOID;

src/include/parser/parse_coerce.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: parse_coerce.h,v 1.24 2000/10/05 19:11:38 tgl Exp $
10+
* $Id: parse_coerce.h,v 1.25 2000/11/17 19:57:48 petere Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -23,6 +23,7 @@ typedef enum CATEGORY
2323
UNKNOWN_TYPE,
2424
BOOLEAN_TYPE,
2525
STRING_TYPE,
26+
BITSTRING_TYPE,
2627
NUMERIC_TYPE,
2728
DATETIME_TYPE,
2829
TIMESPAN_TYPE,

0 commit comments

Comments
 (0)