pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Fetter <david@fetter.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Making tab-complete.c easier to maintain
Date: Thu, 22 Oct 2015 16:26:10 -0700
Message-ID: <20151022232610.GC22539@fetter.org> (raw)
In-Reply-To: <53412.1445555106@sss.pgh.pa.us>
References: <20150907135605.GP2912@alvherre.pgsql>
	<CAEepm=3q9oBsd65F3AMTKw9-Rs+E+SDV3HpGV5yLj7ySetj7Yw@mail.gmail.com>
	<CAEepm=1=Hdt9TCM3BRiVE6NCnXHyDDki+YVPhfZ02_=niU=8cA@mail.gmail.com>
	<CAMkU=1yt=Ed7+K4sUisdUkt-wDhGnxdkDqs_43uJvhJYFA56gQ@mail.gmail.com>
	<CAEepm=1ns0rbo+xun_j6_PwDT6zmEPuNggy=Vaie-3peF2C44Q@mail.gmail.com>
	<CAEepm=2X08QRoJD3Bu4em-w=c=Q7SCCHM404jK-ercR4H1xtkw@mail.gmail.com>
	<CA+TgmoYow9qMFJ8hJipmd7K9=_xeUtAVVarQJGY401_nTnopeQ@mail.gmail.com>
	<51382.1445549813@sss.pgh.pa.us>
	<20151022221425.GB22539@fetter.org>
	<53412.1445555106@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On Thu, Oct 22, 2015 at 04:05:06PM -0700, Tom Lane wrote:
> David Fetter <david@fetter.org> writes:
> > On Thu, Oct 22, 2015 at 02:36:53PM -0700, Tom Lane wrote:
> >> I have no very good idea how to do that, though.  Bison does have a
> >> notion of which symbols are possible as the next symbol at any given
> >> parse point, but it doesn't really make that accessible.  There's a lack
> >> of cooperation on the readline side too: we'd need to be able to see the
> >> whole query buffer not just the current line.
> 
> > This may be on point:
> 
> > http://stackoverflow.com/questions/161495/is-there-a-nice-way-of-handling-multi-line-input-with-gnu-...
> 
> > I suspect we might have to stop pretending to support alternatives to
> > libreadline if we went that direction, not that that would necessarily
> > be a bad idea.
> 
> Given the license issues around GNU readline, requiring it seems like
> probably a non-starter.

I should have made this more clear.  I am not an IP attorney and don't
play one on TV, but this is what I've gotten out of conversations with
IP attorneys on this subject:

- If we allow people to disable readline at compile time, the software
  is not GPL even if only libreadline would add the command line
  editing capability.

- When people do compile with libreadline, the only software affected
  by libreadine's license is the binary to which it is linked, namely
  the psql client.
  
To be affective negatively by libreadline's viral license, an entity
would need to fork the psql client in proprietary ways that they did
not wish not to make available to end users, at the same time linking
in libreadline.

Maybe I'm missing something big, but I really don't see people out
there shipping a libreadline-enabled psql client, details of whose
source they'd want to keep a deep, dark secret.

If this gets to matter, we can probably get /pro bono/ work from IP
attorneys specializing in just this kind of thing.

> It strikes me though that maybe we don't need readline's
> cooperation.  I think it's already true that the previous lines of
> the query buffer are stashed somewhere that psql knows about, so in
> principle we could sew them together with the current line.  That
> might be a project worth tackling on its own, since we could make
> the existing code smarter about multiline queries, whether or not we
> ever get to a grammar-based solution.

Great!

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


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

Message-ID: <20151022232610.GC22539@fetter.org>
Permalink:  ../20151022232610.GC22539@fetter.org/
Also on:    postgresql.org/message-id/20151022232610.GC22539@fetter.org

 · 

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: david@fetter.org, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, thomas.munro@enterprisedb.com, jeff.janes@gmail.com, alvherre@2ndquadrant.com
  Subject: Re: Making tab-complete.c easier to maintain
  In-Reply-To: <20151022232610.GC22539@fetter.org>

* 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