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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user