Re: knngist - 0.8
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Teodor Sigaev <teodor@sigaev.ru>, Oleg Bartunov <oleg@sai.msu.su>, Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2010-11-23T03:18:25Z
Lists: pgsql-hackers
On Mon, Nov 22, 2010 at 8:32 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > The reason I bring this up now is that it affects the decision as to > what the unique key for pg_amop ought to be. Instead of having an > enum "purpose" column, maybe we should consider that the unique key > is (operator oid, opfamily oid, order-by-oid), where order-by-oid > is zero for a search operator and the OID of the btree opclass or sort > operator for an ordering operator. This would be of value if we > imagined that a single opclass could support ordering by more than one > distance ordering operator; which seems a bit far-fetched but perhaps > not impossible. On the other side of the coin it'd mean we aren't > leaving room for other sorts of operator "purposes". Since the need for additional purposes is mostly hypothetical, this wouldn't bother me any. > On balance I'm inclined to leave the unique key as per previous proposal > (with a "purpose" column) and add the which-sort-order-is-that > information as payload columns that aren't part of the key. This is probably OK too, although I confess I'm a lot less happy about it now that you've pointed out the need for those payload columns. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company