Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 75ABE2E2EB0 for ; Sun, 16 Dec 2007 13:59:59 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 78100-06 for ; Sun, 16 Dec 2007 13:59:57 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id E9FBC2E2E74 for ; Sun, 16 Dec 2007 13:59:56 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lBGHxqdJ027294; Sun, 16 Dec 2007 12:59:52 -0500 (EST) To: Simon Riggs cc: "Joshua D. Drake" , Bruce Momjian , pgsql-docs@postgresql.org Subject: Re: Plug in docs In-reply-to: <1197826806.12912.37.camel@ebony.site> References: <200712160812.lBG8C5x15519@momjian.us> <47654B3A.7030206@commandprompt.com> <1197826806.12912.37.camel@ebony.site> Comments: In-reply-to Simon Riggs message dated "Sun, 16 Dec 2007 17:40:06 +0000" Date: Sun, 16 Dec 2007 12:59:52 -0500 Message-ID: <27293.1197827992@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/54 X-Sequence-Number: 4722 Simon Riggs writes: > On Sun, 2007-12-16 at 07:58 -0800, Joshua D. Drake wrote: >> Bruce Momjian wrote: >>> I think these are >>> documented-in-the-source-code type issues. >> >> If they are an API they need to be documented. Code is poor (even well >> documented code) substitute for good old fashioned docs. > Agreed. I don't agree --- I think the above opinion is rooted in closed-source documentation practices where you *have to* document things without reference to the code. In an open-source situation the ground rules are completely different, and we shouldn't make unnecessary work for ourselves. In particular, for all three of the hooks at hand, it would be out of the question for anyone to make real use of them without a great deal of code-reading. There is never going to be extensive documentation in the SGML manual of all internal planner APIs, for example, and yet you're not going to accomplish anything very useful with either of the planner hooks unless you understand that stuff. Also, if you think any of these are APIs in the sense that we promise never to change them, you're mistaken. (Again, it's not so much the hook itself that's the problem, as all the stuff that the hooked-in function needs to know about.) regards, tom lane