Commit 06f6404c authored by Bruce Momjian's avatar Bruce Momjian

Back out BYTEA binary compatibility changes.

parent aea3283c
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.59 2001/06/23 22:23:49 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.60 2001/06/24 02:41:21 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -470,7 +470,6 @@ TypeCategory(Oid inType) ...@@ -470,7 +470,6 @@ TypeCategory(Oid inType)
case (CHAROID): case (CHAROID):
case (NAMEOID): case (NAMEOID):
case (BYTEAOID):
case (BPCHAROID): case (BPCHAROID):
case (VARCHAROID): case (VARCHAROID):
case (TEXTOID): case (TEXTOID):
...@@ -615,7 +614,6 @@ PromoteTypeToNext(Oid inType) ...@@ -615,7 +614,6 @@ PromoteTypeToNext(Oid inType)
result = VARCHAROID; result = VARCHAROID;
break; break;
case (BYTEAOID):
case (VARCHAROID): case (VARCHAROID):
result = TEXTOID; result = TEXTOID;
break; break;
...@@ -710,7 +708,6 @@ PromoteLesserType(Oid inType1, Oid inType2, Oid *newType1, Oid *newType2) ...@@ -710,7 +708,6 @@ PromoteLesserType(Oid inType1, Oid inType2, Oid *newType1, Oid *newType2)
case (CHAROID): case (CHAROID):
switch (*arg2) switch (*arg2)
{ {
case (BYTEAOID):
case (BPCHAROID): case (BPCHAROID):
case (VARCHAROID): case (VARCHAROID):
case (TEXTOID): case (TEXTOID):
...@@ -775,7 +772,6 @@ PromoteLesserType(Oid inType1, Oid inType2, Oid *newType1, Oid *newType2) ...@@ -775,7 +772,6 @@ PromoteLesserType(Oid inType1, Oid inType2, Oid *newType1, Oid *newType2)
case (CHAROID): case (CHAROID):
switch (*arg2) switch (*arg2)
{ {
case (BYTEAOID):
case (BPCHAROID): case (BPCHAROID):
case (VARCHAROID): case (VARCHAROID):
case (TEXTOID): case (TEXTOID):
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.68 2001/06/23 22:23:49 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.69 2001/06/24 02:41:21 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -56,7 +56,7 @@ transformTargetEntry(ParseState *pstate, ...@@ -56,7 +56,7 @@ transformTargetEntry(ParseState *pstate,
expr = transformExpr(pstate, node, EXPR_COLUMN_FIRST); expr = transformExpr(pstate, node, EXPR_COLUMN_FIRST);
if (IsA(expr, Ident) && ((Ident *)expr)->isRel) if (IsA(expr, Ident) && ((Ident *)expr)->isRel)
elog(ERROR,"You can't use relation names alone in the target list, try relation.*."); elog(ERROR,"You can't use relation names alone in the target list, try relation.*.");
type_id = exprType(expr); type_id = exprType(expr);
type_mod = exprTypmod(expr); type_mod = exprTypmod(expr);
...@@ -311,9 +311,7 @@ CoerceTargetExpr(ParseState *pstate, ...@@ -311,9 +311,7 @@ CoerceTargetExpr(ParseState *pstate,
* string hacks to get transparent conversions w/o explicit * string hacks to get transparent conversions w/o explicit
* conversions * conversions
*/ */
else if (attrtype == BPCHAROID || else if ((attrtype == BPCHAROID) || (attrtype == VARCHAROID))
attrtype == VARCHAROID ||
attrtype == BYTEAOID)
{ {
Oid text_id = TEXTOID; Oid text_id = TEXTOID;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: parse_coerce.h,v 1.30 2001/06/23 22:23:49 momjian Exp $ * $Id: parse_coerce.h,v 1.31 2001/06/24 02:41:21 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -46,7 +46,6 @@ typedef enum CATEGORY ...@@ -46,7 +46,6 @@ typedef enum CATEGORY
|| ((t) == BPCHAROID) \ || ((t) == BPCHAROID) \
|| ((t) == VARCHAROID) \ || ((t) == VARCHAROID) \
|| ((t) == TEXTOID) \ || ((t) == TEXTOID) \
|| ((t) == BYTEAOID) \
|| ((t) == INT4OID) \ || ((t) == INT4OID) \
|| ((t) == INT8OID) \ || ((t) == INT8OID) \
|| ((t) == FLOAT8OID) \ || ((t) == FLOAT8OID) \
...@@ -86,16 +85,10 @@ typedef enum CATEGORY ...@@ -86,16 +85,10 @@ typedef enum CATEGORY
#define IS_BINARY_COMPATIBLE(a,b) \ #define IS_BINARY_COMPATIBLE(a,b) \
(((a) == BPCHAROID && (b) == TEXTOID) \ (((a) == BPCHAROID && (b) == TEXTOID) \
|| ((a) == BPCHAROID && (b) == VARCHAROID) \ || ((a) == BPCHAROID && (b) == VARCHAROID) \
|| ((a) == BPCHAROID && (b) == BYTEAOID) \
|| ((a) == VARCHAROID && (b) == TEXTOID) \ || ((a) == VARCHAROID && (b) == TEXTOID) \
|| ((a) == VARCHAROID && (b) == BPCHAROID) \ || ((a) == VARCHAROID && (b) == BPCHAROID) \
|| ((a) == VARCHAROID && (b) == BYTEAOID) \
|| ((a) == TEXTOID && (b) == BPCHAROID) \ || ((a) == TEXTOID && (b) == BPCHAROID) \
|| ((a) == TEXTOID && (b) == VARCHAROID) \ || ((a) == TEXTOID && (b) == VARCHAROID) \
|| ((a) == TEXTOID && (b) == BYTEAOID) \
|| ((a) == BYTEAOID && (b) == BPCHAROID) \
|| ((a) == BYTEAOID && (b) == VARCHAROID) \
|| ((a) == BYTEAOID && (b) == TEXTOID) \
|| ((a) == OIDOID && (b) == INT4OID) \ || ((a) == OIDOID && (b) == INT4OID) \
|| ((a) == OIDOID && (b) == REGPROCOID) \ || ((a) == OIDOID && (b) == REGPROCOID) \
|| ((a) == INT4OID && (b) == OIDOID) \ || ((a) == INT4OID && (b) == OIDOID) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment