summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/preproc/preproc.y
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2005-01-10 12:58:30 +0000
committerMichael Meskes <meskes@postgresql.org>2005-01-10 12:58:30 +0000
commitcc7cd8774a644bfb484ee31320e85764ba68d1e3 (patch)
tree7cde1c64f7803a5608851ac94dc4fdf2ecb1688a /src/interfaces/ecpg/preproc/preproc.y
parent89b5cbe928c3c2ce215d0a9729bd4c111b199c75 (diff)
downloadpostgresql-cc7cd8774a644bfb484ee31320e85764ba68d1e3.tar.gz
Fixed segfault in adjust_informix due to missing varchar type.
Diffstat (limited to 'src/interfaces/ecpg/preproc/preproc.y')
-rw-r--r--src/interfaces/ecpg/preproc/preproc.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y
index 02b33e8bbd..8ee348fc2f 100644
--- a/src/interfaces/ecpg/preproc/preproc.y
+++ b/src/interfaces/ecpg/preproc/preproc.y
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.302 2004/12/06 20:35:35 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.303 2005/01/10 12:58:30 meskes Exp $ */
/* Copyright comment */
%{
@@ -231,12 +231,12 @@ adjust_informix(struct arguments *list)
original_var = ptr->variable->name;
sprintf(temp, "%d))", ecpg_informix_var);
- if ((ptr->variable->type->type != ECPGt_char && ptr->variable->type->type != ECPGt_unsigned_char) && atoi(ptr->variable->type->size) > 1)
+ if ((ptr->variable->type->type != ECPGt_varchar && 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++);
}
- else if ((ptr->variable->type->type == ECPGt_char || ptr->variable->type->type == ECPGt_unsigned_char) && atoi(ptr->variable->type->size) > 1)
+ else if ((ptr->variable->type->type == ECPGt_varchar || 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->type)), make_str(" *)(ECPG_informix_get_var("), mm_strdup(temp)), ECPGmake_simple_type(ptr->variable->type->type, ptr->variable->type->size), 0);
sprintf(temp, "%d, (", ecpg_informix_var++);