is there a way to configure psql or to pass in some parameter when doing query, to print out different value for null and for empty string? Currently it shows empty for both.
For example, i have a table with this content:
adventure=# select * from account
adventure-# ;
user_id | username | password | email | created_on | last_login
---------+----------+----------+-------+----------------------------+----------------------------
1 | | | | 2020-04-07 10:30:08.836098 | 2020-04-07 10:30:08.836098
(1 row)
With this, I cannot tell if username is empty string or a null. In this case, username is null, but password is empty string.
I tried using \x on
, but it's the same thing.
Of course, i could do some coalescing, but that's a bit too much if i need to do it for every column.