pg.ddx.io  pgsql-hackers@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: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: IF (NOT) EXISTS in psql-completion
Date: Sun, 26 Feb 2017 15:21:56 -0500
Message-ID: <19657.1488140516@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoaOrwTjMtAbwb5Vd43APi-hFbA8XRJSyqvKui7qqwim=Q@mail.gmail.com>
References: <CAFj8pRAHCwdwe+NRTQ9JrtMO2OdUWtp1demmv_jGBU2tRRs-CQ@mail.gmail.com>
	<20170203.171712.150614683.horiguchi.kyotaro@lab.ntt.co.jp>
	<CAFj8pRD85cnxEEgLtOoqL-Bda2XpzvHB3a6Mr+bvf+OKpiq3Eg@mail.gmail.com>
	<20170214.195152.59283261.horiguchi.kyotaro@lab.ntt.co.jp>
	<CAFj8pRAgwABQUVkbLVnEjDp+OgLWwK3w5P9pC985xfTz+Qbqug@mail.gmail.com>
	<CA+TgmoaOrwTjMtAbwb5Vd43APi-hFbA8XRJSyqvKui7qqwim=Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Robert Haas <robertmhaas@gmail.com> writes:
> Yeah, maybe, but we'd need a committer to take more of an interest in
> this patch series.  Personally, I'm wondering why we need a series of
> 19 patches to add tab completion support for IF NOT EXISTS.  The
> feature which is the subject of this thread arrives in patch 0017, and
> a lot of the patches which come before that seem to change a lot of
> stuff without actually improving much that would really benefit users.

FWIW, one reason this committer hasn't jumped in is that we already
rewrote tab-complete.c pretty completely in 9.6.  If we accept a patch
that completely rewrites it again, we're going to be faced with
maintaining three fundamentally different implementations for the next
three-plus years (until 9.5 dies).  Admittedly, we don't back-patch
fixes in tab-complete.c every week, but a look at the git history says
we do need to do that several times a year.

Also, the nature of the primary refactoring (changing the big else-chain
into standalone ifs, if I read it correctly) is particularly bad from a
back-patching standpoint because all you have to do is insert an "else",
or fail to insert one, to silently and almost completely break either
one or the other branch.  And I don't really understand why that's a good
idea anyway: surely we can return at most one set of completions, so how
is turning the function into a lot of independent actions a win?

So I'd be a whole lot happier if it didn't do that.  Can we really not
add the desired features in a more localized fashion?

			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 (90+ messages)  latest in thread

Message-ID: <19657.1488140516@sss.pgh.pa.us>
Permalink:  ../19657.1488140516@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19657.1488140516@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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, pavel.stehule@gmail.com, horiguchi.kyotaro@lab.ntt.co.jp, michael.paquier@gmail.com
  Subject: Re: IF (NOT) EXISTS in psql-completion
  In-Reply-To: <19657.1488140516@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