pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephan Szabo <sszabo@megazone23.bigpanda.com>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: Ryan <pgsql-performance@seahat.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: How are null's stored?
Date: Mon, 12 May 2003 19:50:24 -0400
Message-ID: <24826.1052783424@sss.pgh.pa.us> (raw)
In-Reply-To: <20030512160355.L17085-100000@megazone23.bigpanda.com>
References: <20030512160355.L17085-100000@megazone23.bigpanda.com>

Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> All in all, I'm not sure what the semantic differences between a varchar
> with no length specified and a text are in PostgreSQL actually and if the
> whole thing could be simplified in some way that doesn't break backwards
> compatibility.

Yeah, I've been wondering about that too.  A large part of the problem
is that varchar has its own set of operators, which the planner has no
right to assume behave exactly like the text ones ... but they do.  It
might work to rip out the redundant varchar operators and allow indexes
on varchar to become truly textual indexes (ie, they'd be text_ops not
varchar_ops opclass).  There might be a few tweaks needed to get the
planner to play nice with indexes that require implicit coercions, but
I think it could be made to work.

Another idea that has been rattling around is to stop treating bpchar as
binary-equivalent to text, and in fact to make bpchar-to-text promotion
go through rtrim() to eliminate padding spaces.

I think this stuff got put on hold because we haven't been able to come
up with a good solution for the comparable problems in the numeric
datatype hierarchy.  But bpchar/varchar/text is a lot simpler problem,
and maybe could be solved with the tools we have in place already.

			regards, tom lane




view thread (9+ messages)  latest in thread

Message-ID: <24826.1052783424@sss.pgh.pa.us>
Permalink:  ../24826.1052783424@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24826.1052783424@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, sszabo@megazone23.bigpanda.com, josh@agliodbs.com, pgsql-performance@seahat.com
  Subject: Re: How are null's stored?
  In-Reply-To: <24826.1052783424@sss.pgh.pa.us>
  References: <20030512160355.L17085-100000@megazone23.bigpanda.com> <24826.1052783424@sss.pgh.pa.us>

* 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