Alvaro Herrera <alvhe...@2ndquadrant.com> writes: > In Emre Hasegeli's patch for range/inet/geometry opclasses for BRIN, he > chose to move strategy numbers from gist.h to a more central place. He > chose skey.h because that's where btree strategy numbers are defined, > but I'm not sure I agree with that choice.
Yeah, putting those in skey.h was probably not such a great idea. (IIRC, they didn't use to be there ... it's probably my fault that they're there now.) > Therefore I would like to move those numbers elsewhere. Maybe we could > have a new file which would be used only for strategy numbers, such as > src/include/access/stratnum.h, and we would have something like this, > and redefine the ones elsewhere to reference those. +1 > I can, of course, just leave these files well enough alone and just rely > on the numbers not changing (which surely they won't anyway) and > remaining consistent with numbers used in new opclasses (which surely > they will lest they be born inconsistent with existing ones). Yeah, we do have checks in opr_sanity which will complain if inconsistent strategy numbers are used for similarly-named operators. That's a pretty weak test though, and operator names aren't exactly the right thing to check anyway. I'd be good with pushing all of that stuff to a new central header. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers