pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: How are null's stored?
Date: Mon, 12 May 2003 17:04:24 -0400
Message-ID: <20030512210423.GN14881@libertyrms.info> (raw)
In-Reply-To: <10995.65.102.128.233.1052765883.squirrel@fordparts.com>
References: <20030512190156.GA40542@flake.decibel.org>
	<200305121344.43288.josh@agliodbs.com>
	<10995.65.102.128.233.1052765883.squirrel@fordparts.com>

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@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110




view thread (9+ messages)  latest in thread

Message-ID: <20030512210423.GN14881@libertyrms.info>
Permalink:  ../20030512210423.GN14881@libertyrms.info/
Also on:    postgresql.org/message-id/20030512210423.GN14881@libertyrms.info

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: andrew@libertyrms.info
  Subject: Re: How are null's stored?
  In-Reply-To: <20030512210423.GN14881@libertyrms.info>
  References: <20030512190156.GA40542@flake.decibel.org> <200305121344.43288.josh@agliodbs.com> <10995.65.102.128.233.1052765883.squirrel@fordparts.com> <20030512210423.GN14881@libertyrms.info>

* 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