|
10 | 10 | * Written by Peter Eisentraut <peter_e@gmx.net>. |
11 | 11 | * |
12 | 12 | * IDENTIFICATION |
13 | | - * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.490 2009/01/06 16:39:52 tgl Exp $ |
| 13 | + * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.491 2009/01/07 22:40:49 tgl Exp $ |
14 | 14 | * |
15 | 15 | *-------------------------------------------------------------------- |
16 | 16 | */ |
@@ -311,6 +311,23 @@ static const struct config_enum_entry backslash_quote_options[] = { |
311 | 311 | {NULL, 0, false} |
312 | 312 | }; |
313 | 313 |
|
| 314 | +/* |
| 315 | + * Although only "on", "off", and "partition" are documented, we |
| 316 | + * accept all the likely variants of "on" and "off". |
| 317 | + */ |
| 318 | +static const struct config_enum_entry constraint_exclusion_options[] = { |
| 319 | + {"partition", CONSTRAINT_EXCLUSION_PARTITION, false}, |
| 320 | + {"on", CONSTRAINT_EXCLUSION_ON, false}, |
| 321 | + {"off", CONSTRAINT_EXCLUSION_OFF, false}, |
| 322 | + {"true", CONSTRAINT_EXCLUSION_ON, true}, |
| 323 | + {"false", CONSTRAINT_EXCLUSION_OFF, true}, |
| 324 | + {"yes", CONSTRAINT_EXCLUSION_ON, true}, |
| 325 | + {"no", CONSTRAINT_EXCLUSION_OFF, true}, |
| 326 | + {"1", CONSTRAINT_EXCLUSION_ON, true}, |
| 327 | + {"0", CONSTRAINT_EXCLUSION_OFF, true}, |
| 328 | + {NULL, 0, false} |
| 329 | +}; |
| 330 | + |
314 | 331 | /* |
315 | 332 | * Options for enum values stored in other modules |
316 | 333 | */ |
@@ -635,15 +652,6 @@ static struct config_bool ConfigureNamesBool[] = |
635 | 652 | &enable_hashjoin, |
636 | 653 | true, NULL, NULL |
637 | 654 | }, |
638 | | - { |
639 | | - {"constraint_exclusion", PGC_USERSET, QUERY_TUNING_OTHER, |
640 | | - gettext_noop("Enables the planner to use constraints to optimize queries."), |
641 | | - gettext_noop("Child table scans will be skipped if their " |
642 | | - "constraints guarantee that no rows match the query.") |
643 | | - }, |
644 | | - &constraint_exclusion, |
645 | | - false, NULL, NULL |
646 | | - }, |
647 | 655 | { |
648 | 656 | {"geqo", PGC_USERSET, QUERY_TUNING_GEQO, |
649 | 657 | gettext_noop("Enables genetic query optimization."), |
@@ -2521,6 +2529,17 @@ static struct config_enum ConfigureNamesEnum[] = |
2521 | 2529 | NOTICE, client_message_level_options, NULL, NULL |
2522 | 2530 | }, |
2523 | 2531 |
|
| 2532 | + { |
| 2533 | + {"constraint_exclusion", PGC_USERSET, QUERY_TUNING_OTHER, |
| 2534 | + gettext_noop("Enables the planner to use constraints to optimize queries."), |
| 2535 | + gettext_noop("Table scans will be skipped if their constraints" |
| 2536 | + " guarantee that no rows match the query.") |
| 2537 | + }, |
| 2538 | + &constraint_exclusion, |
| 2539 | + CONSTRAINT_EXCLUSION_PARTITION, constraint_exclusion_options, |
| 2540 | + NULL, NULL |
| 2541 | + }, |
| 2542 | + |
2524 | 2543 | { |
2525 | 2544 | {"default_transaction_isolation", PGC_USERSET, CLIENT_CONN_STATEMENT, |
2526 | 2545 | gettext_noop("Sets the transaction isolation level of each new transaction."), |
|
0 commit comments