Make \watch respect the user's \pset null setting.
authorFujii Masao <[email protected]>
Thu, 27 Nov 2014 17:42:43 +0000 (02:42 +0900)
committerFujii Masao <[email protected]>
Thu, 27 Nov 2014 17:42:43 +0000 (02:42 +0900)
Previously \watch always ignored the user's \pset null setting.
\pset null setting should be ignored for \d and similar queries.
For those, the code can reasonably have an opinion about what
the presentation should be like, since it knows what SQL query
it's issuing. This argument surely doesn't apply to \watch,
so this commit makes \watch use the user's \pset null setting.

Back-patch to 9.3 where \watch was added.

src/bin/psql/command.c

index 4575e2e796a2c783acacce94a24770fc310136f7..62ea0440efad393b512c483de47fe12b8d74226b 100644 (file)
@@ -2868,7 +2868,6 @@ do_watch(PQExpBuffer query_buf, long sleep)
     * Set up rendering options, in particular, disable the pager, because
     * nobody wants to be prompted while watching the output of 'watch'.
     */
-   myopt.nullPrint = NULL;
    myopt.topt.pager = 0;
 
    for (;;)