Re: psql: add \si, \sm, \st and \sr functions to show CREATE commands for indexes, matviews, triggers and tables - Mailing list pgsql-hackers

From a.pervushina@postgrespro.ru
Subject Re: psql: add \si, \sm, \st and \sr functions to show CREATE commands for indexes, matviews, triggers and tables
Date
Msg-id 64ea914ae88f31e9b316ef2a05c3e62c@postgrespro.ru
Whole thread Raw
In response to Re: psql: add \si, \sm, \st and \sr functions to show CREATE commands for indexes, matviews, triggers and tables  (Anna Akenteva <a.akenteva@postgrespro.ru>)
Responses Re: psql: add \si, \sm, \st and \sr functions to show CREATE commands for indexes, matviews, triggers and tables  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Anna Akenteva wrote 2020-08-11 13:37:
> 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.

I've combined most of the functions into one, as the code was mostly 
duplicated. Had to change the argument from is_func to object type, 
because the number of values has increased. I've attached a patch with 
those changes.
Attachment

pgsql-hackers by date:

Previous
From: Mark Wong
Date:
Subject: Re: doc examples for pghandler
Next
From: Alvaro Herrera
Date:
Subject: Re: COPY FREEZE and setting PD_ALL_VISIBLE/visibility map bits