Re: SHOW CREATE

Поиск
Список
Период
Сортировка
От Corey Huinker
Тема Re: SHOW CREATE
Дата
Msg-id CADkLM=dNH5eL8AC6yDOUTehOhNbpu9GY75=OFAc0-C18ThCv1g@mail.gmail.com
обсуждение исходный текст
Ответ на SHOW CREATE  (David Fetter <david@fetter.org>)
Ответы Re: SHOW CREATE  (Michael Glaesemann <grzm@seespotcode.net>)
Re: SHOW CREATE  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Fri, Jul 5, 2019 at 12:32 PM David Fetter <david@fetter.org> wrote:
Folks,

Corey Huinker put together the documentation for this proposed
feature. Does this seem like a reasonable way to do it?


In doing that work, it became clear that the command was serving two masters:
1. A desire to see the underlying nuts and bolts of a given database object.
2. A desire to essentially make the schema portion of pg_dump a server side command.

To that end, I see splitting this into two commands, SHOW CREATE and SHOW DUMP.

SHOW DUMP would the original command minus the object type and object name specifier, and it would dump the entire current database as seen from the current user (again, no data).

SHOW CREATE would still have all the object_type parameters as before, but would only dump the one specified object, plus any dependent objects specified in the WITH options (comments, grants, indexes, constraints, partitions, all).

Please note that any talk of a server side DESCRIBE is separate from this. That would be a series of commands that would have result sets tailored to the object type, and each one would be an inherent compromise between completeness and readability.

I'd like to hear what others have to say, and incorporate that feedback into a follow up proposal.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Fix runtime errors from -fsanitize=undefined
Следующее
От: Paul A Jungwirth
Дата:
Сообщение: Re: range_agg