Hi, I’m Erika Rowland (a.k.a. erikareads). Hi, I’m Erika. I’m an Ops-shaped Software Engineer, Toolmaker, and Resilience Engineering fan. I like Elixir and Gleam, Reading, and Design. She/Her. Constellation Webring Published on Modified on

Set null Placeholder in PostgreSQL psql

By default, psql outputs null as nothing, which is easily mistaken for an empty string.

You can useRead more about the available psql commands here:

\pset null '<chosen alternative>'

This seems to be tied to a particular session of psql as it was reset when I restarted the psql session.

Unicode tangent

The impetus for finding this command came from seeing ¤ used as a null placeholder in “The Art of PostgreSQL”.

It is U+00A4 Currency SignRead more about the unicode here. used to denote an unspecified currency. I’ve never seen the symbol before, but apparently it is common enough to be in the International Reference Variant of ASCII.Thanks to Jeff for exploring PostgreSQL with me!


Constellation Webring