Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id EA1C7474E42 for ; Mon, 15 Apr 2002 22:51:10 -0400 (EDT) Received: from [63.195.55.98] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9) with HTTP id 1371907; Mon, 15 Apr 2002 19:51:11 -0700 From: "Josh Berkus" Subject: Re: please advise on column data type To: "jack" , X-Mailer: CommuniGate Pro Web Mailer v.3.5.9 Date: Mon, 15 Apr 2002 19:51:11 -0700 Message-ID: In-Reply-To: <003b01c1e4e5$89c2c010$1400a8c0@jac> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200204/200 X-Sequence-Number: 7464 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