]> granicus.if.org Git - postgresql/commitdiff
Made ecpg compatibility mode and run-time behaviour options case insensitive.
authorMichael Meskes <meskes@postgresql.org>
Tue, 2 Jul 2019 01:34:58 +0000 (03:34 +0200)
committerMichael Meskes <meskes@postgresql.org>
Wed, 3 Jul 2019 01:17:06 +0000 (03:17 +0200)
src/interfaces/ecpg/preproc/ecpg.c

index e60d2be9a36cf715a362369a2da481173349fad8..16bac221f51c8f85d735f273b8e3fb01440f17b4 100644 (file)
@@ -251,7 +251,7 @@ 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)
+                               else if (pg_strcasecmp(optarg, "ORACLE") == 0)
                                {
                                        compat = ECPG_COMPAT_ORACLE;
                                }
@@ -262,11 +262,11 @@ main(int argc, char *const argv[])
                                }
                                break;
                        case 'r':
-                               if (strcmp(optarg, "no_indicator") == 0)
+                               if (pg_strcasecmp(optarg, "no_indicator") == 0)
                                        force_indicator = false;
-                               else if (strcmp(optarg, "prepare") == 0)
+                               else if (pg_strcasecmp(optarg, "prepare") == 0)
                                        auto_prepare = true;
-                               else if (strcmp(optarg, "questionmarks") == 0)
+                               else if (pg_strcasecmp(optarg, "questionmarks") == 0)
                                        questionmarks = true;
                                else
                                {