Do null
columns consume the same space on disk as when transferred over the network to a client?
How wide, in bytes, is a null
column in a table in a PostgreSQL database?
Do null
columns consume the same space on disk as when transferred over the network to a client?
How wide, in bytes, is a null
column in a table in a PostgreSQL database?
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.)