Re: A Typo in regress/sql/privileges.sql

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tatsuro Yamada <yamada(dot)tatsuro(at)lab(dot)ntt(dot)co(dot)jp>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A Typo in regress/sql/privileges.sql
Date: 2015-12-22 23:38:25
Message-ID: CA+Tgmobe7iyy-pqiPkkb49JM+KJwve83H7=QPH1VpdRheuBu_g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 22, 2015 at 6:10 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> On Tue, Dec 22, 2015 at 2:58 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> If it's an axiom that there is nothing wrong with the term inference,
>> then obviously we should not change anything. But that seems to me to
>> be putting the cart before the horse.
>
> OK, then. What's wrong with the term inference?

In my opinion a term more closely coupled to the concrete syntax would
be easier to understand. I have no objection to referring to the
*process* of trying to deduce a suitable index from the ON CONFLICT
clause as "inference". But calling the ON CONFLICT clause an
"inference specification" is, in my opinion, an unnecessary oblique
way of referring to it. If you renamed InferenceElem to
InsertOnConflictElem, I think that would be strictly more clear.

I also kind of dislike the way that this feature has commandeered the
word "inference" for its own use. The server infers a lot of things,
and it might infer more in the future, but if somebody else ever wants
to use the word for something, they're going to have a hard time not
getting false hits when they grep. Like there are comments like this
in the regression tests:

-- inference succeeds:
-- inference fails:

That's pretty darn generic. Whether the command succeeds or fails
will be clear enough from the output.

Mind you, I don't think the problems with inference are a
super-serious issue, or I would have raised a stink sooner. But I
don't find it particularly appealing, either.

--
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 Peter Geoghegan 2015-12-22 23:45:35 Re: A Typo in regress/sql/privileges.sql
Previous Message Peter Geoghegan 2015-12-22 23:17:31 Re: Re: Reusing abbreviated keys during second pass of ordered [set] aggregates