text vs varchar(n)

From: Richard Emberson <emberson(at)phc(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: text vs varchar(n)
Date: 2002-02-18 05:52:30
Message-ID: 3C70969E.1C87D77@phc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Couple of questions:

If ones sets up the db to be UNICODE, does that also apply to the 'text'
type?

Which is faster read and write, a table with text or varchar types:

create table text_table (
id bigint,
value text
);

or

create table varchar_table(
id bigint,
value varchar(1024)
);

Why would one every use varchar(n) instead of text (aside from non-sql
standard)?

Thanks.

Richard

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Einar Karttunen 2002-02-18 05:54:39 Re: text vs varchar(n)
Previous Message Tom Lane 2002-02-18 05:38:26 Re: calculating spherical distance in sql