On Wed, Jul 26, 2006 at 11:09:22AM -0700, Redefined Horizons wrote: > I'm trying to come up with some good rules of thumb that can help me > determine when it is practical to implement a custom type on > PostgreSQL.
To me a custom datatype is useful when there is a set of values where you have operations that map to other values in the set. So numbers and strings are good because you have operations on them that produce more numbers and strings. Your example with angles is good also, since you can add and subtract them. Timestamps, intervals and geometric types are also good. Most things in the world don't work that way: you can't take two customers and make a third. I'm sure there's a mathematical way to express this better but I hope this helps, Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate.
signature.asc
Description: Digital signature