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

Commitc18ed2f

Browse files
committed
Parser cleanup for expr and subqueries.
1 parenteb348bf commitc18ed2f

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

‎src/backend/parser/gram.y‎

Lines changed: 11 additions & 1 deletion
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 1.100 1998/02/01 19:43:34 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.101 1998/02/03 01:53:14 momjian Exp $
1414
*
1515
* HISTORY
1616
* AUTHORDATEMAJOR EVENT
@@ -3330,6 +3330,16 @@ a_expr: attr opt_indirection
33303330
n->subselect = $5;
33313331
$$ = (Node *)n;
33323332
}
3333+
| a_expr Op '(' SubSelect ')'
3334+
{
3335+
SubLink *n = makeNode(SubLink);
3336+
n->lefthand = lcons($1, NULL);
3337+
n->oper = lcons($2,NIL);
3338+
n->useor = false;
3339+
n->subLinkType = ALL_SUBLINK;
3340+
n->subselect = $4;
3341+
$$ = (Node *)n;
3342+
}
33333343
| a_expr AND a_expr
33343344
{$$ = makeA_Expr(AND, NULL, $1, $3); }
33353345
| a_expr OR a_expr

‎src/backend/parser/parse_expr.c‎

Lines changed: 2 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/parser/parse_expr.c,v 1.14 1998/02/01 22:20:39 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.15 1998/02/03 01:53:16 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -101,7 +101,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
101101
Value*val=&con->val;
102102

103103
if (con->typename!=NULL)
104-
result=parser_typecast(val,con->typename,0);
104+
result=parser_typecast(val,con->typename,-1);
105105
else
106106
result= (Node*)make_const(val);
107107
break;

‎src/include/catalog/pg_type.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: pg_type.h,v 1.28 1998/01/24 22:48:42 momjian Exp $
10+
* $Id: pg_type.h,v 1.29 1998/02/03 01:53:24 momjian Exp $
1111
*
1212
* NOTES
1313
* the genbki.sh script reads this file and generates .bki
@@ -366,6 +366,7 @@ DESCR("limited-range ISO-format date and time");
366366

367367

368368
#defineUSE_ATTTYPMOD(typeid)((typeid) == BPCHAROID || (typeid) == VARCHAROID)
369+
#defineVARLENA_FIXED_SIZE(typeid)((typeid) == BPCHAROID)
369370

370371
/*
371372
* prototypes for functions in pg_type.c

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp