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

Commit33572dd

Browse files
committed
Fix for constbyval .
1 parent2074b5f commit33572dd

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

‎src/backend/commands/creatinh.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.34 1998/09/0104:27:49 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.35 1998/10/0122:45:29 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -332,8 +332,7 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
332332

333333
for (i=0;i<constr->num_check;i++)
334334
{
335-
Constraint*cdef= (Constraint*)makeNode(Constraint);/* palloc(sizeof(Constrai
336-
* nt)); */
335+
Constraint*cdef= (Constraint*)makeNode(Constraint);
337336

338337
cdef->contype=CONSTR_CHECK;
339338
if (check[i].ccname[0]=='$')

‎src/backend/parser/parse_coerce.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.6 1998/09/0104:30:28 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.7 1998/10/0122:45:30 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -99,8 +99,7 @@ coerce_type(ParseState *pstate, Node *node, Oid inputTypeId, Oid targetTypeId)
9999
{
100100
Const*con= (Const*)node;
101101

102-
val= (Datum)textout((structvarlena*)
103-
con->constvalue);
102+
val= (Datum)textout((structvarlena*)con->constvalue);
104103
infunc=typeidInfunc(targetTypeId);
105104
con=makeNode(Const);
106105
con->consttype=targetTypeId;
@@ -109,10 +108,10 @@ coerce_type(ParseState *pstate, Node *node, Oid inputTypeId, Oid targetTypeId)
109108
/* use "-1" for varchar() type */
110109
con->constvalue= (Datum)fmgr(infunc,
111110
val,
112-
typeidTypElem(targetTypeId),
111+
typeidTypElem(targetTypeId),
113112
-1);
114113
con->constisnull= false;
115-
con->constbyval=true;
114+
con->constbyval=typeByVal(typeidType(targetTypeId));
116115
con->constisset= false;
117116
result= (Node*)con;
118117
}

‎src/backend/parser/parse_node.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.22 1998/09/25 13:36:05 thomas Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.23 1998/10/01 22:45:32 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -79,7 +79,6 @@ make_operand(char *opname,
7979
result=coerce_type(NULL,tree,orig_typeId,true_typeId);
8080
}
8181
}
82-
8382
/* otherwise, this is a NULL value */
8483
else
8584
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp