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

Commitc0d9796

Browse files
committed
Fix typo and attempt default fix.
1 parenta7b06f2 commitc0d9796

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

‎src/backend/catalog/heap.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.81 1999/05/19 16:46:10 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.82 1999/05/21 18:31:04 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -47,6 +47,7 @@
4747
#include"optimizer/tlist.h"
4848
#include"parser/parse_expr.h"
4949
#include"parser/parse_node.h"
50+
#include"parser/parse_target.h"
5051
#include"parser/parse_type.h"
5152
#include"parser/parse_coerce.h"
5253
#include"rewrite/rewriteRemove.h"
@@ -1545,11 +1546,11 @@ StoreAttrDefault(Relation rel, AttrDefault *attrdef)
15451546
if (atp->atttypid==BPCHAROID&&
15461547
(type==TEXTOID||type==BPCHAROID||type==UNKNOWNOID))
15471548
{
1548-
if (can_coerce_type(1,&(type),&(atp->atttypid)))
1549-
expr=coerce_type(NULL, (Node*)expr,type,atp->atttypid);
1550-
else
1551-
elog(ERROR,"DEFAULT clause const type '%s' can not be converted to char().",
1552-
typeidTypeName(type));
1549+
FuncCall*n=makeNode(FuncCall);
1550+
1551+
n->funcname=typeidTypeName(atp->atttypid);
1552+
n->args=lcons((Node*)expr,NIL);
1553+
expr=transformExpr(NULL, (Node*)n,EXPR_COLUMN_FIRST);
15531554
}
15541555
elseif (IS_BINARY_COMPATIBLE(type,atp->atttypid))
15551556
;/* use without change */

‎src/backend/parser/gram.y

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.81 1999/05/2115:47:13 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.82 1999/05/2118:31:06 momjian Exp $
1414
*
1515
* HISTORY
1616
* AUTHORDATEMAJOR EVENT
@@ -5365,8 +5365,8 @@ static Node *makeIndexable(char *opname, Node *lexpr, Node *rexpr)
53655365
for (pos = 1; n->val.val.str[pos]; pos++)
53665366
{
53675367
if (n->val.val.str[pos] == '|' ||
5368-
if (n->val.val.str[pos] == '{' ||
5369-
if (n->val.val.str[pos] == '}')
5368+
n->val.val.str[pos] == '{' ||
5369+
n->val.val.str[pos] == '}')
53705370
{
53715371
found_special = true;
53725372
break;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp