Re: [HACKERS] One-shot expanded output in psql using \gx
От | Daniel Verite |
---|---|
Тема | Re: [HACKERS] One-shot expanded output in psql using \gx |
Дата | |
Msg-id | 4d84079e-325b-48c5-83e6-bb54bb567bb1@manitou-mail.org обсуждение исходный текст |
Ответ на | Re: [HACKERS] One-shot expanded output in psql using \gx (Christoph Berg <christoph.berg@credativ.de>) |
Ответы |
Re: [HACKERS] One-shot expanded output in psql using \gx
|
Список | pgsql-hackers |
Christoph Berg wrote: > The new version tests \g and \gx with a new query, and > re-running it on the last query buffer. Thanks, here's a review: The patch compiles and works as expected. The code follows the same pattern as other one-shot command modifiers, setting a flag in the global "pset" struct in exec_command() and resetting it at the end of SendQuery(). - make installcheck-world: ok - sgml doc: ok - help text: ok - includes regression tests: ok - tab-completion: works but the list in tab-complete.c:backslash_commands[] is sorted alphabetically so "\\gx" should come after "\\gset" - another nitpick: in PrintQueryTuples() it assigns a bool: + /* one-shot expanded output requested via \gx */ + if (pset.g_expanded) + my_popt.topt.expanded = true; + "expanded" is defined as a tri-valued short int (print.h:98): typedef struct printTableOpt { //.... unsigned short intexpanded; /* expanded/vertical output (if supported by * output format); 0=no, 1=yes, 2=auto */ Although there is still code that puts true/false in this variable (probably because it was a bool before?), I assume that for new code, assigning 0/1/2 should be preferred. Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite
В списке pgsql-hackers по дате отправления: