summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/test')
-rw-r--r--src/interfaces/ecpg/test/Makefile4
-rw-r--r--src/interfaces/ecpg/test/num_test.pgc6
-rw-r--r--src/interfaces/ecpg/test/test_informix.pgc7
3 files changed, 10 insertions, 7 deletions
diff --git a/src/interfaces/ecpg/test/Makefile b/src/interfaces/ecpg/test/Makefile
index 78bbcbe286..7e7f1fee07 100644
--- a/src/interfaces/ecpg/test/Makefile
+++ b/src/interfaces/ecpg/test/Makefile
@@ -1,4 +1,4 @@
-# $Header: /cvsroot/pgsql/src/interfaces/ecpg/test/Makefile,v 1.37 2003/06/25 10:44:21 meskes Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/ecpg/test/Makefile,v 1.38 2003/07/01 12:40:52 meskes Exp $
subdir = src/interfaces/ecpg/test
top_builddir = ../../../..
@@ -22,7 +22,7 @@ test_informix: test_informix.o
$(ECPG) $<
test_informix.c: test_informix.pgc
- $(ECPG) -C INFORMIX $<
+ $(ECPG) -C INFORMIX -r no_indicator $<
clean:
rm -f $(TESTS) $(TESTS:%=%.o) $(TESTS:%=%.c) log
diff --git a/src/interfaces/ecpg/test/num_test.pgc b/src/interfaces/ecpg/test/num_test.pgc
index 5b83af5bd0..7cf687c220 100644
--- a/src/interfaces/ecpg/test/num_test.pgc
+++ b/src/interfaces/ecpg/test/num_test.pgc
@@ -18,16 +18,16 @@ main()
exec sql whenever sqlerror do sqlprint();
exec sql connect to mm;
- exec sql create table test (text char(5), num decimal(14,7));
+ exec sql create table test (text char(5), num numeric(14,7));
- value1 = PGTYPESnew();
+ value1 = PGTYPESnumeric_new();
PGTYPESnumeric_from_int(1407, value1);
text = PGTYPESnumeric_to_asc(value1, 0);
printf("long = %s\n", text);
value1 = PGTYPESnumeric_from_asc("2369.7", NULL);
value2 = PGTYPESnumeric_from_asc("10.0", NULL);
- res = PGTYPESnew();
+ res = PGTYPESnumeric_new();
PGTYPESnumeric_add(value1, value2, res);
text = PGTYPESnumeric_to_asc(res, 0);
printf("add = %s\n", text);
diff --git a/src/interfaces/ecpg/test/test_informix.pgc b/src/interfaces/ecpg/test/test_informix.pgc
index 0ca4c0647f..fa0de6eb6e 100644
--- a/src/interfaces/ecpg/test/test_informix.pgc
+++ b/src/interfaces/ecpg/test/test_informix.pgc
@@ -5,7 +5,7 @@ void openit(void);
int main()
{
$int i = 14;
- $decimal j;
+ $decimal j, m, n;
FILE *dbgs;
if ((dbgs = fopen("log", "w")) != NULL)
@@ -41,7 +41,10 @@ int main()
}
}
- $delete from test where i=87;
+ deccvint(7, &j);
+ deccvint(14, &m);
+ decadd(&j, &m, &n);
+ $delete from test where i=:n;
printf("delete: %ld\n", sqlca.sqlcode);
$commit;