Add separate type category for bit string types, allowing mixed bit/varbit

function calls to work.
This commit is contained in:
Peter Eisentraut 2000-11-17 19:57:48 +00:00
parent 8a35ac24f8
commit 52aa720320
2 changed files with 8 additions and 3 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.49 2000/11/16 22:30:27 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.50 2000/11/17 19:57:47 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -458,7 +458,7 @@ TypeCategory(Oid inType)
*/
case (ZPBITOID):
case (VARBITOID):
result = STRING_TYPE;
result = BITSTRING_TYPE;
break;
case (OIDOID):
@ -543,6 +543,10 @@ PreferredType(CATEGORY category, Oid type)
result = TEXTOID;
break;
case (BITSTRING_TYPE):
result = VARBITOID;
break;
case (NUMERIC_TYPE):
if (type == OIDOID)
result = OIDOID;

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: parse_coerce.h,v 1.24 2000/10/05 19:11:38 tgl Exp $
* $Id: parse_coerce.h,v 1.25 2000/11/17 19:57:48 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -23,6 +23,7 @@ typedef enum CATEGORY
UNKNOWN_TYPE,
BOOLEAN_TYPE,
STRING_TYPE,
BITSTRING_TYPE,
NUMERIC_TYPE,
DATETIME_TYPE,
TIMESPAN_TYPE,