pgsql: Add infrastructure for pg_get_*_ddl functions
| От | Andrew Dunstan |
|---|---|
| Тема | pgsql: Add infrastructure for pg_get_*_ddl functions |
| Дата | |
| Msg-id | E1w9OzU-0035r4-1E@gemulon.postgresql.org обсуждение |
| Список | pgsql-committers |
Add infrastructure for pg_get_*_ddl functions Add parse_ddl_options(), append_ddl_option(), and append_guc_value() helper functions in a new ddlutils.c file that provide common option parsing and output formatting for the pg_get_*_ddl family of functions which will follow in later patches. These accept VARIADIC text arguments as alternating name/value pairs. Callers declare an array of DdlOption descriptors specifying the accepted option names and their types (boolean, text, or integer). parse_ddl_options() matches each supplied pair against the array, validates the value, and fills in the result fields. This descriptor-based scheme is based on an idea from Euler Taveira. This is placed in a new ddlutils.c file which will contain the pg_get_*_ddl functions. Author: Akshay Joshi <akshay.joshi@enterprisedb.com> Co-authored-by: Andrew Dunstan <andrew@dunslane.net> Co-authored-by: Euler Taveira <euler@eulerto.com> Discussion: https://postgr.es/m/CAKWEB6rmnmGKUA87Zmq-s=b3Scsnj02C0kObQjnbL2ajfPWGEw@mail.gmail.com Discussion: https://postgr.es/m/4c5f895e-3281-48f8-b943-9228b7da6471@gmail.com Discussion: https://postgr.es/m/CANxoLDc6FHBYJvcgOnZyS+jF0NUo3Lq_83-rttBuJgs9id_UDg@mail.gmail.com Discussion: https://postgr.es/m/e247c261-e3fb-4810-81e0-a65893170e94@dunslane.net Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/4881981f92024e4db6249bd3dc96a3859638a665 Modified Files -------------- src/backend/utils/adt/Makefile | 1 + src/backend/utils/adt/ddlutils.c | 275 ++++++++++++++++++++++++++++++++++++++ src/backend/utils/adt/meson.build | 1 + src/tools/pgindent/typedefs.list | 4 +- 4 files changed, 280 insertions(+), 1 deletion(-)
В списке pgsql-committers по дате отправления: