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
cf8da4e9
Commit
cf8da4e9
authored
Oct 21, 2002
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged ecpg_big_bison back into HEAD
parent
79382cb9
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
549 additions
and
279 deletions
+549
-279
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+29
-1
src/interfaces/ecpg/lib/execute.c
src/interfaces/ecpg/lib/execute.c
+2
-2
src/interfaces/ecpg/preproc/Makefile
src/interfaces/ecpg/preproc/Makefile
+3
-2
src/interfaces/ecpg/preproc/ecpg_keywords.c
src/interfaces/ecpg/preproc/ecpg_keywords.c
+1
-4
src/interfaces/ecpg/preproc/keywords.c
src/interfaces/ecpg/preproc/keywords.c
+15
-2
src/interfaces/ecpg/preproc/pgc.l
src/interfaces/ecpg/preproc/pgc.l
+6
-18
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+493
-250
No files found.
src/interfaces/ecpg/ChangeLog
View file @
cf8da4e9
...
...
@@ -1271,11 +1271,39 @@ Mon Jun 17 15:23:51 CEST 2002
- Fixed parser bug in pgc.l. Octal numbers in single quotes are now
correctly handled.
Sat Jul 20 10:09:58 CEST 2002
Tue Jun 18 15:13:15 CEST 2002
- Fixed parser bug concerning foreign keys.
- Synced preproc.y with gram.y.
- Synced pgc.l with scan.l.
- Synced keywords.c.
Sun Aug 18 16:09:06 CEST 2002
- Synced preproc.y with gram.y.
- Synced pgc.l with scan.l.
- Synced keywords.c.
Tue Aug 20 14:13:34 CEST 2002
- Removed ',' from preproc.y for bison 1.49b.
Sun Sep 1 11:13:04 CEST 2002
- Synced preproc.y with gram.y.
- Synced keywords.c.
Wed Sep 11 10:43:17 CEST 2002
- Synced preproc.y with gram.y.
Fri Sep 20 07:57:42 CEST 2002
- Synced preproc.y with gram.y.
- Synced keywords.c.
- Deactivated backend functions PREPARE, EXECUTE and DEALLOCATE for
the time being.
- Set ecpg version to 2.10.0.
- Set library version to 3.4.0.
src/interfaces/ecpg/lib/execute.c
View file @
cf8da4e9
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.
39 2002/09/04 20:31:46 momjian
Exp $ */
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.
40 2002/10/21 13:09:31 meskes
Exp $ */
/*
* The aim is to get a simpler inteface to the database routines.
...
...
@@ -89,7 +89,7 @@ quote_postgres(char *arg, int lineno)
res
[
ri
++
]
=
'\''
;
res
[
ri
]
=
'\0'
;
return
res
;
}
...
...
src/interfaces/ecpg/preproc/Makefile
View file @
cf8da4e9
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.8
5 2002/07/27 20:10:05 petere
Exp $
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.8
6 2002/10/21 13:09:31 meskes
Exp $
subdir
=
src/interfaces/ecpg/preproc
top_builddir
=
../../../..
...
...
@@ -18,7 +18,8 @@ override CFLAGS += -Wno-error
endif
OBJS
=
preproc.o pgc.o type.o ecpg.o ecpg_keywords.o output.o
\
keywords.o c_keywords.o ../lib/typename.o descriptor.o variable.o
keywords.o c_keywords.o ../lib/typename.o descriptor.o variable.o
\
$(SNPRINTF)
$(STRDUP)
all
:
submake-libpgport ecpg
...
...
src/interfaces/ecpg/preproc/ecpg_keywords.c
View file @
cf8da4e9
...
...
@@ -4,7 +4,7 @@
* lexical token lookup for reserved words in postgres embedded SQL
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg_keywords.c,v 1.2
6 2002/05/19 20:00:53
meskes Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg_keywords.c,v 1.2
7 2002/10/21 13:09:31
meskes Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -38,13 +38,11 @@ static ScanKeyword ScanKeywords[] = {
{
"data"
,
SQL_DATA
},
{
"datetime_interval_code"
,
SQL_DATETIME_INTERVAL_CODE
},
{
"datetime_interval_precision"
,
SQL_DATETIME_INTERVAL_PRECISION
},
{
"deallocate"
,
SQL_DEALLOCATE
},
{
"descriptor"
,
SQL_DESCRIPTOR
},
{
"disconnect"
,
SQL_DISCONNECT
},
{
"enum"
,
SQL_ENUM
},
{
"found"
,
SQL_FOUND
},
{
"free"
,
SQL_FREE
},
{
"get"
,
SQL_GET
},
{
"go"
,
SQL_GO
},
{
"goto"
,
SQL_GOTO
},
{
"identified"
,
SQL_IDENTIFIED
},
...
...
@@ -56,7 +54,6 @@ static ScanKeyword ScanKeywords[] = {
{
"nullable"
,
SQL_NULLABLE
},
{
"octet_length"
,
SQL_OCTET_LENGTH
},
{
"open"
,
SQL_OPEN
},
{
"prepare"
,
SQL_PREPARE
},
{
"reference"
,
SQL_REFERENCE
},
{
"release"
,
SQL_RELEASE
},
{
"returned_length"
,
SQL_RETURNED_LENGTH
},
...
...
src/interfaces/ecpg/preproc/keywords.c
View file @
cf8da4e9
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.5
4 2002/07/21 11:09:4
1 meskes Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.5
5 2002/10/21 13:09:3
1 meskes Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -44,6 +44,7 @@ static ScanKeyword ScanKeywords[] = {
{
"as"
,
AS
},
{
"asc"
,
ASC
},
{
"assertion"
,
ASSERTION
},
{
"assignment"
,
ASSIGNMENT
},
{
"at"
,
AT
},
{
"authorization"
,
AUTHORIZATION
},
{
"backward"
,
BACKWARD
},
...
...
@@ -67,6 +68,7 @@ static ScanKeyword ScanKeywords[] = {
{
"characteristics"
,
CHARACTERISTICS
},
{
"check"
,
CHECK
},
{
"checkpoint"
,
CHECKPOINT
},
{
"class"
,
CLASS
},
{
"close"
,
CLOSE
},
{
"cluster"
,
CLUSTER
},
{
"coalesce"
,
COALESCE
},
...
...
@@ -77,6 +79,8 @@ static ScanKeyword ScanKeywords[] = {
{
"committed"
,
COMMITTED
},
{
"constraint"
,
CONSTRAINT
},
{
"constraints"
,
CONSTRAINTS
},
{
"conversion"
,
CONVERSION_P
},
{
"convert"
,
CONVERT
},
{
"copy"
,
COPY
},
{
"create"
,
CREATE
},
{
"createdb"
,
CREATEDB
},
...
...
@@ -90,6 +94,7 @@ static ScanKeyword ScanKeywords[] = {
{
"cycle"
,
CYCLE
},
{
"database"
,
DATABASE
},
{
"day"
,
DAY_P
},
{
"deallocate"
,
DEALLOCATE
},
{
"dec"
,
DEC
},
{
"decimal"
,
DECIMAL
},
{
"declare"
,
DECLARE
},
...
...
@@ -98,6 +103,7 @@ static ScanKeyword ScanKeywords[] = {
{
"deferred"
,
DEFERRED
},
{
"definer"
,
DEFINER
},
{
"delete"
,
DELETE_P
},
{
"delimiter"
,
DELIMITER
},
{
"delimiters"
,
DELIMITERS
},
{
"desc"
,
DESC
},
{
"distinct"
,
DISTINCT
},
...
...
@@ -129,6 +135,7 @@ static ScanKeyword ScanKeywords[] = {
{
"from"
,
FROM
},
{
"full"
,
FULL
},
{
"function"
,
FUNCTION
},
{
"get"
,
GET
},
{
"global"
,
GLOBAL
},
{
"grant"
,
GRANT
},
{
"group"
,
GROUP_P
},
...
...
@@ -138,7 +145,7 @@ static ScanKeyword ScanKeywords[] = {
{
"ilike"
,
ILIKE
},
{
"immediate"
,
IMMEDIATE
},
{
"immutable"
,
IMMUTABLE
},
{
"implicit"
,
IMPLICIT
},
{
"implicit"
,
IMPLICIT
_P
},
{
"in"
,
IN_P
},
{
"increment"
,
INCREMENT
},
{
"index"
,
INDEX
},
...
...
@@ -218,6 +225,7 @@ static ScanKeyword ScanKeywords[] = {
{
"pendant"
,
PENDANT
},
{
"position"
,
POSITION
},
{
"precision"
,
PRECISION
},
{
"prepare"
,
PREPARE
},
{
"primary"
,
PRIMARY
},
{
"prior"
,
PRIOR
},
{
"privileges"
,
PRIVILEGES
},
...
...
@@ -225,6 +233,7 @@ static ScanKeyword ScanKeywords[] = {
{
"procedure"
,
PROCEDURE
},
{
"read"
,
READ
},
{
"real"
,
REAL
},
{
"recheck"
,
RECHECK
},
{
"references"
,
REFERENCES
},
{
"reindex"
,
REINDEX
},
{
"relative"
,
RELATIVE
},
...
...
@@ -251,6 +260,8 @@ static ScanKeyword ScanKeywords[] = {
{
"setof"
,
SETOF
},
{
"share"
,
SHARE
},
{
"show"
,
SHOW
},
{
"similar"
,
SIMILAR
},
{
"simple"
,
SIMPLE
},
{
"smallint"
,
SMALLINT
},
{
"some"
,
SOME
},
{
"stable"
,
STABLE
},
...
...
@@ -274,6 +285,7 @@ static ScanKeyword ScanKeywords[] = {
{
"toast"
,
TOAST
},
{
"trailing"
,
TRAILING
},
{
"transaction"
,
TRANSACTION
},
{
"treat"
,
TREAT
},
{
"trigger"
,
TRIGGER
},
{
"trim"
,
TRIM
},
{
"true"
,
TRUE_P
},
...
...
@@ -304,6 +316,7 @@ static ScanKeyword ScanKeywords[] = {
{
"with"
,
WITH
},
{
"without"
,
WITHOUT
},
{
"work"
,
WORK
},
{
"write"
,
WRITE
},
{
"year"
,
YEAR_P
},
{
"zone"
,
ZONE
},
};
...
...
src/interfaces/ecpg/preproc/pgc.l
View file @
cf8da4e9
...
...
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.
99 2002/09/02 06:11:42 momjian
Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.
100 2002/10/21 13:09:31 meskes
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -117,7 +117,7 @@ xbcat {quote}{whitespace_with_newline}{quote}
*/
xhstart [xX]{quote}
xhstop {quote}
xhinside [^']
+
xhinside [^']
*
xhcat {quote}{whitespace_with_newline}{quote}
/* National character
...
...
@@ -333,7 +333,7 @@ cppline {space}*#(.*\\{space})*.*
if (literalbuf[strspn(literalbuf, "01") + 1] != '\0')
mmerror(PARSE_ERROR, ET_ERROR, "invalid bit string input.");
yylval.str = literalbuf;
return B
IT
CONST;
return BCONST;
}
<xh>{xhinside} |
...
...
@@ -346,23 +346,11 @@ cppline {space}*#(.*\\{space})*.*
token_start = yytext;
BEGIN(xh);
startlit();
addlitchar('x');
}
<xh>{xhstop} {
long val;
char* endptr;
BEGIN(SQL);
errno = 0;
val = strtol(literalbuf, &endptr, 16);
if (*endptr != '\0' || errno == ERANGE
#ifdef HAVE_LONG_INT_64
/* if long > 32 bits, check for overflow of int4 */
|| val != (long) ((int32) val)
#endif
)
mmerror(PARSE_ERROR, ET_ERROR, "Bad hexadecimal integer input");
yylval.ival = val;
return ICONST;
yylval.str = literalbuf;
return XCONST;
}
<xh><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated hexadecimal integer"); }
...
...
src/interfaces/ecpg/preproc/preproc.y
View file @
cf8da4e9
This diff is collapsed.
Click to expand it.
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