pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Ron <ronljohnsonjr@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Would it be possible to add functions to tab-completion in psql?
Date: Tue, 16 Aug 2022 16:14:12 +0200
Message-ID: <20220816141412.GA22751@depesz.com> (raw)
In-Reply-To: <1122768.1660659055@sss.pgh.pa.us>
References: <20220816122849.GC24417@depesz.com>
	<d6d06ded-d795-ff81-d4e8-13d5bdf981d0@gmail.com>
	<20220816130114.GA22122@depesz.com>
	<2bdacb77-c22f-8be5-cbb7-418c1e3eab82@gmail.com>
	<20220816140253.GB14225@depesz.com>
	<1122768.1660659055@sss.pgh.pa.us>

On Tue, Aug 16, 2022 at 10:10:55AM -0400, Tom Lane wrote:
> There is nothing principled about assuming that the first word
> after SELECT is a function name.  It'd be even less principled to
> provide tab completion only for function names beginning with
> "pg_".  So this idea seems like a wart rather than something
> anybody would think is a nice improvement.

While I understand that there is nothing that would suggest it, is there
any reason why providing a thing that can legally be there would be bad
idea?

I understand that someone might want to enter pg_or_not_pg (column
name from some table), or perhaps pg.some_column_name - but what is the
harm of providing pg_* functions for pg_<tab>?

Specifically, I'd ask what is the harm of increasing what tab completion
can do by a lot - for example, make it tab-complete fields from all
tables. And make it possible to tab-complete column name anywhere in
where clause. But function name in select would be (for me(!)) great
first step, and I can't really see the drawbacks, aside from using
developer time to work on it.

Best regards,

depesz






view thread (11+ messages)  latest in thread

Message-ID: <20220816141412.GA22751@depesz.com>
Permalink:  ../20220816141412.GA22751@depesz.com/
Also on:    postgresql.org/message-id/20220816141412.GA22751@depesz.com

 · 

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-general@postgresql.org
  Cc: depesz@depesz.com, tgl@sss.pgh.pa.us, ronljohnsonjr@gmail.com
  Subject: Re: Would it be possible to add functions to tab-completion in psql?
  In-Reply-To: <20220816141412.GA22751@depesz.com>
  References: <20220816122849.GC24417@depesz.com> <d6d06ded-d795-ff81-d4e8-13d5bdf981d0@gmail.com> <20220816130114.GA22122@depesz.com> <2bdacb77-c22f-8be5-cbb7-418c1e3eab82@gmail.com> <20220816140253.GB14225@depesz.com> <1122768.1660659055@sss.pgh.pa.us> <20220816141412.GA22751@depesz.com>

* 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