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
22232834
Commit
22232834
authored
Dec 18, 2011
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added test for cursor handling on different connections to regression test
suite for ecpg.
parent
4b8b5e53
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
516 additions
and
397 deletions
+516
-397
src/interfaces/ecpg/test/expected/preproc-cursor.c
src/interfaces/ecpg/test/expected/preproc-cursor.c
+234
-166
src/interfaces/ecpg/test/expected/preproc-cursor.stderr
src/interfaces/ecpg/test/expected/preproc-cursor.stderr
+213
-173
src/interfaces/ecpg/test/expected/preproc-cursor.stdout
src/interfaces/ecpg/test/expected/preproc-cursor.stdout
+1
-1
src/interfaces/ecpg/test/preproc/cursor.pgc
src/interfaces/ecpg/test/preproc/cursor.pgc
+68
-57
No files found.
src/interfaces/ecpg/test/expected/preproc-cursor.c
View file @
22232834
...
...
@@ -61,6 +61,7 @@ main (void)
#line 23 "cursor.pgc"
char
*
stmt1
=
"SELECT id, t FROM t1"
;
...
...
@@ -77,15 +78,18 @@ main (void)
struct
varchar_curname4_1
{
int
len
;
char
arr
[
50
];
}
curname4
;
#line 28 "cursor.pgc"
int
count
;
char
*
curname5
=
CURNAME
;
#line 29 "cursor.pgc"
int
id
;
int
count
;
#line 30 "cursor.pgc"
int
id
;
#line 31 "cursor.pgc"
char
t
[
64
]
;
/* exec sql end declare section */
#line 3
1
"cursor.pgc"
#line 3
2
"cursor.pgc"
char
msg
[
128
];
...
...
@@ -93,129 +97,153 @@ main (void)
ECPGdebug
(
1
,
stderr
);
strcpy
(
msg
,
"connect"
);
{
ECPGconnect
(
__LINE__
,
0
,
"regress1"
,
NULL
,
NULL
,
NULL
,
0
);
#line 38 "cursor.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
"regress1"
,
NULL
,
NULL
,
"test1"
,
0
);
#line 39 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 39 "cursor.pgc"
{
ECPGconnect
(
__LINE__
,
0
,
"connectdb"
,
NULL
,
NULL
,
"test2"
,
0
);
#line 40 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line
38
"cursor.pgc"
#line
40
"cursor.pgc"
strcpy
(
msg
,
"set"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"set datestyle to iso"
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 4
1
"cursor.pgc"
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"set datestyle to iso"
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 4
3
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 4
1
"cursor.pgc"
#line 4
3
"cursor.pgc"
strcpy
(
msg
,
"create"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"create table t1 ( id serial primary key , t text )"
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 4
4
"cursor.pgc"
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"create table t1 ( id serial primary key , t text )"
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 4
6
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 44 "cursor.pgc"
#line 46 "cursor.pgc"
strcpy
(
msg
,
"insert"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"insert into t1 ( id , t ) values ( default , 'a' )"
,
ECPGt_EOIT
,
ECPGt_EORT
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test2"
,
0
,
ECPGst_normal
,
"create table t1 ( id serial primary key , t text )"
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 47 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 47 "cursor.pgc"
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"insert into t1 ( id , t ) values ( default , 'b' )"
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 48 "cursor.pgc"
strcpy
(
msg
,
"insert"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"insert into t1 ( id , t ) values ( default , 'a' )"
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 50 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line
48
"cursor.pgc"
#line
50
"cursor.pgc"
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"insert into t1 ( id , t ) values ( default , 'c
' )"
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line
49
"cursor.pgc"
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"insert into t1 ( id , t ) values ( default , 'b
' )"
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line
51
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line
49
"cursor.pgc"
#line
51
"cursor.pgc"
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"insert into t1 ( id , t ) values ( default , 'd
' )"
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 5
0
"cursor.pgc"
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"insert into t1 ( id , t ) values ( default , 'c
' )"
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 5
2
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 50 "cursor.pgc"
#line 52 "cursor.pgc"
strcpy
(
msg
,
"commit"
);
{
ECPGtrans
(
__LINE__
,
NULL
,
"commit"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"insert into t1 ( id , t ) values ( default , 'd' )"
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 53 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 53 "cursor.pgc"
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test2"
,
0
,
ECPGst_normal
,
"insert into t1 ( id , t ) values ( default , 'e' )"
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 54 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 54 "cursor.pgc"
strcpy
(
msg
,
"commit"
);
{
ECPGtrans
(
__LINE__
,
"test1"
,
"commit"
);
#line 57 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 57 "cursor.pgc"
{
ECPGtrans
(
__LINE__
,
"test2"
,
"commit"
);
#line 58 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 58 "cursor.pgc"
/* Dynamic cursorname test with INTO list in FETCH stmts */
strcpy
(
msg
,
"declare"
);
ECPGset_var
(
0
,
&
(
curname1
),
__LINE__
);
\
/* declare $0 cursor for select id , t from t1 */
#line
59
"cursor.pgc"
#line
64
"cursor.pgc"
strcpy
(
msg
,
"open"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"declare $0 cursor for select id , t from t1"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"declare $0 cursor for select id , t from t1"
,
ECPGt_char
,
&
(
curname1
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 6
2
"cursor.pgc"
#line 6
7
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 6
2
"cursor.pgc"
#line 6
7
"cursor.pgc"
strcpy
(
msg
,
"fetch from"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch forward from $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch forward from $0"
,
ECPGt_char
,
&
(
curname1
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line
65
"cursor.pgc"
#line
70
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line
65
"cursor.pgc"
#line
70
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"fetch"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch forward $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch forward $0"
,
ECPGt_char
,
&
(
curname1
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line
69
"cursor.pgc"
#line
74
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line
69
"cursor.pgc"
#line
74
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"fetch 1 from"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch 1 from $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch 1 from $0"
,
ECPGt_char
,
&
(
curname1
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 7
3
"cursor.pgc"
#line 7
8
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 7
3
"cursor.pgc"
#line 7
8
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"fetch :count from"
);
count
=
1
;
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch $0 from $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch $0 from $0"
,
ECPGt_int
,
&
(
count
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,
&
(
curname1
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
...
...
@@ -224,41 +252,41 @@ if (sqlca.sqlcode < 0) exit (1);}
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line
78
"cursor.pgc"
#line
83
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line
78
"cursor.pgc"
#line
83
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"move in"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"move absolute 0 in $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"move absolute 0 in $0"
,
ECPGt_char
,
&
(
curname1
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 8
2
"cursor.pgc"
#line 8
7
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 8
2
"cursor.pgc"
#line 8
7
"cursor.pgc"
strcpy
(
msg
,
"fetch 1"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch 1 $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch 1 $0"
,
ECPGt_char
,
&
(
curname1
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line
85
"cursor.pgc"
#line
90
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line
85
"cursor.pgc"
#line
90
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"fetch :count"
);
count
=
1
;
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch $0 $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch $0 $0"
,
ECPGt_int
,
&
(
count
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,
&
(
curname1
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
...
...
@@ -267,21 +295,21 @@ if (sqlca.sqlcode < 0) exit (1);}
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 9
0
"cursor.pgc"
#line 9
5
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 9
0
"cursor.pgc"
#line 9
5
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"close"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"close $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"close $0"
,
ECPGt_char
,
&
(
curname1
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 9
4
"cursor.pgc"
#line 9
9
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 9
4
"cursor.pgc"
#line 9
9
"cursor.pgc"
/* Dynamic cursorname test with INTO list in DECLARE stmt */
...
...
@@ -291,71 +319,71 @@ if (sqlca.sqlcode < 0) exit (1);}
ECPGset_var
(
2
,
(
t
),
__LINE__
);
\
ECPGset_var
(
3
,
&
(
id
),
__LINE__
);
\
/* declare $0 cursor for select id , t from t1 */
#line 10
0
"cursor.pgc"
#line 10
5
"cursor.pgc"
strcpy
(
msg
,
"open"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"declare $0 cursor for select id , t from t1"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"declare $0 cursor for select id , t from t1"
,
ECPGt_char
,
&
(
curname2
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 10
3
"cursor.pgc"
#line 10
8
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 10
3
"cursor.pgc"
#line 10
8
"cursor.pgc"
strcpy
(
msg
,
"fetch from"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch from $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch from $0"
,
ECPGt_char
,
&
(
curname2
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 1
06
"cursor.pgc"
#line 1
11
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 1
06
"cursor.pgc"
#line 1
11
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"fetch"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch $0"
,
ECPGt_char
,
&
(
curname2
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 11
0
"cursor.pgc"
#line 11
5
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 11
0
"cursor.pgc"
#line 11
5
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"fetch 1 from"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch 1 from $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch 1 from $0"
,
ECPGt_char
,
&
(
curname2
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 11
4
"cursor.pgc"
#line 11
9
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 11
4
"cursor.pgc"
#line 11
9
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"fetch :count from"
);
count
=
1
;
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch $0 from $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch $0 from $0"
,
ECPGt_int
,
&
(
count
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,
&
(
curname2
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
...
...
@@ -364,45 +392,45 @@ if (sqlca.sqlcode < 0) exit (1);}
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 1
19
"cursor.pgc"
#line 1
24
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 1
19
"cursor.pgc"
#line 1
24
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"move"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"move absolute 0 $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"move absolute 0 $0"
,
ECPGt_char
,
&
(
curname2
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 12
3
"cursor.pgc"
#line 12
8
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 12
3
"cursor.pgc"
#line 12
8
"cursor.pgc"
strcpy
(
msg
,
"fetch 1"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch 1 $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch 1 $0"
,
ECPGt_char
,
&
(
curname2
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 1
26
"cursor.pgc"
#line 1
31
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 1
26
"cursor.pgc"
#line 1
31
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"fetch :count"
);
count
=
1
;
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch $0 $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch $0 $0"
,
ECPGt_int
,
&
(
count
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,
&
(
curname2
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
...
...
@@ -411,99 +439,119 @@ if (sqlca.sqlcode < 0) exit (1);}
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 13
1
"cursor.pgc"
#line 13
6
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 13
1
"cursor.pgc"
#line 13
6
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"close"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"close $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"close $0"
,
ECPGt_char
,
&
(
curname2
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 1
35
"cursor.pgc"
#line 1
40
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 1
35
"cursor.pgc"
#line 1
40
"cursor.pgc"
/* Dynamic cursorname test with PREPARED stmt */
strcpy
(
msg
,
"prepare"
);
{
ECPGprepare
(
__LINE__
,
NULL
,
0
,
"st_id1"
,
stmt1
);
#line 14
0
"cursor.pgc"
{
ECPGprepare
(
__LINE__
,
"test1"
,
0
,
"st_id1"
,
stmt1
);
#line 14
5
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 140 "cursor.pgc"
#line 145 "cursor.pgc"
{
ECPGprepare
(
__LINE__
,
"test2"
,
0
,
"st_id1"
,
stmt1
);
#line 146 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 146 "cursor.pgc"
strcpy
(
msg
,
"declare"
);
ECPGset_var
(
4
,
&
(
curname3
),
__LINE__
);
\
/* declare $0 cursor for $1 */
#line 143 "cursor.pgc"
#line 149 "cursor.pgc"
ECPGset_var
(
5
,
&
(
curname5
),
__LINE__
);
\
/* declare $0 cursor for $1 */
#line 150 "cursor.pgc"
strcpy
(
msg
,
"open"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"declare $0 cursor for $1"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"declare $0 cursor for $1"
,
ECPGt_char
,
&
(
curname3
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char_variable
,(
ECPGprepared_statement
(
NULL
,
"st_id1"
,
__LINE__
)),(
long
)
1
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_char_variable
,(
ECPGprepared_statement
(
"test1"
,
"st_id1"
,
__LINE__
)),(
long
)
1
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 1
46
"cursor.pgc"
#line 1
53
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 146 "cursor.pgc"
#line 153 "cursor.pgc"
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test2"
,
0
,
ECPGst_normal
,
"declare $0 cursor for $1"
,
ECPGt_char
,
&
(
curname5
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char_variable
,(
ECPGprepared_statement
(
"test2"
,
"st_id1"
,
__LINE__
)),(
long
)
1
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 154 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 154 "cursor.pgc"
strcpy
(
msg
,
"fetch from"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch from $0"
,
ECPGt_char
,
&
(
curname3
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
strcpy
(
msg
,
"fetch"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test2"
,
0
,
ECPGst_normal
,
"fetch $0"
,
ECPGt_char
,
&
(
curname5
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 1
49
"cursor.pgc"
#line 1
57
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 1
49
"cursor.pgc"
#line 1
57
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"fetch"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch
$0"
,
strcpy
(
msg
,
"fetch
from
"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch from
$0"
,
ECPGt_char
,
&
(
curname3
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 1
53
"cursor.pgc"
#line 1
61
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 1
53
"cursor.pgc"
#line 1
61
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"fetch 1 from"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch 1 from $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch 1 from $0"
,
ECPGt_char
,
&
(
curname3
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 1
57
"cursor.pgc"
#line 1
65
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 1
57
"cursor.pgc"
#line 1
65
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"fetch :count from"
);
count
=
1
;
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch $0 from $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch $0 from $0"
,
ECPGt_int
,
&
(
count
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,
&
(
curname3
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
...
...
@@ -512,41 +560,41 @@ if (sqlca.sqlcode < 0) exit (1);}
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 1
62
"cursor.pgc"
#line 1
70
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 1
62
"cursor.pgc"
#line 1
70
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"move"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"move absolute 0 $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"move absolute 0 $0"
,
ECPGt_char
,
&
(
curname3
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 1
66
"cursor.pgc"
#line 1
74
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 1
66
"cursor.pgc"
#line 1
74
"cursor.pgc"
strcpy
(
msg
,
"fetch 1"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch 1 $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch 1 $0"
,
ECPGt_char
,
&
(
curname3
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 1
69
"cursor.pgc"
#line 1
77
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 1
69
"cursor.pgc"
#line 1
77
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"fetch :count"
);
count
=
1
;
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch $0 $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch $0 $0"
,
ECPGt_int
,
&
(
count
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,
&
(
curname3
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
...
...
@@ -555,29 +603,43 @@ if (sqlca.sqlcode < 0) exit (1);}
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 1
74
"cursor.pgc"
#line 1
82
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 1
74
"cursor.pgc"
#line 1
82
"cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"close"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"close $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"close $0"
,
ECPGt_char
,
&
(
curname3
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 178 "cursor.pgc"
#line 186 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 186 "cursor.pgc"
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test2"
,
0
,
ECPGst_normal
,
"close $0"
,
ECPGt_char
,
&
(
curname5
),(
long
)
0
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 187 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 1
78
"cursor.pgc"
#line 1
87
"cursor.pgc"
strcpy
(
msg
,
"deallocate prepare"
);
{
ECPGdeallocate
(
__LINE__
,
0
,
NULL
,
"st_id1"
);
#line 1
81
"cursor.pgc"
{
ECPGdeallocate
(
__LINE__
,
0
,
"test1"
,
"st_id1"
);
#line 1
90
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 181 "cursor.pgc"
#line 190 "cursor.pgc"
{
ECPGdeallocate
(
__LINE__
,
0
,
"test2"
,
"st_id1"
);
#line 191 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 191 "cursor.pgc"
/* Dynamic cursorname test with PREPARED stmt,
...
...
@@ -587,79 +649,79 @@ if (sqlca.sqlcode < 0) exit (1);}
strcpy
(
curname4
.
arr
,
CURNAME
);
strcpy
(
msg
,
"prepare"
);
{
ECPGprepare
(
__LINE__
,
NULL
,
0
,
"st_id2"
,
stmt1
);
#line
19
0 "cursor.pgc"
{
ECPGprepare
(
__LINE__
,
"test1"
,
0
,
"st_id2"
,
stmt1
);
#line
20
0 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line
19
0 "cursor.pgc"
#line
20
0 "cursor.pgc"
strcpy
(
msg
,
"declare"
);
ECPGset_var
(
5
,
&
(
curname4
),
__LINE__
);
\
ECPGset_var
(
6
,
&
(
curname4
),
__LINE__
);
\
/* declare $0 cursor for $1 */
#line
19
3 "cursor.pgc"
#line
20
3 "cursor.pgc"
strcpy
(
msg
,
"open"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"declare $0 cursor for $1"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"declare $0 cursor for $1"
,
ECPGt_varchar
,
&
(
curname4
),(
long
)
50
,(
long
)
1
,
sizeof
(
struct
varchar_curname4_1
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char_variable
,(
ECPGprepared_statement
(
NULL
,
"st_id2"
,
__LINE__
)),(
long
)
1
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_char_variable
,(
ECPGprepared_statement
(
"test1"
,
"st_id2"
,
__LINE__
)),(
long
)
1
,(
long
)
1
,(
1
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line
19
6 "cursor.pgc"
#line
20
6 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line
19
6 "cursor.pgc"
#line
20
6 "cursor.pgc"
strcpy
(
msg
,
"fetch from"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch from $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch from $0"
,
ECPGt_varchar
,
&
(
curname4
),(
long
)
50
,(
long
)
1
,
sizeof
(
struct
varchar_curname4_1
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line
19
9 "cursor.pgc"
#line
20
9 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line
19
9 "cursor.pgc"
#line
20
9 "cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"fetch"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch $0"
,
ECPGt_varchar
,
&
(
curname4
),(
long
)
50
,(
long
)
1
,
sizeof
(
struct
varchar_curname4_1
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 2
0
3 "cursor.pgc"
#line 2
1
3 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 2
0
3 "cursor.pgc"
#line 2
1
3 "cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"fetch 1 from"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch 1 from $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch 1 from $0"
,
ECPGt_varchar
,
&
(
curname4
),(
long
)
50
,(
long
)
1
,
sizeof
(
struct
varchar_curname4_1
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 2
0
7 "cursor.pgc"
#line 2
1
7 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 2
0
7 "cursor.pgc"
#line 2
1
7 "cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"fetch :count from"
);
count
=
1
;
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch $0 from $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch $0 from $0"
,
ECPGt_int
,
&
(
count
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_varchar
,
&
(
curname4
),(
long
)
50
,(
long
)
1
,
sizeof
(
struct
varchar_curname4_1
),
...
...
@@ -668,41 +730,41 @@ if (sqlca.sqlcode < 0) exit (1);}
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 2
1
2 "cursor.pgc"
#line 2
2
2 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 2
1
2 "cursor.pgc"
#line 2
2
2 "cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"move"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"move absolute 0 $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"move absolute 0 $0"
,
ECPGt_varchar
,
&
(
curname4
),(
long
)
50
,(
long
)
1
,
sizeof
(
struct
varchar_curname4_1
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 2
1
6 "cursor.pgc"
#line 2
2
6 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 2
1
6 "cursor.pgc"
#line 2
2
6 "cursor.pgc"
strcpy
(
msg
,
"fetch 1"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch 1 $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch 1 $0"
,
ECPGt_varchar
,
&
(
curname4
),(
long
)
50
,(
long
)
1
,
sizeof
(
struct
varchar_curname4_1
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_int
,
&
(
id
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 2
1
9 "cursor.pgc"
#line 2
2
9 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 2
1
9 "cursor.pgc"
#line 2
2
9 "cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"fetch :count"
);
count
=
1
;
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"fetch $0 $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"fetch $0 $0"
,
ECPGt_int
,
&
(
count
),(
long
)
1
,(
long
)
1
,
sizeof
(
int
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_varchar
,
&
(
curname4
),(
long
)
50
,(
long
)
1
,
sizeof
(
struct
varchar_curname4_1
),
...
...
@@ -711,55 +773,61 @@ if (sqlca.sqlcode < 0) exit (1);}
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_char
,(
t
),(
long
)
64
,(
long
)
1
,(
64
)
*
sizeof
(
char
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EORT
);
#line 2
2
4 "cursor.pgc"
#line 2
3
4 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 2
2
4 "cursor.pgc"
#line 2
3
4 "cursor.pgc"
printf
(
"%d %s
\n
"
,
id
,
t
);
strcpy
(
msg
,
"close"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"close $0"
,
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"close $0"
,
ECPGt_varchar
,
&
(
curname4
),(
long
)
50
,(
long
)
1
,
sizeof
(
struct
varchar_curname4_1
),
ECPGt_NO_INDICATOR
,
NULL
,
0L
,
0L
,
0L
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 2
2
8 "cursor.pgc"
#line 2
3
8 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 2
2
8 "cursor.pgc"
#line 2
3
8 "cursor.pgc"
strcpy
(
msg
,
"deallocate prepare"
);
{
ECPGdeallocate
(
__LINE__
,
0
,
NULL
,
"st_id2"
);
#line 2
3
1 "cursor.pgc"
{
ECPGdeallocate
(
__LINE__
,
0
,
"test1"
,
"st_id2"
);
#line 2
4
1 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 2
3
1 "cursor.pgc"
#line 2
4
1 "cursor.pgc"
/* End test */
strcpy
(
msg
,
"drop"
);
{
ECPGdo
(
__LINE__
,
0
,
1
,
NULL
,
0
,
ECPGst_normal
,
"drop table t1"
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 236 "cursor.pgc"
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test1"
,
0
,
ECPGst_normal
,
"drop table t1"
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 246 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 246 "cursor.pgc"
{
ECPGdo
(
__LINE__
,
0
,
1
,
"test2"
,
0
,
ECPGst_normal
,
"drop table t1"
,
ECPGt_EOIT
,
ECPGt_EORT
);
#line 247 "cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 2
36
"cursor.pgc"
#line 2
47
"cursor.pgc"
strcpy
(
msg
,
"commit"
);
{
ECPGtrans
(
__LINE__
,
NULL
,
"commit"
);
#line 2
39
"cursor.pgc"
{
ECPGtrans
(
__LINE__
,
"test1"
,
"commit"
);
#line 2
50
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 2
39
"cursor.pgc"
#line 2
50
"cursor.pgc"
strcpy
(
msg
,
"disconnect"
);
{
ECPGdisconnect
(
__LINE__
,
"
CURRENT
"
);
#line 2
42
"cursor.pgc"
{
ECPGdisconnect
(
__LINE__
,
"
ALL
"
);
#line 2
53
"cursor.pgc"
if
(
sqlca
.
sqlcode
<
0
)
exit
(
1
);}
#line 2
42
"cursor.pgc"
#line 2
53
"cursor.pgc"
return
(
0
);
...
...
src/interfaces/ecpg/test/expected/preproc-cursor.stderr
View file @
22232834
...
...
@@ -2,371 +2,411 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]:
ecpg_execute on line 41: query: set datestyle to iso; with 0 parameter(s) on connection regress1
[NO_PID]:
ECPGconnect: opening database connectdb on <DEFAULT> port <DEFAULT>
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 4
1: using PQexec
[NO_PID]: ecpg_execute on line 4
3: query: set datestyle to iso; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 4
1: OK: SET
[NO_PID]: ecpg_execute on line 4
3: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 4
4: query: create table t1 ( id serial primary key , t text ); with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_execute on line 4
3: OK: SET
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 4
4: using PQexec
[NO_PID]: ecpg_execute on line 4
6: query: create table t1 ( id serial primary key , t text ); with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 4
4: OK: CREATE TABLE
[NO_PID]: ecpg_execute on line 4
6: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 47: query: insert into t1 ( id , t ) values ( default , 'a' ); with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_execute on line 46: OK: CREATE TABLE
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 47: query: create table t1 ( id serial primary key , t text ); with 0 parameter(s) on connection test2
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 47: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 47: OK:
INSERT 0 1
[NO_PID]: ecpg_execute on line 47: OK:
CREATE TABLE
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
48: query: insert into t1 ( id , t ) values ( default , 'b' ); with 0 parameter(s) on connection regress
1
[NO_PID]: ecpg_execute on line
50: query: insert into t1 ( id , t ) values ( default , 'a' ); with 0 parameter(s) on connection test
1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
48
: using PQexec
[NO_PID]: ecpg_execute on line
50
: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
48
: OK: INSERT 0 1
[NO_PID]: ecpg_execute on line
50
: OK: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
49: query: insert into t1 ( id , t ) values ( default , 'c' ); with 0 parameter(s) on connection regress
1
[NO_PID]: ecpg_execute on line
51: query: insert into t1 ( id , t ) values ( default , 'b' ); with 0 parameter(s) on connection test
1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
49
: using PQexec
[NO_PID]: ecpg_execute on line
51
: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
49
: OK: INSERT 0 1
[NO_PID]: ecpg_execute on line
51
: OK: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 5
0: query: insert into t1 ( id , t ) values ( default , 'd' ); with 0 parameter(s) on connection regress
1
[NO_PID]: ecpg_execute on line 5
2: query: insert into t1 ( id , t ) values ( default , 'c' ); with 0 parameter(s) on connection test
1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 5
0
: using PQexec
[NO_PID]: ecpg_execute on line 5
2
: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 50: OK: INSERT 0 1
[NO_PID]: ecpg_execute on line 52: OK: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 53: query: insert into t1 ( id , t ) values ( default , 'd' ); with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 53: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]:
ECPGtrans on line 53: action "commit"; connection "regress1"
[NO_PID]:
ecpg_execute on line 53: OK: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
62: query: declare mycur cursor for select id , t from t1; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_execute on line
54: query: insert into t1 ( id , t ) values ( default , 'e' ); with 0 parameter(s) on connection test2
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
62
: using PQexec
[NO_PID]: ecpg_execute on line
54
: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
62: OK: DECLARE CURSOR
[NO_PID]: ecpg_execute on line
54: OK: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]:
ecpg_execute on line 65: query: fetch forward from mycur; with 0 parameter(s) on connection regress1
[NO_PID]:
ECPGtrans on line 57: action "commit"; connection "test1"
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]:
ecpg_execute on line 65: using PQexec
[NO_PID]:
ECPGtrans on line 58: action "commit"; connection "test2"
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 6
5: correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_execute on line 6
7: query: declare mycur cursor for select id , t from t1; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 65: RESULT: 1 offset: -1; array: no
[NO_PID]: ecpg_
execute on line 67: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 65: RESULT: a offset: -1; array: no
[NO_PID]: ecpg_
execute on line 67: OK: DECLARE CURSOR
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
69: query: fetch forward mycur; with 0 parameter(s) on connection regress
1
[NO_PID]: ecpg_execute on line
70: query: fetch forward from mycur; with 0 parameter(s) on connection test
1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
69
: using PQexec
[NO_PID]: ecpg_execute on line
70
: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
69
: correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_execute on line
70
: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line
69: RESULT: 2
offset: -1; array: no
[NO_PID]: ecpg_get_data on line
70: RESULT: 1
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line
69: RESULT: b
offset: -1; array: no
[NO_PID]: ecpg_get_data on line
70: RESULT: a
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 7
3: query: fetch 1 from mycur; with 0 parameter(s) on connection regress
1
[NO_PID]: ecpg_execute on line 7
4: query: fetch forward mycur; with 0 parameter(s) on connection test
1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 7
3
: using PQexec
[NO_PID]: ecpg_execute on line 7
4
: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 7
3
: correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_execute on line 7
4
: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 7
3: RESULT: 3
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 7
4: RESULT: 2
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 7
3: RESULT: c
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 7
4: RESULT: b
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 78: query: fetch 1 from mycur; with 0 parameter(s) on connection
regress
1
[NO_PID]: ecpg_execute on line 78: query: fetch 1 from mycur; with 0 parameter(s) on connection
test
1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 78: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 78: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 78: RESULT:
4
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 78: RESULT:
3
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 78: RESULT:
d
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 78: RESULT:
c
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 8
2: query: move absolute 0 in mycur; with 0 parameter(s) on connection regress
1
[NO_PID]: ecpg_execute on line 8
3: query: fetch 1 from mycur; with 0 parameter(s) on connection test
1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 8
2
: using PQexec
[NO_PID]: ecpg_execute on line 8
3
: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 8
2: OK: MOVE 0
[NO_PID]: ecpg_execute on line 8
3: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 85: query: fetch 1 mycur; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_
get_data on line 83: RESULT: 4 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 85: using PQexec
[NO_PID]: ecpg_
get_data on line 83: RESULT: d offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 8
5: correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_execute on line 8
7: query: move absolute 0 in mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 85: RESULT: 1 offset: -1; array: no
[NO_PID]: ecpg_
execute on line 87: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 85: RESULT: a offset: -1; array: no
[NO_PID]: ecpg_
execute on line 87: OK: MOVE 0
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 90: query: fetch 1 mycur; with 0 parameter(s) on connection
regress
1
[NO_PID]: ecpg_execute on line 90: query: fetch 1 mycur; with 0 parameter(s) on connection
test
1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 90: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 90: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 90: RESULT:
2
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 90: RESULT:
1
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 90: RESULT:
b
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 90: RESULT:
a
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 9
4: query: close mycur; with 0 parameter(s) on connection regress
1
[NO_PID]: ecpg_execute on line 9
5: query: fetch 1 mycur; with 0 parameter(s) on connection test
1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 9
4
: using PQexec
[NO_PID]: ecpg_execute on line 9
5
: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 9
4: OK: CLOSE CURSOR
[NO_PID]: ecpg_execute on line 9
5: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 103: query: declare mycur cursor for select id , t from t1; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_
get_data on line 95: RESULT: 2 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 103: using PQexec
[NO_PID]: ecpg_
get_data on line 95: RESULT: b offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
103: OK: DECLARE CURSOR
[NO_PID]: ecpg_execute on line
99: query: close mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
106: query: fetch from mycur; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_execute on line
99: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
106: using PQexec
[NO_PID]: ecpg_execute on line
99: OK: CLOSE CURSOR
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 10
6: correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_execute on line 10
8: query: declare mycur cursor for select id , t from t1; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 106: RESULT: 1 offset: -1; array: no
[NO_PID]: ecpg_
execute on line 108: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 106: RESULT: a offset: -1; array: no
[NO_PID]: ecpg_
execute on line 108: OK: DECLARE CURSOR
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 11
0: query: fetch mycur; with 0 parameter(s) on connection regress
1
[NO_PID]: ecpg_execute on line 11
1: query: fetch from mycur; with 0 parameter(s) on connection test
1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 11
0
: using PQexec
[NO_PID]: ecpg_execute on line 11
1
: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 11
0
: correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_execute on line 11
1
: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 11
0: RESULT: 2
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 11
1: RESULT: 1
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 11
0: RESULT: b
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 11
1: RESULT: a
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 11
4: query: fetch 1 from mycur; with 0 parameter(s) on connection regress
1
[NO_PID]: ecpg_execute on line 11
5: query: fetch mycur; with 0 parameter(s) on connection test
1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 11
4
: using PQexec
[NO_PID]: ecpg_execute on line 11
5
: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 11
4
: correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_execute on line 11
5
: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 11
4: RESULT: 3
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 11
5: RESULT: 2
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 11
4: RESULT: c
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 11
5: RESULT: b
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 119: query: fetch 1 from mycur; with 0 parameter(s) on connection
regress
1
[NO_PID]: ecpg_execute on line 119: query: fetch 1 from mycur; with 0 parameter(s) on connection
test
1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 119: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 119: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 119: RESULT:
4
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 119: RESULT:
3
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 119: RESULT:
d
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 119: RESULT:
c
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 12
3: query: move absolute 0 mycur; with 0 parameter(s) on connection regress
1
[NO_PID]: ecpg_execute on line 12
4: query: fetch 1 from mycur; with 0 parameter(s) on connection test
1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 12
3
: using PQexec
[NO_PID]: ecpg_execute on line 12
4
: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 12
3: OK: MOVE 0
[NO_PID]: ecpg_execute on line 12
4: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 126: query: fetch 1 mycur; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_
get_data on line 124: RESULT: 4 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 126: using PQexec
[NO_PID]: ecpg_
get_data on line 124: RESULT: d offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 12
6: correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_execute on line 12
8: query: move absolute 0 mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 126: RESULT: 1 offset: -1; array: no
[NO_PID]: ecpg_
execute on line 128: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 126: RESULT: a offset: -1; array: no
[NO_PID]: ecpg_
execute on line 128: OK: MOVE 0
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 131: query: fetch 1 mycur; with 0 parameter(s) on connection
regress
1
[NO_PID]: ecpg_execute on line 131: query: fetch 1 mycur; with 0 parameter(s) on connection
test
1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 131: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 131: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 131: RESULT:
2
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 131: RESULT:
1
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 131: RESULT:
b
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 131: RESULT:
a
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 13
5: query: close mycur; with 0 parameter(s) on connection regress
1
[NO_PID]: ecpg_execute on line 13
6: query: fetch 1 mycur; with 0 parameter(s) on connection test
1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 13
5
: using PQexec
[NO_PID]: ecpg_execute on line 13
6
: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 13
5: OK: CLOSE CURSOR
[NO_PID]: ecpg_execute on line 13
6: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]:
prepare_common on line 140: name st_id1; query: "SELECT id, t FROM t1"
[NO_PID]:
ecpg_get_data on line 136: RESULT: 2 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 146: query: declare mycur cursor for SELECT id, t FROM t1; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_
get_data on line 136: RESULT: b offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 14
6: using PQexec
[NO_PID]: ecpg_execute on line 14
0: query: close mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 14
6: OK: DECLARE CURSOR
[NO_PID]: ecpg_execute on line 14
0: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 14
9: query: fetch from mycur; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_execute on line 14
0: OK: CLOSE CURSOR
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]:
ecpg_execute on line 149: using PQexec
[NO_PID]:
prepare_common on line 145: name st_id1; query: "SELECT id, t FROM t1"
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]:
ecpg_execute on line 149: correctly got 1 tuples with 2 fields
[NO_PID]:
prepare_common on line 146: name st_id1; query: "SELECT id, t FROM t1"
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 149: RESULT: 1 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 149: RESULT: a offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 153: query: fetch mycur; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_execute on line 153: query: declare mycur cursor for SELECT id, t FROM t1; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 153: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 153:
correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_execute on line 153:
OK: DECLARE CURSOR
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 153: RESULT: 2 offset: -1; array: no
[NO_PID]: ecpg_
execute on line 154: query: declare mycur cursor for SELECT id, t FROM t1; with 0 parameter(s) on connection test2
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 153: RESULT: b offset: -1; array: no
[NO_PID]: ecpg_
execute on line 154: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 157: query: fetch 1 from mycur; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_execute on line 154: OK: DECLARE CURSOR
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 157: query: fetch mycur; with 0 parameter(s) on connection test2
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 157: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 157: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 157: RESULT: 3 offset: -1; array: no
[NO_PID]: ecpg_get_data on line 157: RESULT: 1 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 157: RESULT: e offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 157: RESULT: c offset: -1; array: no
[NO_PID]: ecpg_
execute on line 161: query: fetch from mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 16
2: query: fetch 1 from mycur; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_execute on line 16
1: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 16
2: using PQexec
[NO_PID]: ecpg_execute on line 16
1: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 162: correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_
get_data on line 161: RESULT: 1 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 16
2: RESULT: 4
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 16
1: RESULT: a
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 162: RESULT: d offset: -1; array: no
[NO_PID]: ecpg_
execute on line 165: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 16
6: query: move absolute 0 mycur; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_execute on line 16
5: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 16
6: using PQexec
[NO_PID]: ecpg_execute on line 16
5: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 166: OK: MOVE 0
[NO_PID]: ecpg_
get_data on line 165: RESULT: 2 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 169: query: fetch 1 mycur; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_
get_data on line 165: RESULT: b offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 1
69: using PQexec
[NO_PID]: ecpg_execute on line 1
70: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 1
69: correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_execute on line 1
70: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 169: RESULT: 1 offset: -1; array: no
[NO_PID]: ecpg_
execute on line 170: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 1
69: RESULT: a
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 1
70: RESULT: 3
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 174: query: fetch 1 mycur; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_get_data on line 170: RESULT: c offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 174: query: move absolute 0 mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 174: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 174: correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_execute on line 174: OK: MOVE 0
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 177: query: fetch 1 mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 177: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 177: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 177: RESULT: 1 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 177: RESULT: a offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 182: query: fetch 1 mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 182: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 182: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 182: RESULT: 2 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 182: RESULT: b offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 186: query: close mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 186: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 186: OK: CLOSE CURSOR
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 187: query: close mycur; with 0 parameter(s) on connection test2
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 187: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 187: OK: CLOSE CURSOR
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]:
ecpg_get_data on line 174: RESULT: 2 offset: -1; array: no
[NO_PID]:
deallocate_one on line 190: name st_id1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]:
ecpg_get_data on line 174: RESULT: b offset: -1; array: no
[NO_PID]:
deallocate_one on line 191: name st_id1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]:
ecpg_execute on line 178: query: close mycur; with 0 parameter(s) on connection regress1
[NO_PID]:
prepare_common on line 200: name st_id2; query: "SELECT id, t FROM t1"
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
178: using PQexec
[NO_PID]: ecpg_execute on line
206: query: declare mycur cursor for SELECT id, t FROM t1; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
178: OK: CLOSE CURSOR
[NO_PID]: ecpg_execute on line
206: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]:
deallocate_one on line 181: name st_id1
[NO_PID]:
ecpg_execute on line 206: OK: DECLARE CURSOR
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]:
prepare_common on line 190: name st_id2; query: "SELECT id, t FROM t1"
[NO_PID]:
ecpg_execute on line 209: query: fetch from mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
196: query: declare mycur cursor for SELECT id, t FROM t1; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_execute on line
209: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
196: using PQexec
[NO_PID]: ecpg_execute on line
209: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 196: OK: DECLARE CURSOR
[NO_PID]: ecpg_
get_data on line 209: RESULT: 1 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 199: query: fetch from mycur; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_
get_data on line 209: RESULT: a offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
199: using PQexec
[NO_PID]: ecpg_execute on line
213: query: fetch mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line
199: correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_execute on line
213: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 199: RESULT: 1 offset: -1; array: no
[NO_PID]: ecpg_
execute on line 213: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line
199: RESULT: a
offset: -1; array: no
[NO_PID]: ecpg_get_data on line
213: RESULT: 2
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 203: query: fetch mycur; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_
get_data on line 213: RESULT: b offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 2
03: using PQexec
[NO_PID]: ecpg_execute on line 2
17: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 2
03: correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_execute on line 2
17: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 203: RESULT: 2 offset: -1; array: no
[NO_PID]: ecpg_
execute on line 217: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 2
03: RESULT: b
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 2
17: RESULT: 3
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 207: query: fetch 1 from mycur; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_
get_data on line 217: RESULT: c offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 2
07: using PQexec
[NO_PID]: ecpg_execute on line 2
22: query: fetch 1 from mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 2
07: correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_execute on line 2
22: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 207: RESULT: 3 offset: -1; array: no
[NO_PID]: ecpg_
execute on line 222: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 2
07: RESULT: c
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 2
22: RESULT: 4
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 212: query: fetch 1 from mycur; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_
get_data on line 222: RESULT: d offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 2
12: using PQexec
[NO_PID]: ecpg_execute on line 2
26: query: move absolute 0 mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 2
12: correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_execute on line 2
26: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 212: RESULT: 4 offset: -1; array: no
[NO_PID]: ecpg_
execute on line 226: OK: MOVE 0
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 212: RESULT: d offset: -1; array: no
[NO_PID]: ecpg_
execute on line 229: query: fetch 1 mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 2
16: query: move absolute 0 mycur; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_execute on line 2
29: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 2
16: using PQexec
[NO_PID]: ecpg_execute on line 2
29: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 216: OK: MOVE 0
[NO_PID]: ecpg_
get_data on line 229: RESULT: 1 offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 219: query: fetch 1 mycur; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_
get_data on line 229: RESULT: a offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 2
19: using PQexec
[NO_PID]: ecpg_execute on line 2
34: query: fetch 1 mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 2
19: correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_execute on line 2
34: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 219: RESULT: 1 offset: -1; array: no
[NO_PID]: ecpg_
execute on line 234: correctly got 1 tuples with 2 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 2
19: RESULT: a
offset: -1; array: no
[NO_PID]: ecpg_get_data on line 2
34: RESULT: 2
offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
execute on line 224: query: fetch 1 mycur; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_
get_data on line 234: RESULT: b offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 2
24: using PQexec
[NO_PID]: ecpg_execute on line 2
38: query: close mycur; with 0 parameter(s) on connection test1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 2
24: correctly got 1 tuples with 2 fields
[NO_PID]: ecpg_execute on line 2
38: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_
get_data on line 224: RESULT: 2 offset: -1; array: no
[NO_PID]: ecpg_
execute on line 238: OK: CLOSE CURSOR
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]:
ecpg_get_data on line 224: RESULT: b offset: -1; array: no
[NO_PID]:
deallocate_one on line 241: name st_id2
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 2
28: query: close mycur; with 0 parameter(s) on connection regress
1
[NO_PID]: ecpg_execute on line 2
46: query: drop table t1; with 0 parameter(s) on connection test
1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 2
28
: using PQexec
[NO_PID]: ecpg_execute on line 2
46
: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 2
28: OK: CLOSE CURSOR
[NO_PID]: ecpg_execute on line 2
46: OK: DROP TABLE
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]:
deallocate_one on line 231: name st_id
2
[NO_PID]:
ecpg_execute on line 247: query: drop table t1; with 0 parameter(s) on connection test
2
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 2
36: query: drop table t1; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_execute on line 2
47: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 2
36: using PQexec
[NO_PID]: ecpg_execute on line 2
47: OK: DROP TABLE
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]:
ecpg_execute on line 236: OK: DROP TABLE
[NO_PID]:
ECPGtrans on line 250: action "commit"; connection "test1"
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]:
ECPGtrans on line 239: action "commit"; connection "regress1"
[NO_PID]:
ecpg_finish: connection test2 closed
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection
regress
1 closed
[NO_PID]: ecpg_finish: connection
test
1 closed
[NO_PID]: sqlca: code: 0, state: 00000
src/interfaces/ecpg/test/expected/preproc-cursor.stdout
View file @
22232834
...
...
@@ -10,10 +10,10 @@
4 d
1 a
2 b
1 e
1 a
2 b
3 c
4 d
1 a
2 b
1 a
...
...
src/interfaces/ecpg/test/preproc/cursor.pgc
View file @
22232834
...
...
@@ -25,6 +25,7 @@ exec sql begin declare section;
char *curname2 = CURNAME;
char *curname3 = CURNAME;
varchar curname4[50];
char *curname5 = CURNAME;
int count;
int id;
char t[64];
...
...
@@ -35,150 +36,159 @@ exec sql end declare section;
ECPGdebug(1, stderr);
strcpy(msg, "connect");
exec sql connect to REGRESSDB1;
exec sql connect to REGRESSDB1 as test1;
exec sql connect to REGRESSDB2 as test2;
strcpy(msg, "set");
exec sql set datestyle to iso;
exec sql
at test1
set datestyle to iso;
strcpy(msg, "create");
exec sql create table t1(id serial primary key, t text);
exec sql at test1 create table t1(id serial primary key, t text);
exec sql at test2 create table t1(id serial primary key, t text);
strcpy(msg, "insert");
exec sql insert into t1(id, t) values (default, 'a');
exec sql insert into t1(id, t) values (default, 'b');
exec sql insert into t1(id, t) values (default, 'c');
exec sql insert into t1(id, t) values (default, 'd');
exec sql at test1 insert into t1(id, t) values (default, 'a');
exec sql at test1 insert into t1(id, t) values (default, 'b');
exec sql at test1 insert into t1(id, t) values (default, 'c');
exec sql at test1 insert into t1(id, t) values (default, 'd');
exec sql at test2 insert into t1(id, t) values (default, 'e');
strcpy(msg, "commit");
exec sql commit;
exec sql at test1 commit;
exec sql at test2 commit;
/* Dynamic cursorname test with INTO list in FETCH stmts */
strcpy(msg, "declare");
exec sql declare :curname1 cursor for
exec sql
at test1
declare :curname1 cursor for
select id, t from t1;
strcpy(msg, "open");
exec sql open :curname1;
exec sql
at test1
open :curname1;
strcpy(msg, "fetch from");
exec sql fetch forward from :curname1 into :id, :t;
exec sql
at test1
fetch forward from :curname1 into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "fetch");
exec sql fetch forward :curname1 into :id, :t;
exec sql
at test1
fetch forward :curname1 into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "fetch 1 from");
exec sql fetch 1 from :curname1 into :id, :t;
exec sql
at test1
fetch 1 from :curname1 into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "fetch :count from");
count = 1;
exec sql fetch :count from :curname1 into :id, :t;
exec sql
at test1
fetch :count from :curname1 into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "move in");
exec sql move absolute 0 in :curname1;
exec sql
at test1
move absolute 0 in :curname1;
strcpy(msg, "fetch 1");
exec sql fetch 1 :curname1 into :id, :t;
exec sql
at test1
fetch 1 :curname1 into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "fetch :count");
count = 1;
exec sql fetch :count :curname1 into :id, :t;
exec sql
at test1
fetch :count :curname1 into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "close");
exec sql close :curname1;
exec sql
at test1
close :curname1;
/* Dynamic cursorname test with INTO list in DECLARE stmt */
strcpy(msg, "declare");
exec sql declare :curname2 cursor for
exec sql
at test1
declare :curname2 cursor for
select id, t into :id, :t from t1;
strcpy(msg, "open");
exec sql open :curname2;
exec sql
at test1
open :curname2;
strcpy(msg, "fetch from");
exec sql fetch from :curname2;
exec sql
at test1
fetch from :curname2;
printf("%d %s\n", id, t);
strcpy(msg, "fetch");
exec sql fetch :curname2;
exec sql
at test1
fetch :curname2;
printf("%d %s\n", id, t);
strcpy(msg, "fetch 1 from");
exec sql fetch 1 from :curname2;
exec sql
at test1
fetch 1 from :curname2;
printf("%d %s\n", id, t);
strcpy(msg, "fetch :count from");
count = 1;
exec sql fetch :count from :curname2;
exec sql
at test1
fetch :count from :curname2;
printf("%d %s\n", id, t);
strcpy(msg, "move");
exec sql move absolute 0 :curname2;
exec sql
at test1
move absolute 0 :curname2;
strcpy(msg, "fetch 1");
exec sql fetch 1 :curname2;
exec sql
at test1
fetch 1 :curname2;
printf("%d %s\n", id, t);
strcpy(msg, "fetch :count");
count = 1;
exec sql fetch :count :curname2;
exec sql
at test1
fetch :count :curname2;
printf("%d %s\n", id, t);
strcpy(msg, "close");
exec sql close :curname2;
exec sql
at test1
close :curname2;
/* Dynamic cursorname test with PREPARED stmt */
strcpy(msg, "prepare");
exec sql prepare st_id1 from :stmt1;
exec sql at test1 prepare st_id1 from :stmt1;
exec sql at test2 prepare st_id1 from :stmt1;
strcpy(msg, "declare");
exec sql declare :curname3 cursor for st_id1;
exec sql at test1 declare :curname3 cursor for st_id1;
exec sql at test2 declare :curname5 cursor for st_id1;
strcpy(msg, "open");
exec sql open :curname3;
exec sql at test1 open :curname3;
exec sql at test2 open :curname5;
strcpy(msg, "fetch
from
");
exec sql
fetch from :curname3
into :id, :t;
strcpy(msg, "fetch");
exec sql
at test2 fetch :curname5
into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "fetch");
exec sql
fetch
:curname3 into :id, :t;
strcpy(msg, "fetch
from
");
exec sql
at test1 fetch from
:curname3 into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "fetch 1 from");
exec sql fetch 1 from :curname3 into :id, :t;
exec sql
at test1
fetch 1 from :curname3 into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "fetch :count from");
count = 1;
exec sql fetch :count from :curname3 into :id, :t;
exec sql
at test1
fetch :count from :curname3 into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "move");
exec sql move absolute 0 :curname3;
exec sql
at test1
move absolute 0 :curname3;
strcpy(msg, "fetch 1");
exec sql fetch 1 :curname3 into :id, :t;
exec sql
at test1
fetch 1 :curname3 into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "fetch :count");
count = 1;
exec sql fetch :count :curname3 into :id, :t;
exec sql
at test1
fetch :count :curname3 into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "close");
exec sql close :curname3;
exec sql at test1 close :curname3;
exec sql at test2 close :curname5;
strcpy(msg, "deallocate prepare");
exec sql deallocate prepare st_id1;
exec sql at test1 deallocate prepare st_id1;
exec sql at test2 deallocate prepare st_id1;
/* Dynamic cursorname test with PREPARED stmt,
cursor name in varchar */
...
...
@@ -187,59 +197,60 @@ exec sql end declare section;
strcpy(curname4.arr, CURNAME);
strcpy(msg, "prepare");
exec sql prepare st_id2 from :stmt1;
exec sql
at test1
prepare st_id2 from :stmt1;
strcpy(msg, "declare");
exec sql declare :curname4 cursor for st_id2;
exec sql
at test1
declare :curname4 cursor for st_id2;
strcpy(msg, "open");
exec sql open :curname4;
exec sql
at test1
open :curname4;
strcpy(msg, "fetch from");
exec sql fetch from :curname4 into :id, :t;
exec sql
at test1
fetch from :curname4 into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "fetch");
exec sql fetch :curname4 into :id, :t;
exec sql
at test1
fetch :curname4 into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "fetch 1 from");
exec sql fetch 1 from :curname4 into :id, :t;
exec sql
at test1
fetch 1 from :curname4 into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "fetch :count from");
count = 1;
exec sql fetch :count from :curname4 into :id, :t;
exec sql
at test1
fetch :count from :curname4 into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "move");
exec sql move absolute 0 :curname4;
exec sql
at test1
move absolute 0 :curname4;
strcpy(msg, "fetch 1");
exec sql fetch 1 :curname4 into :id, :t;
exec sql
at test1
fetch 1 :curname4 into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "fetch :count");
count = 1;
exec sql fetch :count :curname4 into :id, :t;
exec sql
at test1
fetch :count :curname4 into :id, :t;
printf("%d %s\n", id, t);
strcpy(msg, "close");
exec sql close :curname4;
exec sql
at test1
close :curname4;
strcpy(msg, "deallocate prepare");
exec sql deallocate prepare st_id2;
exec sql
at test1
deallocate prepare st_id2;
/* End test */
strcpy(msg, "drop");
exec sql drop table t1;
exec sql at test1 drop table t1;
exec sql at test2 drop table t1;
strcpy(msg, "commit");
exec sql commit;
exec sql
at test1
commit;
strcpy(msg, "disconnect");
exec sql disconnect;
exec sql disconnect
all
;
return (0);
}
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