Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2fd831d

Browse files
committed
Rename ParseFuncOrColumn() to ParseColumnOrFunc().
1 parent dc0ff5c commit 2fd831d

File tree

5 files changed

+22
-19
lines changed

5 files changed

+22
-19
lines changed

src/backend/catalog/index.c

Lines changed: 2 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/catalog/index.c,v 1.150 2001/05/16 22:36:03 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.151 2001/05/18 22:35:50 momjian Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -2175,12 +2175,12 @@ reindex_relation(Oid relid, bool force)
21752175
heap_endscan(scan);
21762176
heap_close(indexRelation, AccessShareLock);
21772177
if (reindexed)
2178+
{
21782179

21792180
/*
21802181
* Ok,we could use the reindexed indexes of the target system
21812182
* relation now.
21822183
*/
2183-
{
21842184
if (deactivate_needed)
21852185
{
21862186
if (!overwrite && relid == RelOid_pg_class)

src/backend/parser/parse_expr.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.93 2001/05/18 21:24:19 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.94 2001/05/18 22:35:50 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -173,7 +173,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
173173
a->lexpr,
174174
precedence);
175175

176-
result = ParseFuncOrColumn(pstate,
176+
result = ParseColumnOrFunc(pstate,
177177
"nullvalue",
178178
makeList1(lexpr),
179179
false, false,
@@ -186,7 +186,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
186186
a->lexpr,
187187
precedence);
188188

189-
result = ParseFuncOrColumn(pstate,
189+
result = ParseColumnOrFunc(pstate,
190190
"nonnullvalue",
191191
makeList1(lexpr),
192192
false, false,
@@ -273,7 +273,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
273273
lfirst(args) = transformExpr(pstate,
274274
(Node *) lfirst(args),
275275
precedence);
276-
result = ParseFuncOrColumn(pstate,
276+
result = ParseColumnOrFunc(pstate,
277277
fn->funcname,
278278
fn->args,
279279
fn->agg_star,

src/backend/parser/parse_func.c

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.103 2001/05/18 21:24:19 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.104 2001/05/18 22:35:50 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -75,7 +75,7 @@ ParseNestedFuncOrColumn(ParseState *pstate, Attr *attr, int precedence)
7575
(Node *) attr->paramNo,
7676
EXPR_RELATION_FIRST);
7777

78-
retval = ParseFuncOrColumn(pstate, strVal(lfirst(attr->attrs)),
78+
retval = ParseColumnOrFunc(pstate, strVal(lfirst(attr->attrs)),
7979
makeList1(param),
8080
false, false,
8181
precedence);
@@ -86,7 +86,7 @@ ParseNestedFuncOrColumn(ParseState *pstate, Attr *attr, int precedence)
8686

8787
ident->name = attr->relname;
8888
ident->isRel = TRUE;
89-
retval = ParseFuncOrColumn(pstate, strVal(lfirst(attr->attrs)),
89+
retval = ParseColumnOrFunc(pstate, strVal(lfirst(attr->attrs)),
9090
makeList1(ident),
9191
false, false,
9292
precedence);
@@ -95,7 +95,7 @@ ParseNestedFuncOrColumn(ParseState *pstate, Attr *attr, int precedence)
9595
/* Do more attributes follow this one? */
9696
foreach(mutator_iter, lnext(attr->attrs))
9797
{
98-
retval = ParseFuncOrColumn(pstate, strVal(lfirst(mutator_iter)),
98+
retval = ParseColumnOrFunc(pstate, strVal(lfirst(mutator_iter)),
9999
makeList1(retval),
100100
false, false,
101101
precedence);
@@ -235,10 +235,13 @@ agg_select_candidate(Oid typeid, CandidateList candidates)
235235

236236

237237
/*
238-
* parse function
238+
* parse function
239+
* This code is confusing code because the database can accept relation.column
240+
* column.function, or relation.column.function.
241+
* Funcname is the first parameter, and fargs are the rest.
239242
*/
240243
Node *
241-
ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
244+
ParseColumnOrFunc(ParseState *pstate, char *funcname, List *fargs,
242245
bool agg_star, bool agg_distinct,
243246
int precedence)
244247
{
@@ -486,7 +489,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
486489
}
487490
else
488491
{
489-
elog(ERROR, "ParseFuncOrColumn: unexpected node type %d",
492+
elog(ERROR, "ParseColumnOrFunc: unexpected node type %d",
490493
nodeTag(rteorjoin));
491494
rte = NULL; /* keep compiler quiet */
492495
}
@@ -1535,7 +1538,7 @@ make_arguments(ParseState *pstate,
15351538
/*
15361539
** setup_field_select
15371540
** Build a FieldSelect node that says which attribute to project to.
1538-
** This routine is called by ParseFuncOrColumn() when we have found
1541+
** This routine is called by ParseColumnOrFunc() when we have found
15391542
** a projection on a function result or parameter.
15401543
*/
15411544
static FieldSelect *

src/backend/utils/adt/format_type.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/format_type.c,v 1.10 2001/03/22 03:59:50 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/format_type.c,v 1.11 2001/05/18 22:35:51 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -174,11 +174,11 @@ format_type_internal(Oid type_oid, int32 typemod)
174174
break;
175175

176176
case TIMETZOID:
177-
buf = pstrdup("time with time zone");
177+
buf = pstrdup("time & time zone");
178178
break;
179179

180180
case TIMESTAMPOID:
181-
buf = pstrdup("timestamp with time zone");
181+
buf = pstrdup("timestamp & time zone");
182182
break;
183183

184184
case VARBITOID:

src/include/parser/parse_func.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: parse_func.h,v 1.29 2001/03/22 04:00:57 momjian Exp $
10+
* $Id: parse_func.h,v 1.30 2001/05/18 22:35:51 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -40,7 +40,7 @@ typedef struct _CandidateList
4040

4141
extern Node *ParseNestedFuncOrColumn(ParseState *pstate, Attr *attr,
4242
int precedence);
43-
extern Node *ParseFuncOrColumn(ParseState *pstate,
43+
extern Node *ParseColumnOrFunc(ParseState *pstate,
4444
char *funcname, List *fargs,
4545
bool agg_star, bool agg_distinct,
4646
int precedence);

0 commit comments

Comments
 (0)