Re: How to modify ENUM datatypes?

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: "D(dot) Dante Lorenso" <dante(at)lorenso(dot)com>
Cc: "Andreas 'ads' Scherbaum" <adsmail(at)wars-nicht(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: How to modify ENUM datatypes?
Date: 2008-04-22 21:28:22
Message-ID: 20080422142822.4b247c78@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 22 Apr 2008 15:45:39 -0500
"D. Dante Lorenso" <dante(at)lorenso(dot)com> wrote:

> I was really hoping that it would be more efficient to not have to do
> all the foreign keys and joins for tables that may have 4-5 enum
> types.
>
> Just being able to:
>
> SELECT *
> FROM tablename
>
> would be nice if my columns contained enums instead of doing:
>
> SELECT *
> FROM tablename, lookuptable
> WHERE tablename.some_id = lookuptable.some_id
>
> Isn't the join more expensive?

You were using natural keys, the join would not be required.

Joshua D. Drake

>
> -- Dante
>

--
The PostgreSQL Company since 1997: http://www.commandprompt.com/
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John DeSoi 2008-04-22 21:33:32 Re: Schema migration tools?
Previous Message Scott Marlowe 2008-04-22 21:18:47 Re: Rapidly decaying performance repopulating a large table