aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-03-11 15:44:40 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-03-11 17:27:57 +0200
commit30e8b3e58ed56cbc07ae7cd392ee4b9782178ca5 (patch)
treee7e110393b1129a7937badde50d5263f086cd722 /src
parent59bacbe1470b7b3c4382284301267b18daf98e93 (diff)
downloadpostgresql-30e8b3e58ed56cbc07ae7cd392ee4b9782178ca5.tar.gz
postgresql-30e8b3e58ed56cbc07ae7cd392ee4b9782178ca5.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/preproc/type.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/preproc/type.c b/src/interfaces/ecpg/preproc/type.c
index b0ad60e7a08..f467a7f9c90 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;