Re: psql: add \si, \sm, \st and \sr functions to show CREATE commands for indexes, matviews, triggers and tables
От | Anna Akenteva |
---|---|
Тема | Re: psql: add \si, \sm, \st and \sr functions to show CREATE commands for indexes, matviews, triggers and tables |
Дата | |
Msg-id | 52331028ead62418c4a883c07e3a7ff1@postgrespro.ru обсуждение исходный текст |
Ответ на | psql: add \si, \sm, \st and \sr functions to show CREATE commands for indexes, matviews, triggers and tables (a.pervushina@postgrespro.ru) |
Ответы |
Re: psql: add \si, \sm, \st and \sr functions to show CREATE commands for indexes, matviews, triggers and tables
|
Список | pgsql-hackers |
On 2020-07-28 20:46, a.pervushina@postgrespro.ru wrote: > I've attached a patch that implements \si, \sm, \st and \sr functions > that show the CREATE command for indexes, matviews, triggers and > tables. The functions are implemented similarly to the existing sf/sv > functions with some modifications. > To me these functions seem useful. As for adding them to server side, I don't see a big need for it. It feels more logical to follow the already eatablished pattern for the \s[...] commands. About the patch: 1) There is some code duplication for the exec_command_[sm|si|st|sr] functions. Plus, it seems weird to separate sm (show matview) from sv (show view). Perhaps it would be more convenient to combine some of the code? Maybe by editing the already-existing exec_command_sf_sv() function. 2) Seeing how \s and \e functions were added together, I'm wondering - should there be \e functions too for any objects affected by this patch? -- Anna Akenteva Postgres Professional: http://www.postgrespro.com The Russian Postgres Company
В списке pgsql-hackers по дате отправления: