Re: How are null's stored?

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: How are null's stored?
Date: 2003-05-12 21:04:24
Message-ID: 20030512210423.GN14881@libertyrms.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On Mon, May 12, 2003 at 01:58:03PM -0500, Ryan wrote:
> So if the internal format is identical, why does the INFERNAL database
> ignore indexes when you have a text compared to a varchar?

Because the rules for handling the two data types are not the same.
Since spaces are significant on char(n) according to the spec, you
have strange rules in their handling.

Short answer: use text. Varchar(n) if you must, to limit length.
But char(n) is almost always evil.

A

--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M2P 2A8
+1 416 646 3304 x110

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zlatko Michailov 2003-05-12 22:03:50 Scheduled jobs
Previous Message Josh Berkus 2003-05-12 20:44:43 Re: How are null's stored?

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2003-05-12 22:46:39 Re: How are null's stored?
Previous Message Josh Berkus 2003-05-12 20:44:43 Re: How are null's stored?