1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-13 16:22:44 +03:00

Add compatiblity information for bytea.

This commit is contained in:
Bruce Momjian
2000-03-20 04:02:47 +00:00
parent fe8098ed0c
commit 0e1f485f5f
4 changed files with 21 additions and 8 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.37 2000/03/19 00:15:39 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.38 2000/03/20 04:02:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -129,7 +129,7 @@ coerce_type(ParseState *pstate, Node *node, Oid inputTypeId,
/* safety check that we got the right thing */
if (exprType(result) != targetTypeId)
elog(ERROR, "coerce_type: conversion function %s produced %s",
typeTypeName(targetType),
typeTypeName(targetType),
typeidTypeName(exprType(result)));
/*
@@ -320,6 +320,7 @@ TypeCategory(Oid inType)
case (NAMEOID):
case (BPCHAROID):
case (VARCHAROID):
case (BYTEAOID):
case (TEXTOID):
case (LZTEXTOID):
result = STRING_TYPE;
@@ -550,6 +551,7 @@ PromoteLesserType(Oid inType1, Oid inType2, Oid *newType1, Oid *newType2)
{
case (BPCHAROID):
case (VARCHAROID):
case (BYTEAOID):
case (TEXTOID):
case (INT2OID):
@@ -614,6 +616,7 @@ PromoteLesserType(Oid inType1, Oid inType2, Oid *newType1, Oid *newType2)
{
case (BPCHAROID):
case (VARCHAROID):
case (BYTEA):
case (TEXTOID):
case (INT2OID):

View File

@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.57 2000/02/26 23:03:12 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.58 2000/03/20 04:02:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -536,6 +536,7 @@ convert_to_scalar(Datum value, Oid typid,
}
case BPCHAROID:
case VARCHAROID:
case BYTEA:
case TEXTOID:
if (VARSIZE(DatumGetPointer(value)) > VARHDRSZ)
{
@@ -595,7 +596,7 @@ convert_to_scalar(Datum value, Oid typid,
return true;
case TINTERVALOID:
{
TimeInterval interval = (TimeInterval) DatumGetPointer(value);
TimeInterval interval = (TimeInterval) DatumGetPointer(value);
if (interval->status != 0)
{