Question

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?

Was it helpful?

Solution

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.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top