Make \watch respect the user's \pset null setting.
authorFujii Masao <fujii@postgresql.org>
Thu, 27 Nov 2014 17:42:43 +0000 (02:42 +0900)
committerFujii Masao <fujii@postgresql.org>
Thu, 27 Nov 2014 17:44:40 +0000 (02:44 +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 21cddd11ccfbade99acbcaa45002abbe09acc575..ad503749e529b879194c786fc449ed73e42f8895 100644 (file)
@@ -2585,7 +2585,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 (;;)