1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-27 07:42:10 +03:00

Add Oracle like handling of char arrays.

In some cases Oracle Pro*C handles char array differently than ECPG. This patch
adds a Oracle compatibility mode to make ECPG behave like Pro*C.

Patch by David Rader <davidr@openscg.com>
This commit is contained in:
Michael Meskes
2018-03-14 00:54:13 +01:00
parent db2fc801f6
commit 3b7ab43804
12 changed files with 513 additions and 5 deletions

View File

@@ -41,7 +41,7 @@ help(const char *progname)
printf(_(" -c automatically generate C code from embedded SQL code;\n"
" this affects EXEC SQL TYPE\n"));
printf(_(" -C MODE set compatibility mode; MODE can be one of\n"
" \"INFORMIX\", \"INFORMIX_SE\"\n"));
" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"));
#ifdef YYDEBUG
printf(_(" -d generate parser debug output\n"));
#endif
@@ -208,6 +208,10 @@ main(int argc, char *const argv[])
snprintf(informix_path, MAXPGPATH, "%s/informix/esql", pkginclude_path);
add_include_path(informix_path);
}
else if (strncmp(optarg, "ORACLE", strlen("ORACLE")) == 0)
{
compat = ECPG_COMPAT_ORACLE;
}
else
{
fprintf(stderr, _("Try \"%s --help\" for more information.\n"), argv[0]);