Skip to content

Commit 06f6404

Browse files
committed
Back out BYTEA binary compatibility changes.
1 parent aea3283 commit 06f6404

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

src/backend/parser/parse_coerce.c

Lines changed: 1 addition & 5 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.59 2001/06/23 22:23:49 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.60 2001/06/24 02:41:21 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -470,7 +470,6 @@ TypeCategory(Oid inType)
470470

471471
case (CHAROID):
472472
case (NAMEOID):
473-
case (BYTEAOID):
474473
case (BPCHAROID):
475474
case (VARCHAROID):
476475
case (TEXTOID):
@@ -615,7 +614,6 @@ PromoteTypeToNext(Oid inType)
615614
result = VARCHAROID;
616615
break;
617616

618-
case (BYTEAOID):
619617
case (VARCHAROID):
620618
result = TEXTOID;
621619
break;
@@ -710,7 +708,6 @@ PromoteLesserType(Oid inType1, Oid inType2, Oid *newType1, Oid *newType2)
710708
case (CHAROID):
711709
switch (*arg2)
712710
{
713-
case (BYTEAOID):
714711
case (BPCHAROID):
715712
case (VARCHAROID):
716713
case (TEXTOID):
@@ -775,7 +772,6 @@ PromoteLesserType(Oid inType1, Oid inType2, Oid *newType1, Oid *newType2)
775772
case (CHAROID):
776773
switch (*arg2)
777774
{
778-
case (BYTEAOID):
779775
case (BPCHAROID):
780776
case (VARCHAROID):
781777
case (TEXTOID):

src/backend/parser/parse_target.c

Lines changed: 3 additions & 5 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_target.c,v 1.68 2001/06/23 22:23:49 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.69 2001/06/24 02:41:21 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -56,7 +56,7 @@ transformTargetEntry(ParseState *pstate,
5656
expr = transformExpr(pstate, node, EXPR_COLUMN_FIRST);
5757

5858
if (IsA(expr, Ident) && ((Ident *)expr)->isRel)
59-
elog(ERROR,"You can't use relation names alone in the target list, try relation.*.");
59+
elog(ERROR,"You can't use relation names alone in the target list, try relation.*.");
6060

6161
type_id = exprType(expr);
6262
type_mod = exprTypmod(expr);
@@ -311,9 +311,7 @@ CoerceTargetExpr(ParseState *pstate,
311311
* string hacks to get transparent conversions w/o explicit
312312
* conversions
313313
*/
314-
else if (attrtype == BPCHAROID ||
315-
attrtype == VARCHAROID ||
316-
attrtype == BYTEAOID)
314+
else if ((attrtype == BPCHAROID) || (attrtype == VARCHAROID))
317315
{
318316
Oid text_id = TEXTOID;
319317

src/include/parser/parse_coerce.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: parse_coerce.h,v 1.30 2001/06/23 22:23:49 momjian Exp $
10+
* $Id: parse_coerce.h,v 1.31 2001/06/24 02:41:21 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -46,7 +46,6 @@ typedef enum CATEGORY
4646
|| ((t) == BPCHAROID) \
4747
|| ((t) == VARCHAROID) \
4848
|| ((t) == TEXTOID) \
49-
|| ((t) == BYTEAOID) \
5049
|| ((t) == INT4OID) \
5150
|| ((t) == INT8OID) \
5251
|| ((t) == FLOAT8OID) \
@@ -86,16 +85,10 @@ typedef enum CATEGORY
8685
#define IS_BINARY_COMPATIBLE(a,b) \
8786
(((a) == BPCHAROID && (b) == TEXTOID) \
8887
|| ((a) == BPCHAROID && (b) == VARCHAROID) \
89-
|| ((a) == BPCHAROID && (b) == BYTEAOID) \
9088
|| ((a) == VARCHAROID && (b) == TEXTOID) \
9189
|| ((a) == VARCHAROID && (b) == BPCHAROID) \
92-
|| ((a) == VARCHAROID && (b) == BYTEAOID) \
9390
|| ((a) == TEXTOID && (b) == BPCHAROID) \
9491
|| ((a) == TEXTOID && (b) == VARCHAROID) \
95-
|| ((a) == TEXTOID && (b) == BYTEAOID) \
96-
|| ((a) == BYTEAOID && (b) == BPCHAROID) \
97-
|| ((a) == BYTEAOID && (b) == VARCHAROID) \
98-
|| ((a) == BYTEAOID && (b) == TEXTOID) \
9992
|| ((a) == OIDOID && (b) == INT4OID) \
10093
|| ((a) == OIDOID && (b) == REGPROCOID) \
10194
|| ((a) == INT4OID && (b) == OIDOID) \

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy