Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0e1f485

Browse files
committed
Add compatiblity information for bytea.
1 parentfe8098e commit0e1f485

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

‎src/backend/parser/parse_coerce.c

Lines changed: 5 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.37 2000/03/19 00:15:39 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.38 2000/03/20 04:02:45 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -129,7 +129,7 @@ coerce_type(ParseState *pstate, Node *node, Oid inputTypeId,
129129
/* safety check that we got the right thing */
130130
if (exprType(result)!=targetTypeId)
131131
elog(ERROR,"coerce_type: conversion function %s produced %s",
132-
typeTypeName(targetType),
132+
typeTypeName(targetType),
133133
typeidTypeName(exprType(result)));
134134

135135
/*
@@ -320,6 +320,7 @@ TypeCategory(Oid inType)
320320
case (NAMEOID):
321321
case (BPCHAROID):
322322
case (VARCHAROID):
323+
case (BYTEAOID):
323324
case (TEXTOID):
324325
case (LZTEXTOID):
325326
result=STRING_TYPE;
@@ -550,6 +551,7 @@ PromoteLesserType(Oid inType1, Oid inType2, Oid *newType1, Oid *newType2)
550551
{
551552
case (BPCHAROID):
552553
case (VARCHAROID):
554+
case (BYTEAOID):
553555
case (TEXTOID):
554556

555557
case (INT2OID):
@@ -614,6 +616,7 @@ PromoteLesserType(Oid inType1, Oid inType2, Oid *newType1, Oid *newType2)
614616
{
615617
case (BPCHAROID):
616618
case (VARCHAROID):
619+
case (BYTEA):
617620
case (TEXTOID):
618621

619622
case (INT2OID):

‎src/backend/utils/adt/selfuncs.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.57 2000/02/26 23:03:12 tgl Exp $
18+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.58 2000/03/20 04:02:45 momjian Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -536,6 +536,7 @@ convert_to_scalar(Datum value, Oid typid,
536536
}
537537
caseBPCHAROID:
538538
caseVARCHAROID:
539+
caseBYTEA:
539540
caseTEXTOID:
540541
if (VARSIZE(DatumGetPointer(value))>VARHDRSZ)
541542
{
@@ -595,7 +596,7 @@ convert_to_scalar(Datum value, Oid typid,
595596
return true;
596597
caseTINTERVALOID:
597598
{
598-
TimeIntervalinterval= (TimeInterval)DatumGetPointer(value);
599+
TimeIntervalinterval= (TimeInterval)DatumGetPointer(value);
599600

600601
if (interval->status!=0)
601602
{

‎src/include/c.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $Id: c.h,v 1.65 2000/03/19 22:08:51 tgl Exp $
11+
* $Id: c.h,v 1.66 2000/03/20 04:02:46 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -673,8 +673,10 @@ extern intassertTest(int val);
673673
*overhead.
674674
*
675675
*We got the 64 number by testing this against the stock memset() on
676-
*BSD/OS 3.0. Larger values were slower. (I think the crossover point
677-
*could be a good deal higher for most platforms, actually --- tgl)
676+
*BSD/OS 3.0. Larger values were slower. bjm 1997/09/11
677+
*
678+
* I think the crossover point could be a good deal higher for
679+
*most platforms, actually. tgl 2000-03-19
678680
*/
679681
#defineMemSet(start,val,len) \
680682
do \

‎src/include/parser/parse_coerce.h

Lines changed: 8 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.19 2000/03/14 23:06:48 thomas Exp $
10+
* $Id: parse_coerce.h,v 1.20 2000/03/20 04:02:47 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -45,6 +45,7 @@ typedef enum CATEGORY
4545
|| ((t) == BPCHAROID) \
4646
|| ((t) == VARCHAROID) \
4747
|| ((t) == TEXTOID) \
48+
|| ((t) == BYTEAOID) \
4849
|| ((t) == INT4OID) \
4950
|| ((t) == INT8OID) \
5051
|| ((t) == FLOAT8OID) \
@@ -81,10 +82,16 @@ typedef enum CATEGORY
8182
#defineIS_BINARY_COMPATIBLE(a,b) \
8283
(((a) == BPCHAROID && (b) == TEXTOID) \
8384
|| ((a) == BPCHAROID && (b) == VARCHAROID) \
85+
|| ((a) == BPCHAROID && (b) == BYTEAOID) \
8486
|| ((a) == VARCHAROID && (b) == TEXTOID) \
8587
|| ((a) == VARCHAROID && (b) == BPCHAROID) \
88+
|| ((a) == VARCHAROID && (b) == BYTEAOID) \
8689
|| ((a) == TEXTOID && (b) == BPCHAROID) \
8790
|| ((a) == TEXTOID && (b) == VARCHAROID) \
91+
|| ((a) == TEXTOID && (b) == BYTEAOID) \
92+
|| ((a) == BYTEAOID && (b) == BPCHAROID) \
93+
|| ((a) == BYTEAOID && (b) == VARCHAROID) \
94+
|| ((a) == BYTEAOID && (b) == TEXTOID) \
8895
|| ((a) == OIDOID && (b) == INT4OID) \
8996
|| ((a) == OIDOID && (b) == REGPROCOID) \
9097
|| ((a) == INT4OID && (b) == OIDOID) \

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp