Skip to content

Conversation

The-Alchemist
Copy link

another bonus is that the index for that column is a lot smaller

another bonus is that the index for that column is a lot smaller
@ringerc
Copy link
Contributor

ringerc commented Jan 3, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants