Open The-Alchemist opened 9 years ago
char(1)
isn't any smaller, that's a misunderstanding. If you want a compact 1-byte field you would need to use the data type bpchar
or "char"
(note the quotes).
Whether it actually saves any space depends on its position in the table and the needed padding.
You can check with pageinspect
.
I won't merge this as-is. If you fix it and show it saves space then I'll merge. But really this is long overdue for conversion to jsonb.
another bonus is that the index for that column is a lot smaller