Re: New pg_lsn type doesn't have hash/btree opclasses

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: fabriziomello(at)gmail(dot)com
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>
Subject: Re: New pg_lsn type doesn't have hash/btree opclasses
Date: 2014-05-10 23:23:05
Message-ID: CAB7nPqQwWwCCUCCOjOLjU1zNEUMpQ-CQvN9kPhZ8S4vWNvYnrA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, May 10, 2014 at 9:45 PM, Fabrízio de Royes Mello
<fabriziomello(at)gmail(dot)com> wrote:
> Last night I sent a patch [1] to add more tests and change the operator
> name. Maybe we can merge the test cases... ;-)
Sure, I noticed that. But I think that they are more complicated than
necessary. I am as well doubtful about adding test cases with EXPLAIN
for a data type test suite.

The patch introduces two new things: pg_lsn_cmp and pg_lsn_hash. To
test the former a simple ORDER BY query is enough as cmp is used as an
ordering operator. And for the latter creating a hash index looks
enough as it tests using the hash function when inserting index
tuples. Not to mention as well that the tests are more readable.
Regards,
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2014-05-10 23:24:57 Re: New pg_lsn type doesn't have hash/btree opclasses
Previous Message Andres Freund 2014-05-10 23:17:13 Re: New pg_lsn type doesn't have hash/btree opclasses