On 2020-07-28 20:46, a.pervush...@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


Reply via email to