Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id AEC5F1337990 for ; Fri, 15 Oct 2010 12:41:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 63892-01 for ; Fri, 15 Oct 2010 15:40:57 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 0A7D4133740B for ; Fri, 15 Oct 2010 12:40:56 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o9FFertK021408; Fri, 15 Oct 2010 11:40:54 -0400 (EDT) To: Peter Eisentraut cc: Robert Haas , Josh Kupershmidt , pgsql-docs@postgresql.org Subject: Re: Documenting removal of nonnullvalue() and friends In-reply-to: <1287156419.9739.1.camel@vanquo.pezone.net> References: <1287064806.9532.5.camel@vanquo.pezone.net> <5718.1287094063@sss.pgh.pa.us> <6841.1287098143@sss.pgh.pa.us> <1287156419.9739.1.camel@vanquo.pezone.net> Comments: In-reply-to Peter Eisentraut message dated "Fri, 15 Oct 2010 18:26:59 +0300" Date: Fri, 15 Oct 2010 11:40:53 -0400 Message-ID: <21407.1287157253@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/42 X-Sequence-Number: 6183 Peter Eisentraut writes: > On tor, 2010-10-14 at 19:17 -0400, Robert Haas wrote: >> Part of the problem, I think, is that people don't necessarily find >> this stuff via the documentation. They fire up psql or pgAdmin and >> start typing backslash commands. They see something good, so they use >> it. How are they to know it's undocumented? > This could possibly be addressed if we more diligently maintained the > system catalogs comments, and then possibly default the comments of > undocumented objects to "internal object, don't use". I thought about this a bit more last night. It's certainly true that a lot of "internal" functions have comments that don't suggest that they're not meant to be used directly. What I think would be a good plan for functions that underlie operators is that we move any useful comments from pg_proc to pg_operator, and then install a comment in pg_proc that says "implementation of operator +" (or whatever the operator name is). This will not only let people know that they should use an operator instead, but which one to use, when they find the function via \df. I believe that there are a few cases where we document both the operator and the equivalent function, so in those cases both should have the regular comment. The same sort of approach could be used for functions that are meant as aggregate support, if they don't have any real stand-alone use. I think most of the other categories of support functions are already pretty obviously internal, if there even are any that don't have "internal" arguments. If that sounds like a reasonable plan, I'm willing to have a go at it after the commitfest closes. regards, tom lane