pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nikolay Shaplov <n.shaplov@postgrespro.ru>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [PATCH][Documination] Add optional USING keyword before opclass name in INSERT statemet
Date: Thu, 26 May 2016 10:05:56 -0400
Message-ID: <26587.1464271556@sss.pgh.pa.us> (raw)
In-Reply-To: <1868585.jcgsxskSny@nataraj-amd64>
References: <1593237.l7oKHRpxSe@nataraj-amd64>
	<2196.1464108440@sss.pgh.pa.us>
	<1868585.jcgsxskSny@nataraj-amd64>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Nikolay Shaplov <n.shaplov@postgrespro.ru> writes:
> В письме от 24 мая 2016 12:47:20 пользователь Tom Lane написал:
>> I think we should seriously consider fixing this code/docs discrepancy
>> by making the code match the docs, not vice versa.  That is, let's just
>> remove the USING alternative here entirely.

> I have two arguments for not removing USING there. 

> 1. Backward compatibility. Are you sure, that nobody ever wrote a code using 
> this "USING" keyword? I would say it is unlikely, but will not be sure 100%.

I would say the same.  However, we make incompatible changes in every
major release, and many of them are way harder to deal with than this.

> 2. I think expression with USING in it is more human readable:
> CREATE INDEX (xxx op_yyy);
> is less sensible then 
> CREATE INDEX (xxx USING op_yyy);

Yes.  If we were working in a green field, it would have been better to
make USING (or some other reserved word) required, not optional, there.
That would have been better for readability and would have avoided some
syntactic headaches, such as the need to parenthesize the expressions in
expression indexes.  However, we're about 18 years too late to make that
decision.  Opclass with no introductory keyword is the entrenched standard
at this point, and we're never going to be able to remove it.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (12+ messages)  latest in thread

Message-ID: <26587.1464271556@sss.pgh.pa.us>
Permalink:  ../26587.1464271556@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26587.1464271556@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, n.shaplov@postgrespro.ru
  Subject: Re: [PATCH][Documination] Add optional USING keyword before opclass name in INSERT statemet
  In-Reply-To: <26587.1464271556@sss.pgh.pa.us>
  References: <1593237.l7oKHRpxSe@nataraj-amd64> <2196.1464108440@sss.pgh.pa.us> <1868585.jcgsxskSny@nataraj-amd64> <26587.1464271556@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