Skip to content

Commit 47a4e2e

Browse files
author
Michael Meskes
committed
Fixed connect statement with username in variable.
1 parent cd0f42e commit 47a4e2e

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,6 +1604,10 @@ Fri Aug 1 08:54:02 CEST 2003
16041604
Mon Aug 25 13:24:27 CEST 2003
16051605

16061606
- Synced parser.
1607+
1608+
Tue Aug 26 18:06:45 CEST 2003
1609+
1610+
- Fixed processing of connect statement with username as variable.
16071611
- Set ecpg version to 3.0.0
16081612
- Set ecpg library to 4.0.0
16091613
- Set pgtypes library to 1.0.0

src/interfaces/ecpg/preproc/preproc.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.252 2003/08/25 13:44:00 meskes Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.253 2003/08/26 16:09:01 meskes Exp $ */
22

33
/* Copyright comment */
44
%{
@@ -4265,7 +4265,7 @@ user_name: UserId
42654265
{
42664266
if ($1[0] == '\"')
42674267
$$ = $1;
4268-
else if (strcmp($1, "?") == 0) /* variable */
4268+
else if (strcmp($1, " ?") == 0) /* variable */
42694269
{
42704270
enum ECPGttype type = argsinsert->variable->type->type;
42714271

src/interfaces/ecpg/test/test1.pgc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ exec sql endif;
5252
char command[128];
5353
char *connection="pm";
5454
int how_many;
55+
char *user="postgres";
5556
exec sql end declare section;
5657
exec sql var name is string[AMOUNT];
5758
char msg[128];
@@ -65,7 +66,7 @@ exec sql end declare section;
6566
exec sql connect to mm as main;
6667

6768
strcpy(msg, "connect");
68-
exec sql connect to pm;
69+
exec sql connect to pm user :user;
6970

7071
strcpy(msg, "create");
7172
exec sql at main create table "Test" (name char(NAMELEN), amount int, letter char(1));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy