diff options
author | Bruce Momjian <bruce@momjian.us> | 2001-05-08 17:06:18 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2001-05-08 17:06:18 +0000 |
commit | 296e7ba2ba27847a152d77a41115e2f1db240779 (patch) | |
tree | 481398f1932cd3546b8cef8c76db4a163656c101 /src/interfaces/odbc/tuple.c | |
parent | 062a79a9900e7012e0eada333f209203ed433b31 (diff) | |
download | postgresql-296e7ba2ba27847a152d77a41115e2f1db240779.tar.gz postgresql-296e7ba2ba27847a152d77a41115e2f1db240779.zip |
ODBC source code cleanup patch. Should match rest of PostgreSQL code better.
Diffstat (limited to 'src/interfaces/odbc/tuple.c')
-rw-r--r-- | src/interfaces/odbc/tuple.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/interfaces/odbc/tuple.c b/src/interfaces/odbc/tuple.c index e12f2fc55e9..658b7a75ec7 100644 --- a/src/interfaces/odbc/tuple.c +++ b/src/interfaces/odbc/tuple.c @@ -1,23 +1,27 @@ -/* Module: tuple.c +/*------- + * Module: tuple.c * - * Description: This module contains functions for setting the data for individual - * fields (TupleField structure) of a manual result set. + * Description: This module contains functions for setting the data + * for individual fields (TupleField structure) of a + * manual result set. * - * Important Note: These functions are ONLY used in building manual result sets for - * info functions (SQLTables, SQLColumns, etc.) + * Important Note: These functions are ONLY used in building manual + * result sets for info functions (SQLTables, + * SQLColumns, etc.) * * Classes: n/a * * API functions: none * * Comments: See "notice.txt" for copyright and license information. - * + *------- */ #include "tuple.h" #include <string.h> #include <stdlib.h> + void set_tuplefield_null(TupleField *tuple_field) { @@ -25,6 +29,7 @@ set_tuplefield_null(TupleField *tuple_field) tuple_field->value = NULL; /* strdup(""); */ } + void set_tuplefield_string(TupleField *tuple_field, char *string) { @@ -39,7 +44,6 @@ set_tuplefield_int2(TupleField *tuple_field, Int2 value) { char buffer[10]; - sprintf(buffer, "%d", value); tuple_field->len = strlen(buffer) + 1; @@ -47,6 +51,7 @@ set_tuplefield_int2(TupleField *tuple_field, Int2 value) tuple_field->value = strdup(buffer); } + void set_tuplefield_int4(TupleField *tuple_field, Int4 value) { |