Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T0F6s-00047A-LA for pgsql-docs@postgresql.org; Sat, 11 Aug 2012 17:04:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T0F6q-00066C-H0 for pgsql-docs@postgresql.org; Sat, 11 Aug 2012 17:04:22 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q7BH4IL9008410; Sat, 11 Aug 2012 13:04:18 -0400 (EDT) From: Tom Lane To: Daniele Varrazzo cc: pgsql-docs@postgresql.org Subject: Re: GIST operators docs [was: [HACKERS] Patch: add GiST support for BOX @> POINT queries] In-reply-to: References: Comments: In-reply-to Daniele Varrazzo message dated "Sat, 11 Aug 2012 16:11:35 +0100" Date: Sat, 11 Aug 2012 13:04:18 -0400 Message-ID: <8409.1344704658@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201208/7 X-Sequence-Number: 7400 Daniele Varrazzo writes: > The style of the docs is currently: > - in 11.2: on the type page, a list of operators without a single word > on their meaning, with a link to 9.11 > > - in 9.11 the ops explanation with no info about indexing or types > support I agree this is pretty incomplete ... > I would suggest dropping the list in 11.2, leaving only the link > ("several operators support indexing: see section 9.11 for a list"), > and be explicit in 9.11 in what operator and what data type can be > used in an index. ... but I don't think I want to fix it along those lines. Consider what would happen if we tried to annotate every operator supported by btree indexes that way, for example. It'd be very cluttering. It'd probably be pretty cluttering even if we restrict it to GIST cases. I think the charter of 9.11 is to tell you what the operators *do*, not which ones are amenable to indexing. Over in 11.9 http://www.postgresql.org/docs/devel/static/indexes-opclass.html there are sample queries for finding out which operators are indexable by consulting the system catalogs directly. I wonder whether it'd be helpful to provide some simplified version of those queries in 11.2, instead of or in addition to the text that's there now. Alternatively, I could see adding tables of supported operators in the GIST (and SPGIST and GIN) chapters of part VII, and linking to those from 11.2. Another idea is to extend psql's \do command to report indexability of the operators it shows. regards, tom lane