*** empty log message ***

This commit is contained in:
Michael Meskes 2000-04-05 15:51:28 +00:00
parent 6995c5fbad
commit a7b1ff6619
3 changed files with 14 additions and 9 deletions

View File

@ -902,5 +902,9 @@ Wed Apr 5 07:54:56 CEST 2000
- Removed duplicate ',' in execute.c.
- Changed error message for backend errors so it fits into sqlca.
- Fixed array handling.
Wed Apr 5 17:35:53 CEST 2000
- Fixed handling of bool variables.
- Set library version to 3.1.0.
- Set ecpg version to 2.7.0.

View File

@ -479,7 +479,7 @@ ECPGexecute(struct statement * stmt)
strncpy(mallocedval + strlen(mallocedval) - 1, "}'", sizeof("}'"));
}
else
sprintf(mallocedval, "%c", (*((char *) var->value)) ? 't' : 'f');
sprintf(mallocedval, "'%c'", (*((char *) var->value)) ? 't' : 'f');
tobeinserted = mallocedval;
break;
@ -859,7 +859,7 @@ ECPGdo(int lineno, const char *connection_name, char *query, ...)
*
* Copyright (c) 2000, Christof Petig <christof.petig@wtal.de>
*
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.4 2000/04/05 09:05:28 meskes Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.5 2000/04/05 15:51:25 meskes Exp $
*/
PGconn *ECPG_internal_get_connection(char *name);

View File

@ -14,6 +14,7 @@ EXEC SQL BEGIN DECLARE SECTION;
char text[10] = "klmnopqrst";
char *t = "uvwxyz1234";
double f;
bool b = true;
EXEC SQL END DECLARE SECTION;
FILE *dbgs;
@ -28,24 +29,24 @@ EXEC SQL END DECLARE SECTION;
EXEC SQL BEGIN WORK;
EXEC SQL CREATE TABLE test (f float, i int, a int[10], text char(10));
EXEC SQL CREATE TABLE test (f float, i int, a int[10], text char(10), b bool);
EXEC SQL INSERT INTO test(f,i,a,text) VALUES(404.90,1,'{0,1,2,3,4,5,6,7,8,9}','abcdefghij');
EXEC SQL INSERT INTO test(f,i,a,text,b) VALUES(404.90,1,'{0,1,2,3,4,5,6,7,8,9}','abcdefghij', 'f');
EXEC SQL INSERT INTO test(f,i,a,text) VALUES(140787.0,2,:a,:text);
EXEC SQL INSERT INTO test(f,i,a,text,b) VALUES(140787.0,2,:a,:text,'t');
EXEC SQL INSERT INTO test(f,i,a,text) VALUES(14.07,:did,:a,:t);
EXEC SQL INSERT INTO test(f,i,a,text,b) VALUES(14.07,:did,:a,:t,:b);
EXEC SQL COMMIT;
EXEC SQL BEGIN WORK;
EXEC SQL SELECT f,text
INTO :f,:text
EXEC SQL SELECT f,text,b
INTO :f,:text,:b
FROM test
WHERE i = 1;
printf("Found f=%f text=%10.10s\n", f, text);
printf("Found f=%f text=%10.10s b=%d\n", f, text, b);
f=14.07;
EXEC SQL SELECT a,text