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

Commit15f8283

Browse files
author
Thomas G. Lockhart
committed
Use the parser macro IS_BINARY_COMPATIBLE() to allow more success
in type checking for DEFAULT contraint clauses.Could do more type coersion later...
1 parent9116205 commit15f8283

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/backend/catalog/heap.c

Lines changed: 4 additions & 2 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.56 1998/08/06 05:12:19 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.57 1998/08/17 16:03:31 thomas Exp $
1111
*
1212
* INTERFACE ROUTINES
1313
*heap_create()- Create an uncataloged heap relation
@@ -47,6 +47,7 @@
4747
#include"parser/parse_expr.h"
4848
#include"parser/parse_node.h"
4949
#include"parser/parse_type.h"
50+
#include"parser/parse_coerce.h"
5051
#include"rewrite/rewriteRemove.h"
5152
#include"storage/bufmgr.h"
5253
#include"storage/lmgr.h"
@@ -1519,7 +1520,8 @@ start:;
15191520
gotostart;
15201521
}
15211522
}
1522-
elseif (exprType(expr)!=atp->atttypid)
1523+
elseif ((exprType(expr)!=atp->atttypid)
1524+
&& !IS_BINARY_COMPATIBLE(exprType(expr),atp->atttypid))
15231525
elog(ERROR,"DEFAULT: type mismatched");
15241526

15251527
adbin=nodeToString(expr);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp