Re: text vs varchar

From: Wei Weng <wweng(at)kencast(dot)com>
To: josh(at)agliodbs(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: text vs varchar
Date: 2002-06-18 23:49:50
Message-ID: 1024444191.16918.6.camel@Monet
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, 2002-06-18 at 18:59, Josh Berkus wrote:
> Wei,
>
> > Is there any disadvantage of using TEXT datatype as opposed to a VARCHAR
> > datatype with a maximum length, especially when I do searches on them?
>
> Yes. You can't index TEXT because it's of potentially unlimited length.
>
> --
> -Josh Berkus
>
>
I noticed that it is a characteristics of MS SQL Server, but I did
successfully create unique index based on a TEXT field in Postgresql
7.2, while that failed in MS SQL Server (7).

Or do they behave the same in this aspect?

Thanks

--
Wei Weng
Network Software Engineer
KenCast Inc.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Kevin Brannen 2002-06-19 00:16:35 is it easy to change the create sequence algorithm?
Previous Message Michelle Murrain 2002-06-18 23:31:46 Re: text vs varchar