pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tgl@postgresql.org
To: pgsql-committers@postgresql.org
Subject: pgsql: Rewrite interval_hash() so that the hashcodes are equal for
Date: Sat,  4 Apr 2009 04:53:34 +0000 (UTC)
Message-ID: <20090404045334.8BBD7754ADE@cvs.postgresql.org> (raw)

Log Message:
-----------
Rewrite interval_hash() so that the hashcodes are equal for values that
interval_eq() considers equal.  I'm not sure how that fundamental requirement
escaped us through multiple revisions of this hash function, but there it is;
it's been wrong since interval_hash was first written for PG 7.1.
Per bug #4748 from Roman Kononov.

Backpatch to all supported releases.

This patch changes the contents of hash indexes for interval columns.  That's
no particular problem for PG 8.4, since we've broken on-disk compatibility
of hash indexes already; but it will require a migration warning note in
the next minor releases of all existing branches: "if you have any hash
indexes on columns of type interval, REINDEX them after updating".

Tags:
----
REL8_3_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        timestamp.c (r1.184.2.1 -> r1.184.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/timestamp.c?r1=1.184.2.1&r2...)
    pgsql/src/test/regress/expected:
        interval.out (r1.19 -> r1.19.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/interval.out?r1=1.19&r2...)
    pgsql/src/test/regress/sql:
        interval.sql (r1.12 -> r1.12.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/interval.sql?r1=1.12&r2=1.12...)




view thread (17+ messages)  latest in thread

Message-ID: <20090404045334.8BBD7754ADE@cvs.postgresql.org>
Permalink:  ../20090404045334.8BBD7754ADE@cvs.postgresql.org/
Also on:    postgresql.org/message-id/20090404045334.8BBD7754ADE@cvs.postgresql.org

 · 

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-committers@postgresql.org
  Cc: tgl@postgresql.org
  Subject: Re: pgsql: Rewrite interval_hash() so that the hashcodes are equal for
  In-Reply-To: <20090404045334.8BBD7754ADE@cvs.postgresql.org>

* 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