aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/execute.c
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2009-08-07 10:51:21 +0000
committerMichael Meskes <meskes@postgresql.org>2009-08-07 10:51:21 +0000
commit5d34af421d99ec2c709c67ffbaee10f8c4ce822e (patch)
tree1ed07bc27deb21b918d6fee0ab36548b19797941 /src/interfaces/ecpg/ecpglib/execute.c
parent06f1f53ea9bbbcdebc228d8422182dc9da75ec73 (diff)
downloadpostgresql-5d34af421d99ec2c709c67ffbaee10f8c4ce822e.tar.gz
postgresql-5d34af421d99ec2c709c67ffbaee10f8c4ce822e.zip
Added STRING datatype for Informix compatibility mode. This work is
based on a patch send in by Böszörményi Zoltán <zb@cybertec.at>.
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/execute.c')
-rw-r--r--src/interfaces/ecpg/ecpglib/execute.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index 96aa96c4645..7df16069476 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.85 2009/06/11 14:49:13 momjian Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.86 2009/08/07 10:51:20 meskes Exp $ */
/*
* The aim is to get a simpler inteface to the database routines.
@@ -359,6 +359,7 @@ ecpg_store_result(const PGresult *results, int act_field,
{
case ECPGt_char:
case ECPGt_unsigned_char:
+ case ECPGt_string:
if (!var->varcharsize && !var->arrsize)
{
/* special mode for handling char**foo=0 */
@@ -418,7 +419,7 @@ ecpg_store_result(const PGresult *results, int act_field,
/* fill the variable with the tuple(s) */
if (!var->varcharsize && !var->arrsize &&
- (var->type == ECPGt_char || var->type == ECPGt_unsigned_char))
+ (var->type == ECPGt_char || var->type == ECPGt_unsigned_char || var->type == ECPGt_string))
{
/* special mode for handling char**foo=0 */
@@ -757,6 +758,7 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari
case ECPGt_char:
case ECPGt_unsigned_char:
+ case ECPGt_string:
{
/* set slen to string length if type is char * */
int slen = (var->varcharsize == 0) ? strlen((char *) var->value) : (unsigned int) var->varcharsize;