Re: primary keys as TEXT

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Manlio Perillo <manlio_perillo(at)libero(dot)it>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: primary keys as TEXT
Date: 2006-07-28 19:34:34
Message-ID: 1154115274.31664.132.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, 2006-07-28 at 03:37, Manlio Perillo wrote:
> Hi.
>
> There can be performancs problems in having primary keys of type TEXT?
> What about having a primary key of 3 columns (all of type TEXT)?

The biggest problem with using text as a primary key or foreign key is
that text types are locale dependent, so that you might get one
behaviour on one server and another behaviour on another, depending on
configuration of the locale and the locale support on that machine.

For instance, if you have a locale that says that E and e are
equivalent, and another locale that says they aren't...

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Manlio Perillo 2006-07-28 20:06:01 Re: primary keys as TEXT
Previous Message Aaron Bono 2006-07-28 19:28:14 Re: primary keys as TEXT