1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-23 14:01:44 +03:00

Zoltan beautified his hidden-variable-patch for ecpg. This also makes sure we get an error message instead of a warning if the variable have different types.

This commit is contained in:
Michael Meskes
2010-04-01 10:30:53 +00:00
parent b2bddc2ff2
commit 1fbb06d204
4 changed files with 25 additions and 26 deletions

View File

@ -1,7 +1,7 @@
/*
* functions needed for descriptor handling
*
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/descriptor.c,v 1.33 2010/04/01 08:41:01 meskes Exp $
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/descriptor.c,v 1.34 2010/04/01 10:30:53 meskes Exp $
*
* since descriptor might be either a string constant or a string var
* we need to check for a constant if we expect a constant
@ -188,7 +188,7 @@ output_get_descr(char *desc_name, char *index)
break;
}
fprintf(yyout, "%s,", get_dtype(results->value));
ECPGdump_a_type(yyout, v->name, v->type, NULL, NULL, NULL, NULL, make_str("0"), NULL, NULL, v->brace_level, -1);
ECPGdump_a_type(yyout, v->name, v->type, v->brace_level, NULL, NULL, -1, NULL, NULL, make_str("0"), NULL, NULL);
}
drop_assignments();
fputs("ECPGd_EODT);\n", yyout);
@ -293,7 +293,7 @@ output_set_descr(char *desc_name, char *index)
case ECPGd_length:
case ECPGd_type:
fprintf(yyout, "%s,", get_dtype(results->value));
ECPGdump_a_type(yyout, v->name, v->type, NULL, NULL, NULL, NULL, make_str("0"), NULL, NULL, v->brace_level, -1);
ECPGdump_a_type(yyout, v->name, v->type, v->brace_level, NULL, NULL, -1, NULL, NULL, make_str("0"), NULL, NULL);
break;
default: