Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 21BE5475DAD; Tue, 8 Oct 2002 03:21:01 -0400 (EDT) Received: from svana.org (t1-1-076.dialup.apex.net.au [203.20.62.76]) by postgresql.org (Postfix) with ESMTP id 50161475D93; Tue, 8 Oct 2002 03:21:00 -0400 (EDT) Received: from kleptog by svana.org with local (Exim 3.35 #1 (Debian)) id 17yoff-0000MV-00; Tue, 08 Oct 2002 17:20:47 +1000 Date: Tue, 8 Oct 2002 17:20:47 +1000 From: Martijn van Oosterhout To: Shridhar Daithankar Cc: pgsql-hackers@postgresql.org, pgsql-general , pgsql-performance@postgresql.org Subject: Re: [pgsql-performance] Large databases, performance Message-ID: <20021008072047.GB558@svana.org> Reply-To: Martijn van Oosterhout Mail-Followup-To: Shridhar Daithankar , pgsql-hackers@postgresql.org, pgsql-general , pgsql-performance@postgresql.org References: <3DA1E50F.4394.107FF85D@localhost> <3DA2BE03.3674.13CF7DD1@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3DA2BE03.3674.13CF7DD1@localhost> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/427 X-Sequence-Number: 31425 On Tue, Oct 08, 2002 at 11:14:11AM +0530, Shridhar Daithankar wrote: > On 7 Oct 2002 at 11:21, Tom Lane wrote: > > > "Shridhar Daithankar" writes: > > > I say if it's a char field, there should be no indicator of length as > > > it's not required. Just store those many characters straight ahead.. > > > > Your assumption fails when considering UNICODE or other multibyte > > character encodings. > > Correct but is it possible to have real char string when database is not > unicode or when locale defines size of char, to be exact? > > In my case varchar does not make sense as all strings are guaranteed to be of > defined length. While the argument you have put is correct, it's causing a disk > space leak, to say so. Well, maybe. But since 7.1 or so char() and varchar() simply became text with some length restrictions. This was one of the reasons. It also simplified a lot of code. -- Martijn van Oosterhout http://svana.org/kleptog/ > There are 10 kinds of people in the world, those that can do binary > arithmetic and those that can't.