1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

Applied two bug fixes by Christof Petig.

This commit is contained in:
Michael Meskes
2001-01-31 16:12:34 +00:00
parent 234599e943
commit c9ecf3d1f1
4 changed files with 92 additions and 46 deletions

View File

@ -18,9 +18,10 @@ dyntest2: dyntest2.c
test_code100: test_code100.c
test_notice: test_notice.c
test_init: test_init.c
test_text: test_text.c
.pgc.c:
$(ECPG) $?
clean:
rm -f test1 test2 test3 test4 perftest *.c log dyntest dyntest2 test_notice test_code100 test_init
rm -f test1 test2 test3 test4 perftest *.c log dyntest dyntest2 test_notice test_code100 test_init test_text

View File

@ -0,0 +1,23 @@
// $Id: test_text.pgc,v 1.1 2001/01/31 16:12:34 meskes Exp $
exec sql include sqlca;
#include <stdio.h>
int main(int argc, char **argv)
{ exec sql begin declare section;
int index;
char lab[15];
exec sql end declare section;
ECPGdebug(1,stdout);
exec sql connect to mm;
if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
exec sql select 'a1234567890'::text into :lab;
if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
exec sql disconnect;
if (sqlca.sqlcode) printf("%ld:%s\n",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);
return 0;
}