1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-31 17:02:12 +03:00

- Fixed order mismatch in processing "using" arguments.

- Fixed some minor things in test cases.
- Use defines for Informix error codes.
This commit is contained in:
Michael Meskes
2003-09-22 13:19:39 +00:00
parent 8839b85ed8
commit 22c0b1f0f4
7 changed files with 89 additions and 66 deletions

View File

@@ -22,18 +22,18 @@ main()
value1 = PGTYPESnumeric_new();
PGTYPESnumeric_from_int(1407, value1);
text = PGTYPESnumeric_to_asc(value1, 0);
text = PGTYPESnumeric_to_asc(value1, -1);
printf("long = %s\n", text);
value1 = PGTYPESnumeric_from_asc("2369.7", NULL);
value2 = PGTYPESnumeric_from_asc("10.0", NULL);
res = PGTYPESnumeric_new();
PGTYPESnumeric_add(value1, value2, res);
text = PGTYPESnumeric_to_asc(res, 0);
text = PGTYPESnumeric_to_asc(res, -1);
printf("add = %s\n", text);
PGTYPESnumeric_sub(res, value2, res);
text = PGTYPESnumeric_to_asc(res, 0);
text = PGTYPESnumeric_to_asc(res, -1);
printf("sub = %s\n", text);
PGTYPESnumeric_copy(res, &des);
@@ -45,12 +45,12 @@ main()
exec sql select num into :des from test where text = 'test';
PGTYPESnumeric_mul(res, &des, res);
text = PGTYPESnumeric_to_asc(res, 0);
text = PGTYPESnumeric_to_asc(res, -1);
printf("mul = %s\n", text);
value2 = PGTYPESnumeric_from_asc("10000", NULL);
PGTYPESnumeric_div(res, value2, res);
text = PGTYPESnumeric_to_asc(res, 0);
text = PGTYPESnumeric_to_asc(res, -1);
PGTYPESnumeric_to_double(res, &d);
printf("div = %s %e\n", text, d);