pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Lewis <mark.lewis@mir3.com>
Cc: David Lang <dlang@invendra.net>
Cc: Greg Stark <gsstark@mit.edu>
Cc: Markus Schaber <schabi@logix-tt.com>
Cc: pgsql-performance@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index
Date: Fri, 17 Feb 2006 14:43:06 -0500
Message-ID: <11801.1140205386@sss.pgh.pa.us> (raw)
In-Reply-To: <1140197437.9076.268.camel@archimedes>
References: <43F38867.6010701@gpdnet.co.uk>
	<19510.1140036968@sss.pgh.pa.us>
	<19779.1140038874@sss.pgh.pa.us>
	<43F39E53.1020009@gpdnet.co.uk>
	<20781.1140046109@sss.pgh.pa.us>
	<7.0.1.0.2.20060215194635.03b55da0@earthlink.net>
	<21615.1140052893@sss.pgh.pa.us>
	<7.0.1.0.2.20060215223710.03a7c618@earthlink.net>
	<20060216113522.GA3461@uio.no>
	<7.0.1.0.2.20060216071053.0385a1a8@earthlink.net>
	<43F481CD.2010509@logix-tt.com>
	<43F4A7D8.4050907@modgraph-usa.com>
	<29277.1140110108@sss.pgh.pa.us>
	<1140128256.9076.254.camel@archimedes>
	<43F4FDCC.2000204@logix-tt.com>
	<871wy23okp.fsf@stark.xeocode.com>
	<1140132189.9076.261.camel@archimedes>
	<Pine.LNX.4.62.0602162131211.20790@qnivq.ynat.uz>
	<1140197437.9076.268.camel@archimedes>

Mark Lewis <mark.lewis@mir3.com> writes:
> I think we're actually on the same page here; you're right that the
> constraint above ( f(a)==f(b) iff a==b ) can't be extended to data types
> with more than 32 bits of value space.  But the constraint I listed was
> actually:

> if a==b then f(a)==f(b)

I believe Martijn had it right: the important constraint is

	f(a) > f(b) implies a > b

which implies by commutativity

	f(a) < f(b) implies a < b

and these two together imply

	a == b implies f(a) == f(b)

Now you can't do any sorting if you only have the equality rule, you
need the inequality rule.

			regards, tom lane



view thread (56+ messages)  latest in thread

Message-ID: <11801.1140205386@sss.pgh.pa.us>
Permalink:  ../11801.1140205386@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11801.1140205386@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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mark.lewis@mir3.com, dlang@invendra.net, gsstark@mit.edu, schabi@logix-tt.com, pgsql-hackers@postgresql.org
  Subject: Re: qsort again (was Re: [PERFORM] Strange Create Index
  In-Reply-To: <11801.1140205386@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