Missed your second question at first:
Most clients communicate with the db server via text. Depending on the format that's either the string NULL
or nothing (for instance in COPY
output or the text format of pg_dump) instead of a value.
This is completely different from how NULL
values are stored inside the database. (See added links.)