postgres.git / summary / log / commit / refs

commit    2f418e8a174136507fb1f80214415b144e24850c
Author:   Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date:     Fri Mar 11 13:44:40 2011 +0000

    In ecpg preprocessor, don't try to look up constants in the test for
    variable hiding. A constant is not a variable. It worked in most cases by
    accident, because we add constants to the global list of variables (why?),
    but float constants like 1.23 were interpreted as struct field references,
    and not found.
    
    Backpatch to 9.0, where the test for variable hiding was added.


src/interfaces/ecpg/preproc/type.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interfaces/ecpg/preproc/type.c b/src/interfaces/ecpg/preproc/type.c index eb7d4aeb9bc..1b8a2a698f4 100644 --- a/src/interfaces/ecpg/preproc/type.c +++ b/src/interfaces/ecpg/preproc/type.c @@ -245,7 +245,7 @@ ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype * type, const int bra struct variable *var; if (type->type != ECPGt_descriptor && type->type != ECPGt_sqlda && - type->type != ECPGt_char_variable && + type->type != ECPGt_char_variable && type->type != ECPGt_const && brace_level >= 0) { char *str; [parent: b42225c101e6]