Re: [HACKERS] Second thoughts on CheckIndexCompatible() vs. operator families

2012-01-28 Thread Tom Lane
Noah Misch writes: > On Thu, Jan 26, 2012 at 08:23:34AM -0500, Robert Haas wrote: >> I'm just going to remove the test. This is not very future-proof and > [ objections ] FWIW, I concur with Robert's choice here. This test method is ugly and fragile, and I'm not even thinking about the questio

Re: [HACKERS] Second thoughts on CheckIndexCompatible() vs. operator families

2012-01-28 Thread Noah Misch
On Thu, Jan 26, 2012 at 08:23:34AM -0500, Robert Haas wrote: > On Thu, Jan 26, 2012 at 6:55 AM, Noah Misch wrote: > > On Wed, Jan 25, 2012 at 11:53:10PM -0500, Tom Lane wrote: > >> Not only is that code spectacularly unreadable, but has nobody noticed > >> that this commit broke the buildfarm? > >

Re: [HACKERS] Second thoughts on CheckIndexCompatible() vs. operator families

2012-01-26 Thread Robert Haas
On Thu, Jan 26, 2012 at 6:55 AM, Noah Misch wrote: > On Wed, Jan 25, 2012 at 11:53:10PM -0500, Tom Lane wrote: >> Not only is that code spectacularly unreadable, but has nobody noticed >> that this commit broke the buildfarm? > > Thanks for reporting the problem.  This arose because the new test c

Re: [HACKERS] Second thoughts on CheckIndexCompatible() vs. operator families

2012-01-26 Thread Noah Misch
On Wed, Jan 25, 2012 at 11:53:10PM -0500, Tom Lane wrote: > Not only is that code spectacularly unreadable, but has nobody noticed > that this commit broke the buildfarm? Thanks for reporting the problem. This arose because the new test case temporarily sets client_min_messages=DEBUG1. The defau

Re: [HACKERS] Second thoughts on CheckIndexCompatible() vs. operator families

2012-01-25 Thread Tom Lane
Alvaro Herrera writes: > Excerpts from Robert Haas's message of mié ene 25 17:32:49 -0300 2012: >> On Sun, Jan 22, 2012 at 12:23 AM, Noah Misch wrote: > New version that repairs a defective test case. >> >> Committed. I don't find this to be particularly good style: >> >> + for (i = 0;

Re: [HACKERS] Second thoughts on CheckIndexCompatible() vs. operator families

2012-01-25 Thread Noah Misch
On Wed, Jan 25, 2012 at 03:32:49PM -0500, Robert Haas wrote: > On Sun, Jan 22, 2012 at 12:23 AM, Noah Misch wrote: > > New version that repairs a defective test case. > > Committed. I don't find this to be particularly good style: Thanks. > + for (i = 0; i < old_natts && ret; i++) > +

Re: [HACKERS] Second thoughts on CheckIndexCompatible() vs. operator families

2012-01-25 Thread Alvaro Herrera
Excerpts from Robert Haas's message of mié ene 25 19:05:44 -0300 2012: > > On Wed, Jan 25, 2012 at 3:52 PM, Alvaro Herrera > wrote: > > > > Excerpts from Robert Haas's message of mié ene 25 17:32:49 -0300 2012: > >> On Sun, Jan 22, 2012 at 12:23 AM, Noah Misch wrote: > >> > New version that rep

Re: [HACKERS] Second thoughts on CheckIndexCompatible() vs. operator families

2012-01-25 Thread Robert Haas
On Wed, Jan 25, 2012 at 3:52 PM, Alvaro Herrera wrote: > > Excerpts from Robert Haas's message of mié ene 25 17:32:49 -0300 2012: >> On Sun, Jan 22, 2012 at 12:23 AM, Noah Misch wrote: >> > New version that repairs a defective test case. >> >> Committed.  I don't find this to be particularly good

Re: [HACKERS] Second thoughts on CheckIndexCompatible() vs. operator families

2012-01-25 Thread Alvaro Herrera
Excerpts from Robert Haas's message of mié ene 25 17:32:49 -0300 2012: > On Sun, Jan 22, 2012 at 12:23 AM, Noah Misch wrote: > > New version that repairs a defective test case. > > Committed. I don't find this to be particularly good style: > > + for (i = 0; i < old_natts && ret; i++) >

Re: [HACKERS] Second thoughts on CheckIndexCompatible() vs. operator families

2012-01-25 Thread Robert Haas
On Sun, Jan 22, 2012 at 12:23 AM, Noah Misch wrote: > New version that repairs a defective test case. Committed. I don't find this to be particularly good style: + for (i = 0; i < old_natts && ret; i++) + ret = (!IsPolymorphicType(get_opclass_input_type(classObjectId[i +

Re: [HACKERS] Second thoughts on CheckIndexCompatible() vs. operator families

2012-01-21 Thread Noah Misch
New version that repairs a defective test case. diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index 712b0b0..1bf1de5 100644 *** a/src/backend/commands/indexcmds.c --- b/src/backend/commands/indexcmds.c *** *** 23,28 --- 23,29 #include "cata

[HACKERS] Second thoughts on CheckIndexCompatible() vs. operator families

2012-01-06 Thread Noah Misch
In 367bc426a1c22b9f6badb06cd41fc438fd034639, I introduced a CheckIndexCompatible() that approves btree and hash indexes having changed to a different operator class within the same operator family. To make that valid, I also tightened the operator family contracts for those access methods to addre