From: Josh Berkus <josh@agliodbs.com>
To: jack <datactrl@tpg.com.au>
To: pgsql-sql@postgresql.org
Subject: Re: please advise on column data type
Date: Mon, 15 Apr 2002 19:51:11 -0700
Message-ID: <web-1371907@davinci.ethosmedia.com> (raw)
In-Reply-To: <003b01c1e4e5$89c2c010$1400a8c0@jac>
Jack,
Please post your questions to PGSQL-NOVICE in the future. That is the
more appropriate venue for your type of question. PGSQL-SQL is more
appropriate for advanced SQL questions and arguments about the SQL-92
standard.
> When I create a table can I always use the rule, use VARCHAR for all
> variable length string data and use CHAR for only fixed length string
> data.
> Or I have to consider if the column will be set as an index or
> primary key,
> it would be better to use CHAR for better performance.
In some databases, yes. However, in PostgreSQL, there is no
performance difference between CHAR, VARCHAR, and TEXT. So use what's
appropriate for the data being stored.
-Josh Berkus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, datactrl@tpg.com.au
Subject: Re: please advise on column data type
In-Reply-To: <web-1371907@davinci.ethosmedia.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox