Re:Why PostgreSQL doesn't have query hints
by brlewis on Friday February 04, 2011 @11:24AM
(#2179958)
Could you say more about the problems using text for enums? I use varchar(4) primary keys in some small lookup tables now. Didn't postgresql only introduce the enum type in 8.3?
[ Parent
| on HN ]
Re:Why PostgreSQL doesn't have query hints
by mcfunley on Friday February 04, 2011 @12:27PM
(#2180222)
By 'enum' I meant in the more general sense, a constrained set of a few values. In our case the original schema designer used a text column for states: 'active,' 'dead,' etc. The planner would generally guess incorrectly about the range of values it might expect to find in a text column like that and working around it required hand fiddling.
(Disclaimer: forgive me, it's been a few years since I've had to deal with this specific problem, some of the details may be off.)