]> granicus.if.org Git - postgresql/commitdiff
Just another bug in adjust_informix.
authorMichael Meskes <meskes@postgresql.org>
Mon, 10 May 2004 13:46:39 +0000 (13:46 +0000)
committerMichael Meskes <meskes@postgresql.org>
Mon, 10 May 2004 13:46:39 +0000 (13:46 +0000)
src/interfaces/ecpg/preproc/preproc.y

index 51a6824a79f50b84ba88a46c93c93d2ba6bc51cf..afa0aaed47048aa76f3838a06e8910fc8e958441 100644 (file)
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.263.2.12 2004/05/07 13:43:29 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.263.2.13 2004/05/10 13:46:39 meskes Exp $ */
 
 /* Copyright comment */
 %{
@@ -209,7 +209,7 @@ adjust_informix(struct arguments *list)
                original_var = ptr->variable->name;
                sprintf(temp, "%d))", ecpg_informix_var);
                
-               if (atoi(ptr->variable->type->size) > 1)
+               if ((ptr->variable->type->type != ECPGt_char && ptr->variable->type->type != ECPGt_unsigned_char) && atoi(ptr->variable->type->size) > 1)
                {
                        ptr->variable = new_variable(cat_str(4, make_str("("), mm_strdup(ECPGtype_name(ptr->variable->type->u.element->type)), make_str(" *)(ECPG_informix_get_var("), mm_strdup(temp)), ECPGmake_array_type(ECPGmake_simple_type(ptr->variable->type->u.element->type, make_str("1")), ptr->variable->type->size), 0);
                        sprintf(temp, "%d, (", ecpg_informix_var++);