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

Commit8064a49

Browse files
committed
get_relattval() should treat a NULL constant as a non-constant expression,
since it has no way to indicate to its caller that the constant isactually NULL. This prevents coredump in cases like WHERE textfield < null::text;
1 parent3e51872 commit8064a49

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/optimizer/util/clauses.c

Lines changed: 3 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/optimizer/util/clauses.c,v 1.65 2000/04/12 17:15:24 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.66 2000/04/16 01:55:45 tgl Exp $
1212
*
1313
* HISTORY
1414
* AUTHORDATEMAJOR EVENT
@@ -790,7 +790,8 @@ get_relattval(Node *clause,
790790

791791
other= (*flag==0) ?left :right;
792792

793-
if (IsA(other,Const))
793+
if (IsA(other,Const)&&
794+
!((Const*)other)->constisnull)
794795
{
795796
*constval= ((Const*)other)->constvalue;
796797
*flag |=SEL_CONSTANT;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp