pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: Josh Kupershmidt <schmiddy@gmail.com>
Cc: pgsql-docs@postgresql.org
Subject: Re: Documenting removal of nonnullvalue() and friends
Date: Sat, 16 Oct 2010 10:28:53 -0400
Message-ID: <6805.1287239333@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTi=rs6gTkn47msLeP6bbX+erpOfThFAkEg8GFjZR@mail.gmail.com>
References: <AANLkTikr84KaL_EQECtvfnKkq0f=abHi4s+9Cq7LSOSo@mail.gmail.com>
	<AANLkTikT01KcHaEfJRBepM6ZGncD59Sn1g9MEE-XPpWX@mail.gmail.com>
	<AANLkTi=Av3AJ9DAyyO758OKabzEks-pNQWm=ntTMLHkH@mail.gmail.com>
	<AANLkTikH6JF0FrwJBDaYpUN_TW=3t=Syj3pnzJ7CX1-A@mail.gmail.com>
	<1287064806.9532.5.camel@vanquo.pezone.net>
	<AANLkTikXfVVpnaDptPZpmShokB3caP9xA0ewOzMqE0Q_@mail.gmail.com>
	<5718.1287094063@sss.pgh.pa.us>
	<AANLkTikUKtngdLHCeqi=iERU6ydvQRcsW8EoaSwkrT3o@mail.gmail.com>
	<6841.1287098143@sss.pgh.pa.us>
	<AANLkTi=B12qZtFDUnk0jukA+0UBoO4578umqSUPxrDzG@mail.gmail.com>
	<1287156419.9739.1.camel@vanquo.pezone.net>
	<21407.1287157253@sss.pgh.pa.us>
	<AANLkTi=rs6gTkn47msLeP6bbX+erpOfThFAkEg8GFjZR@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Oct 15, 2010 at 11:40 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 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).

> It's a reasonable plan, but I'm not sure it's going to do a whole lot
> of good in practice.  I use \df all the time but \df+ not too often.

I don't think that argument holds a lot of water.  If you found an
interesting-looking function via \df, wouldn't you make at least some
effort to verify what it does before putting it into a production query?
I should think you'd at least look into \df+ or the SGML docs.

> I'm halfway tempted to propose that we add a prosupersekret column
> that can be set on things we don't intend users to make use of
> directly, and then hide them even from \dfS and \df <pattern>.  But I
> suspect you'll all just laugh at me.

I've occasionally toyed with the idea of moving all non-public functions
into a separate schema, say "pg_internal", which wouldn't be in the
standard search path (and thus ordinary \df wouldn't see it).  That
would be nice from a cleanliness standpoint, but there are downsides
too.  The big problem is that it moves this endeavor out of the realm of
"let's improve the documentation" and into the realm of "let's
intentionally break every app that dared to use a non-public function".
It seems clear to me that that's a huge overreaction.  99% of the time
it's no big deal if somebody uses one of these directly; as portability
problems go, this was a tiny and easily solved issue.

			regards, tom lane



view thread (25+ messages)  latest in thread

Message-ID: <6805.1287239333@sss.pgh.pa.us>
Permalink:  ../6805.1287239333@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6805.1287239333@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, peter_e@gmx.net, schmiddy@gmail.com
  Subject: Re: Documenting removal of nonnullvalue() and friends
  In-Reply-To: <6805.1287239333@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox