On Wed, 2023-08-30 at 12:00 +0200, Peter J. Holzer wrote: > On 2023-08-29 14:44:48 -0600, Stuart McGraw wrote: > > On 8/29/23 13:27, Tom Lane wrote: > > > Fixing \dp to honor "\pset null" for this might be a reasonable > > > thing to do too. I'm actually a bit surprised that that doesn't > > > work already. > > > > That change would still require someone using \dp to realize that > > the "Access privileges" value could be either '' or NULL (I guess > > that could be pointed out more obviously in the psql doc), and then > > do a '\pset null' before doing \dp? That seems a little inconvenient. > > Or just always do a \pset null. For me printing NULL the same as an > empty string is just as confusing in normal tables, so that's the first > line in my ~/.psqlrc. YMMV, of course. > > But I guess the point is that people who do \pset null expect to be able > to distinguish '' and NULL visually and might be surprised if that > doesn't work everywhere, while people who don't \pset null know that '' > and NULL are visually indistinguishable and that they may need some > other way to distinguish them if the difference matters. > > So +1 for me fixing \dp to honor "\pset null".
+1 Here is a patch that does away with the special handling of NULL values in psql backslash commands. Yours, Laurenz Albe