mirror of
https://github.com/postgres/postgres.git
synced 2025-09-05 02:22:28 +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:
@@ -1,4 +1,4 @@
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/variable.c,v 1.55 2010/04/01 08:41:01 meskes Exp $ */
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/variable.c,v 1.56 2010/04/01 10:30:53 meskes Exp $ */
|
||||
|
||||
#include "postgres_fe.h"
|
||||
|
||||
@@ -22,7 +22,7 @@ new_variable(const char *name, struct ECPGtype * type, int brace_level)
|
||||
}
|
||||
|
||||
static struct variable *
|
||||
find_struct_member(const char *name, char *str, struct ECPGstruct_member * members, int brace_level)
|
||||
find_struct_member(char *name, char *str, struct ECPGstruct_member * members, int brace_level)
|
||||
{
|
||||
char *next = strpbrk(++str, ".-["),
|
||||
*end,
|
||||
@@ -444,10 +444,9 @@ dump_variables(struct arguments * list, int mode)
|
||||
dump_variables(list->next, mode);
|
||||
|
||||
/* Then the current element and its indicator */
|
||||
ECPGdump_a_type(yyout, list->variable->name, list->variable->type,
|
||||
list->indicator->name, list->indicator->type,
|
||||
NULL, NULL, make_str("0"), NULL, NULL,
|
||||
list->variable->brace_level, list->indicator->brace_level);
|
||||
ECPGdump_a_type(yyout, list->variable->name, list->variable->type, list->variable->brace_level,
|
||||
list->indicator->name, list->indicator->type, list->indicator->brace_level,
|
||||
NULL, NULL, make_str("0"), NULL, NULL);
|
||||
|
||||
/* Then release the list element. */
|
||||
if (mode != 0)
|
||||
|
Reference in New Issue
Block a user