Re: Simple 'type' question

From: "Tim Barnard" <tbarnard(at)povn(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Simple 'type' question
Date: 2002-01-25 00:11:23
Message-ID: 01a601c1a534$d2e9baa0$a519af3f@hartcomm.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks Tom.

Tim Barnard
S.E. Mgr
Hartford Communications Corporation

----- Original Message -----
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Tim Barnard" <tbarnard(at)povn(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Sent: Thursday, January 24, 2002 3:51 PM
Subject: Re: [GENERAL] Simple 'type' question

> "Tim Barnard" <tbarnard(at)povn(dot)com> writes:
> > When creating a table with a primary key that can contain any varying
> > sequence of alphanumeric characters, is it best to use the 'text' type
or
> > the 'varchar' type?
>
> If you want a specific upper limit on the string length, use varchar.
> If that's not needed, use text. The only difference in performance
> AFAIK is the extra function call per insert/update for the routine that
> enforces the varchar limit.
>
> regards, tom lane
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Elein 2002-01-25 00:29:17 Yet another optimizer index choosing questions
Previous Message Tom Lane 2002-01-24 23:53:12 Re: Is there a drawback when changing NAMEDATALEN to 64?