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
8e7764d9
Commit
8e7764d9
authored
Mar 09, 2000
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
dad5bb01
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
13 deletions
+33
-13
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+4
-0
src/interfaces/ecpg/lib/Makefile.in
src/interfaces/ecpg/lib/Makefile.in
+2
-2
src/interfaces/ecpg/preproc/ecpg.c
src/interfaces/ecpg/preproc/ecpg.c
+1
-2
src/interfaces/ecpg/preproc/extern.h
src/interfaces/ecpg/preproc/extern.h
+1
-0
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+5
-7
src/interfaces/ecpg/preproc/variable.c
src/interfaces/ecpg/preproc/variable.c
+20
-2
No files found.
src/interfaces/ecpg/ChangeLog
View file @
8e7764d9
...
...
@@ -857,5 +857,9 @@ Tue Mar 7 10:58:21 CET 2000
- More cleanup in ecpglib.
- Fixed ecpg.c not not free variable list twice.
Thu Mar 9 10:12:57 CET 2000
- Fixed another memory bug in the parser.
- Set library version to 3.1.0.
- Set ecpg version to 2.7.0.
src/interfaces/ecpg/lib/Makefile.in
View file @
8e7764d9
...
...
@@ -6,13 +6,13 @@
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.6
3 2000/03/08 01:58:24 momjian
Exp $
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.6
4 2000/03/09 09:17:10 meskes
Exp $
#
#-------------------------------------------------------------------------
NAME
=
ecpg
SO_MAJOR_VERSION
=
3
SO_MINOR_VERSION
=
1
SO_MINOR_VERSION
=
1
.0
SRCDIR
=
@top_srcdir@
include
$(SRCDIR)/Makefile.global
...
...
src/interfaces/ecpg/preproc/ecpg.c
View file @
8e7764d9
...
...
@@ -177,8 +177,7 @@ main(int argc, char *const argv[])
for
(
ptr
=
cur
;
ptr
!=
NULL
;)
{
struct
cursor
*
this
=
ptr
;
struct
arguments
*
l1
,
*
l2
;
struct
arguments
*
l1
,
*
l2
;
free
(
ptr
->
command
);
free
(
ptr
->
connection
);
...
...
src/interfaces/ecpg/preproc/extern.h
View file @
8e7764d9
...
...
@@ -59,6 +59,7 @@ extern void add_descriptor(char *,char *);
extern
void
drop_descriptor
(
char
*
,
char
*
);
extern
struct
descriptor
*
lookup_descriptor
(
char
*
,
char
*
);
extern
void
add_variable
(
struct
arguments
**
,
struct
variable
*
,
struct
variable
*
);
extern
void
append_variable
(
struct
arguments
**
,
struct
variable
*
,
struct
variable
*
);
extern
void
dump_variables
(
struct
arguments
*
,
int
);
extern
struct
typedefs
*
get_typedef
(
char
*
);
extern
void
adjust_array
(
enum
ECPGttype
,
int
*
,
int
*
,
int
,
int
,
bool
);
...
...
src/interfaces/ecpg/preproc/preproc.y
View file @
8e7764d9
...
...
@@ -525,15 +525,13 @@ stmt: AlterTableStmt { output_statement($1, 0, NULL, connection); }
}
/* merge variables given in prepare statement with those given here */
for (p = argsinsert; p && p->next; p = p->next);
if (p)
p->next = ptr->argsinsert;
else
argsinsert = ptr->argsinsert;
for (p = ptr->argsinsert; p; p = p->next)
append_variable(&argsinsert, p->variable, p->indicator);
argsresult = ptr->argsresult;
for (p = ptr->argsresult; p; p = p->next)
add_variable(&argsresult, p->variable, p->indicator);
output_statement(
ptr->command, 0, NULL, ptr->connection
);
output_statement(
mm_strdup(ptr->command), 0, NULL, ptr->connection ? mm_strdup(ptr->connection) : NULL
);
}
| ECPGPrepare {
if (connection)
...
...
src/interfaces/ecpg/preproc/variable.c
View file @
8e7764d9
...
...
@@ -189,17 +189,35 @@ reset_variables(void)
argsresult
=
NULL
;
}
/*
Add a variable to a reque
st. */
/*
Insert a new variable into our request li
st. */
void
add_variable
(
struct
arguments
**
list
,
struct
variable
*
var
,
struct
variable
*
ind
)
{
struct
arguments
*
p
=
(
struct
arguments
*
)
mm_alloc
(
sizeof
(
struct
arguments
));
struct
arguments
*
p
=
(
struct
arguments
*
)
mm_alloc
(
sizeof
(
struct
arguments
));
p
->
variable
=
var
;
p
->
indicator
=
ind
;
p
->
next
=
*
list
;
*
list
=
p
;
}
/* Append a new variable to our request list. */
void
append_variable
(
struct
arguments
**
list
,
struct
variable
*
var
,
struct
variable
*
ind
)
{
struct
arguments
*
p
,
*
new
=
(
struct
arguments
*
)
mm_alloc
(
sizeof
(
struct
arguments
));
for
(
p
=
*
list
;
p
&&
p
->
next
;
p
=
p
->
next
);
new
->
variable
=
var
;
new
->
indicator
=
ind
;
new
->
next
=
NULL
;
if
(
p
)
p
->
next
=
new
;
else
*
list
=
new
;
}
/* Dump out a list of all the variable on this list.
This is a recursive function that works from the end of the list and
...
...
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