News for hackers. Stuff that matters.
Re:Cost of a Join by davidgould on Wednesday August 15, 2018 @05:38AM (#17764752)
I was really excited when enums were added to postgresql. But after a couple years of experience I stopped recommending them. Enums are a type. Which is fine, but if you have several different enum types used in different tables it can complicate moving data between databases as you can't simply pg_dump/pg_restore one table to a different database, you also have to create all the types used by that table, ie the enums. Which turns a simple

pg_dump -t atable | psql -d otherdb

into an exercise querying pg_depend, pg_enum and the other catalogs or hand parsing pg_dump schema output. If your operation does any amount of ad-hoc ETL you may find enums more trouble than they are worth.

There are no comments on this comment yet.