Re: A Typo in regress/sql/privileges.sql - Mailing list pgsql-hackers

From Robert Haas
Subject Re: A Typo in regress/sql/privileges.sql
Date
Msg-id CA+Tgmobe7iyy-pqiPkkb49JM+KJwve83H7=QPH1VpdRheuBu_g@mail.gmail.com
Whole thread Raw
In response to Re: A Typo in regress/sql/privileges.sql  (Peter Geoghegan <pg@heroku.com>)
Responses Re: A Typo in regress/sql/privileges.sql  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
On Tue, Dec 22, 2015 at 6:10 PM, Peter Geoghegan <pg@heroku.com> wrote:
> On Tue, Dec 22, 2015 at 2:58 PM, Robert Haas <robertmhaas@gmail.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



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Re: Reusing abbreviated keys during second pass of ordered [set] aggregates
Next
From: Peter Geoghegan
Date:
Subject: Re: A Typo in regress/sql/privileges.sql