1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-07 19:06:32 +03:00

Implemented Informix special way to treat NULLs, removed warnings, synced.

This commit is contained in:
Michael Meskes
2003-06-25 10:44:21 +00:00
parent ff4c69e021
commit fd3ca524eb
20 changed files with 373 additions and 156 deletions

View File

@@ -1,4 +1,4 @@
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.73 2003/06/13 10:50:57 meskes Exp $ */
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.74 2003/06/25 10:44:21 meskes Exp $ */
/* New main for ecpg, the PostgreSQL embedded SQL precompiler. */
/* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */
@@ -20,7 +20,8 @@ extern char *optarg;
int ret_value = 0,
autocommit = false,
auto_create_c = false,
system_includes = false;
system_includes = false,
force_indicator = true;
enum COMPAT_MODE compat = ECPG_COMPAT_PGSQL;
@@ -44,8 +45,9 @@ help(const char *progname)
printf(" -d generate parser debug output\n");
#endif
printf(" -C <mode> set compatibility mode\n"
" mode may be INFORMIX only at the moment\n"
" INFORMIX mode implies '-i'\n");
" mode may be \"INFORMIX\" only at the moment\n");
printf(" -r <option> specify runtime behaviour\n"
" option may be only \"no_indicator\" at the moment\n");
printf(" -D SYMBOL define SYMBOL\n");
printf(" -I DIRECTORY search DIRECTORY for include files\n");
printf(" -o OUTFILE write result to OUTFILE\n");
@@ -132,7 +134,7 @@ main(int argc, char *const argv[])
}
}
while ((c = getopt(argc, argv, "vcio:I:tD:dC:")) != -1)
while ((c = getopt(argc, argv, "vcio:I:tD:dC:r:")) != -1)
{
switch (c)
{
@@ -177,6 +179,15 @@ main(int argc, char *const argv[])
return ILLEGAL_OPTION;
}
break;
case 'r':
if (strcmp(optarg, "no_indicator") == 0)
force_indicator = false;
else
{
fprintf(stderr, "Try '%s --help' for more information.\n", argv[0]);
return ILLEGAL_OPTION;
}
break;
case 'D':
add_preprocessor_define(optarg);
break;