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
ec7806db
Commit
ec7806db
authored
Dec 06, 2004
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in parsing of typedef'ed array sizes.
Synced parser.
parent
b3f3092c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
15 deletions
+16
-15
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+5
-0
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+9
-13
src/interfaces/ecpg/preproc/type.c
src/interfaces/ecpg/preproc/type.c
+1
-1
src/interfaces/ecpg/preproc/variable.c
src/interfaces/ecpg/preproc/variable.c
+1
-1
No files found.
src/interfaces/ecpg/ChangeLog
View file @
ec7806db
...
...
@@ -1877,6 +1877,11 @@ Mon Oct 18 15:34:51 CEST 2004
Wed Nov 10 14:43:50 CET 2004
- List VALUE as a keyword.
Mon Dec 6 21:27:34 CET 2004
- Fixed bug in parsing of typedef'ed array sizes.
- Synced parser.
- Set ecpg version to 3.2.0.
- Set compat library version to 1.2.
- Set ecpg library version to 4.2.
...
...
src/interfaces/ecpg/preproc/preproc.y
View file @
ec7806db
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.30
1 2004/11/10 13:48:10
meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.30
2 2004/12/06 20:35:35
meskes Exp $ */
/* Copyright comment */
%{
...
...
@@ -208,16 +208,16 @@ static char *
adjust_informix(struct arguments *list)
{
/* Informix accepts DECLARE with variables that are out of scope when OPEN is called.
* for instance you can declare variables in a function, and then subsequently use them
* {
* declare_vars();
* exec sql ... which uses vars declared in the above function
*
* for instance you can declare variables in a function, and then subsequently use them
* {
* declare_vars();
* exec sql ... which uses vars declared in the above function
*
* This breaks standard and leads to some very dangerous programming.
* Since they do, we have to work around and accept their syntax as well.
* But we will do so ONLY in Informix mode.
* We have to change the variables to our own struct and just store the pointer instead of the variable
*/
*/
struct arguments *ptr;
char *result = make_str("");
...
...
@@ -1955,12 +1955,8 @@ any_name: ColId { $$ = $1; }
| ColId attrs { $$ = cat2_str($1, $2); }
;
/*
* The slightly convoluted way of writing this production avoids reduce/reduce
* errors against indirection_el.
*/
attrs: '.' attr_name { $$ = cat2_str(make_str("."), $2); }
|
'.' attr_name attrs { $$ = cat_str(3, make_str("."), $2
, $3); }
|
attrs '.' attr_name { $$ = cat_str(3, $1, make_str(".")
, $3); }
;
/*****************************************************************************
...
...
@@ -4167,7 +4163,7 @@ qualified_name_list: qualified_name
qualified_name: relation_name
{ $$ = $1; }
| relation_name
attrs
| relation_name
indirection
{ $$ = cat2_str($1, $2); }
;
...
...
src/interfaces/ecpg/preproc/type.c
View file @
ec7806db
...
...
@@ -365,7 +365,7 @@ ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type,
else
sprintf
(
variable
,
"&(%s%s)"
,
prefix
?
prefix
:
""
,
name
);
sprintf
(
offset
,
"
%s
*sizeof(char)"
,
strcmp
(
varcharsize
,
"0"
)
==
0
?
"1"
:
varcharsize
);
sprintf
(
offset
,
"
(%s)
*sizeof(char)"
,
strcmp
(
varcharsize
,
"0"
)
==
0
?
"1"
:
varcharsize
);
break
;
case
ECPGt_numeric
:
...
...
src/interfaces/ecpg/preproc/variable.c
View file @
ec7806db
...
...
@@ -560,7 +560,7 @@ adjust_array(enum ECPGttype type_enum, char **dimension, char **length, char *ty
* changed later on when the variable is defined
*/
*
length
=
make_str
(
"1"
);
else
if
(
atoi
(
*
dimension
)
==
0
)
else
if
(
strcmp
(
*
dimension
,
"0"
)
==
0
)
*
length
=
make_str
(
"-1"
);
else
*
length
=
*
dimension
;
...
...
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