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:
@ -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
|
||||
|
23
src/interfaces/ecpg/test/test_text.pgc
Normal file
23
src/interfaces/ecpg/test/test_text.pgc
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user