1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-12 21:01:52 +03:00

This one cleans the cursor problems ecpg had so far. It is now able

to understand cursors with variables.

Michael
This commit is contained in:
Bruce Momjian
1998-08-11 18:33:37 +00:00
parent 79c8d2e3a0
commit c6dd1e63a9
10 changed files with 334 additions and 232 deletions

View File

@ -23,6 +23,7 @@ extern char *optarg;
struct _include_path *include_paths;
static int no_auto_trans = 0;
struct cursor *cur = NULL;
static void
usage(char *progname)
@ -138,6 +139,24 @@ main(int argc, char *const argv[])
{
struct cursor *ptr;
/* remove old cursor definitions if any are still there */
for (ptr = cur; ptr != NULL; ptr=ptr->next)
{
struct arguments *l1, *l2;
free(ptr->command);
free(ptr->name);
for (l1 = argsinsert; l1; l1 = l2)
{
l2 = l1->next;
free(l1);
}
for (l1 = argsresult; l1; l1 = l2)
{
l2 = l1->next;
free(l1);
}
}
/* initialize lex */
lex_init();