Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
f2af0196
Commit
f2af0196
authored
Dec 03, 1996
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make COUNT,SUM case insensitive.
parent
514d69bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
src/backend/parser/scan.l
src/backend/parser/scan.l
+17
-2
src/man/create_aggregate.l
src/man/create_aggregate.l
+4
-1
No files found.
src/backend/parser/scan.l
View file @
f2af0196
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.
5 1996/11/30 03:38:09
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.
6 1996/12/03 05:06:14
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -164,7 +164,22 @@ other .
if (keyword != NULL) {
return (keyword->value);
} else {
yylval.str = pstrdup((char*)yytext);
if (toupper(((char *)yytext)[0]) == 'A' &&
strcasecmp((char *)yytext,"AVG") == 0)
yylval.str = pstrdup("avg");
else if (toupper(((char *)yytext)[0]) == 'C' &&
strcasecmp((char *)yytext,"COUNT") == 0)
yylval.str = pstrdup("count");
else if (toupper(((char *)yytext)[0]) == 'M' &&
strcasecmp((char *)yytext,"MAX") == 0)
yylval.str = pstrdup("max");
else if (toupper(((char *)yytext)[0]) == 'M' &&
strcasecmp((char *)yytext,"MIN") == 0)
yylval.str = pstrdup("min");
else if (toupper(((char *)yytext)[0]) == 'S' &&
strcasecmp((char *)yytext,"SUM") == 0)
yylval.str = pstrdup("sum");
else yylval.str = pstrdup((char*)yytext);
return (IDENT);
}
}
...
...
src/man/create_aggregate.l
View file @
f2af0196
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/create_aggregate.l,v 1.
1 1996/11/14 10:15:42 scrappy
Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/create_aggregate.l,v 1.
2 1996/12/03 05:06:35 momjian
Exp $
.TH "CREATE AGGREGATE" SQL 11/05/95 Postgres95 Postgres95
.SH NAME
create aggregate \(em define a new aggregate
...
...
@@ -70,6 +70,9 @@ Aggregates also require two initial conditions, one for each
transition function. These are specified and stored in the database
as fields of type
.IR text .
.PP
For compatability, aggregates named "avg", "count", "max", "min",
and "sum" are lowercased on input.
.SH EXAMPLE
This
.IR avg
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment