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
813d9960
Commit
813d9960
authored
May 23, 2003
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forgot these.
parent
d258fb91
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
src/interfaces/ecpg/test/dyntest2.pgc
src/interfaces/ecpg/test/dyntest2.pgc
+3
-3
src/interfaces/ecpg/test/test1.pgc
src/interfaces/ecpg/test/test1.pgc
+11
-4
No files found.
src/interfaces/ecpg/test/dyntest2.pgc
View file @
813d9960
...
...
@@ -2,7 +2,7 @@
*
* Copyright (c) 2000, Christof Petig <christof.petig@wtal.de>
*
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/test/Attic/dyntest2.pgc,v 1.
3 2001/11/14 11:11:49
meskes Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/test/Attic/dyntest2.pgc,v 1.
4 2003/05/23 15:22:38
meskes Exp $
*/
#include <stdio.h>
...
...
@@ -72,8 +72,8 @@ exec sql end declare section;
:PRECISION = precision, :SCALE=scale,
:NULLABLE=nullable, :NAME=name,
:INDICATOR=indicator;
printf("%2d\t%s (type: %d length: %d precision: %d scale: %d
\toctet_length: %d returned_octet_length: %d nullable: %d)\n\t= "
printf("%2d\t%s (type: %d length: %d precision: %d scale: %d
\n"
"
\toctet_length: %d returned_octet_length: %d nullable: %d)\n\t= "
,INDEX,NAME,TYPE,LENGTH,PRECISION,SCALE
,OCTET_LENGTH,RETURNED_OCTET_LENGTH,NULLABLE);
if (INDICATOR==-1) printf("NULL\n");
...
...
src/interfaces/ecpg/test/test1.pgc
View file @
813d9960
...
...
@@ -126,7 +126,7 @@ exec sql end declare section;
amount[i]+=1000;
strcpy(msg, "insert");
exec sql at pm insert into "Test" (name, amount, letter) values (:n, :a, :l);
exec sql at pm insert into "Test" (name, amount, letter) values (:n, :a
mount[i]
, :l);
}
strcpy(msg, "commit");
...
...
@@ -164,9 +164,6 @@ exec sql end declare section;
for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, name[i], i, amount[i],i, letter[i][0]);
strcpy(msg, "select");
exec sql at pm select name, amount, letter into :name_letter from "Test";
strcpy(msg, "commit");
exec sql commit;
...
...
@@ -177,6 +174,16 @@ exec sql end declare section;
for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, name_letter[i].name, i, name_letter[i].amount,i, name_letter[i].letter);
name_letter[4].amount=1407;
strcpy(msg, "insert");
exec sql insert into "Test" (name, amount, letter) values (:name_letter[4]);
strcpy(msg, "select");
exec sql select name, amount, letter into :name_letter[2] from "Test" where amount = 1407;
printf("Database: mm\n");
printf("name[2]=%8.8s\tamount[2]=%d\tletter[2]=%c\n", name_letter[2].name, name_letter[2].amount, name_letter[2].letter);
/* Start automatic transactioning for connection main. */
exec sql set autocommit to on;
...
...
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