Implement enum type for guc parameters, and convert a couple of existing
Magnus Hagander <magnus@hagander.net>
Implement enum type for guc parameters, and convert a couple of existing variables to it. More need to be converted, but I wanted to get this in before it conflicts with too much... Other than just centralising the text-to-int conversion for parameters, this allows the pg_settings view to contain a list of available options and allows an error hint to show what values are allowed.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/catalogs.sgml | modified | +9 −3 |
| doc/src/sgml/config.sgml | modified | +3 −2 |
| src/backend/catalog/system_views.sql | modified | +2 −2 |
| src/backend/tcop/postgres.c | modified | +2 −2 |
| src/backend/utils/error/elog.c | modified | +2 −2 |
| src/backend/utils/misc/guc.c | modified | +389 −218 |
| src/include/tcop/tcopprot.h | modified | +2 −2 |
| src/include/utils/elog.h | modified | +2 −2 |
| src/include/utils/guc.h | modified | +2 −1 |
| src/include/utils/guc_tables.h | modified | +26 −2 |
| src/test/regress/expected/rules.out | modified | +1 −1 |