2ndQuadrant / audit-trigger

Simple, easily customised trigger-based auditing for PostgreSQL (Postgres). See also pgaudit.
Other
657 stars 241 forks source link

action column is char(1) instead of text #10

Open The-Alchemist opened 9 years ago

The-Alchemist commented 9 years ago

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

ringerc commented 5 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.