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: Tue, 13 May 2003 16:16:10 -0400
Message-ID: <28558.1052856970@sss.pgh.pa.us> (raw)
In-Reply-To: <20030513123355.B29586-100000@megazone23.bigpanda.com>
References: <20030513123355.B29586-100000@megazone23.bigpanda.com>

Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> On Mon, 12 May 2003, Tom Lane wrote:
>> 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).

> This seems to possibly work on 7.4.  I took my system and removed the
> varchar comparison operators and directly made a text_ops index on a
> varchar(30).

Yeah, I fooled with it a little bit last night too.  It seems that we'd
need to still have a varchar_ops entry in pg_opclass (else you get
complaints about unable to select a default opclass, not to mention that
old pg_dump files specifying varchar_ops would fail to load).  But this
entry could point to the textual comparison operators.  AFAICT the
planner doesn't have any problem dealing with the implicit coercions
that it's faced with in such cases.

>> 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 guess this depends on how we read the comparisons/conversions from PAD
> SPACE to NO PAD are supposed to work, but I think this would be good and
> make things easier for alot of people since most people don't expect it,
> especially when using functions like upper and lower that return text.

I tried that too, and it seemed to work as expected.  Whether it's
arguably more spec-compliant than our current behavior I dunno; haven't
looked at that part of the spec closely...

			regards, tom lane




view thread (9+ messages)

Message-ID: <28558.1052856970@sss.pgh.pa.us>
Permalink:  ../28558.1052856970@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28558.1052856970@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: <28558.1052856970@sss.pgh.pa.us>
  References: <20030513123355.B29586-100000@megazone23.bigpanda.com> <28558.1052856970@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