Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2PLExw66146 for ; Sun, 25 Mar 2001 16:14:59 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f2PLEpw19432; Sun, 25 Mar 2001 16:14:51 -0500 (EST) To: peter@schoenster.com cc: pgsql-sql@postgresql.org Subject: Re: CHAR or VARCHAR In-reply-to: <3ABA1025.26143.F5F9331@localhost> References: <01032208051900.07158@math.unl.edu.ar> <3ABA1025.26143.F5F9331@localhost> Comments: In-reply-to "Peter J. Schoenster" message dated "Thu, 22 Mar 2001 14:45:57 -0700" Date: Sun, 25 Mar 2001 16:14:51 -0500 Message-ID: <19429.985554891@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200103/498 X-Sequence-Number: 2169 "Peter J. Schoenster" writes: > On 22 Mar 2001, at 10:05, Tom Lane wrote: >> There is *no* performance advantage of CHAR(n) over VARCHAR(n). > I wonder if this question of char/varchar is postgresql specific or > rdbms in general. It's definitely RDBMS-specific. My comment applied to Postgres, which stores CHAR(n) and VARCHAR(n) in essentially the same fashion --- it doesn't really exploit the fact that CHAR(n) is fixed-size. (Mainly because it's *not* fixed size in PG, what with TOAST, multibyte, etc.) On other DBMSes there could be a difference, especially if the DBMS has performance problems with variable-length fields. regards, tom lane