Re: Bug in pg_describe_object, patch v2

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andreas Karlsson <andreas(at)proxel(dot)se>, Joel Jacobson <joel(at)gluefinance(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Jim Nasby <jim(at)nasby(dot)net>, Herrera Alvaro <alvherre(at)commandprompt(dot)com>, pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in pg_describe_object, patch v2
Date: 2011-01-23 02:55:55
Message-ID: AANLkTi=9YvzNf_bBe+sgEz5-q9Ko_4t9gVznsYBcnaCs@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jan 22, 2011 at 9:50 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Sun, Jan 16, 2011 at 2:28 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> If we were to go with this, I'd be strongly tempted to rearrange all
>>> four of the messages involved to put the operator or function name
>>> at the end, eg
>>>
>>> function 1 (oidvector[], oidvector[]) of operator family array_ops for access method gin: btoidvectorcmp(oidvector,oidvector)
>
>> I kind of wonder if it wouldn't be even better to just *delete* that
>> from the thing altogether and write:
>
>> function 1 (oidvector[], oidvector[]) of operator family array_ops for
>> access method gin
>
>> We're trying to represent the pg_amproc entry here, and including a
>> bunch of details of the pg_proc entry to which it happens to point
>> seems almost better to be confusing the issue.
>
> Yeah, that occurred to me too.  However, the CREATE OPERATOR CLASS
> syntax doesn't really draw a distinction between the referenced
> function/operator and its reference in the opclass, and I'm not sure
> users do either.

Well, I think from a user perspective the operator class machinery is
approximately clear as mud, but the CREATE OPERATOR CLASS syntax
surely seems to draw a distinction. It seems pretty clear we're
mapping a function support number, with optional types, onto a
pre-existing function.

> So I don't want to give up the details of the function
> or operator.  But sticking them at the end after a colon might make it
> clearer that the func/operator is referenced by the amproc or amop
> entry, but is not the same thing.

That seems like an improvement over the status quo, so do you want to
go ahead and do that?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-01-23 03:12:16 Re: auto-sizing wal_buffers
Previous Message Robert Haas 2011-01-23 02:52:18 Re: auto-sizing wal_buffers