psql UPDATE field [tab] expands to DEFAULT?

From: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
To: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: psql UPDATE field [tab] expands to DEFAULT?
Date: 2019-06-17 22:03:11
Message-ID: CAD3a31XpXzrZA9TT3BqLSHghdTK+=cXjNCE+oL2Zn4+oWoc=qA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi. If I'm using psql, and type for example:

UPDATE my_table SET my_field
(with a trailing space)

and then hit Tab, it will expand that to an =, and then another tab will
expand to DEFAULT, so that I then have:

UPDATE my_table SET my_field = DEFAULT

If I'm tabbing out in this situation, it's going to be after the =, and I
will have typed "myreal"[tab] in the vain hope that psql will complete that
to "myreallylongfieldname," but instead it gets replaced with DEFAULT.

So I'm curious if this is intended behavior, if it's considered useful,
and/or if it's a placeholder for something in the future that will be
useful. Also, is this new, as I've never noticed it before?

Thanks in advance,
Ken

p.s., Version 9.6.13

--
AGENCY Software
A Free Software data system
By and for non-profits
*http://agency-software.org/ <http://agency-software.org/>*
*https://demo.agency-software.org/client
<https://demo.agency-software.org/client>*
ken(dot)tanzer(at)agency-software(dot)org
(253) 245-3801

Subscribe to the mailing list
<agency-general-request(at)lists(dot)sourceforge(dot)net?body=subscribe> to
learn more about AGENCY or
follow the discussion.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2019-06-17 23:04:42 Re: Copy Bulk Ignore Duplicated
Previous Message Michael Curry 2019-06-17 20:50:41 perf tuning for 28 cores and 252GB RAM

Browse pgsql-hackers by date

  From Date Subject
Next Message Adrian Klaver 2019-06-17 23:24:43 Re: psql UPDATE field [tab] expands to DEFAULT?
Previous Message Chapman Flack 2019-06-17 20:57:19 Re: SQL/JSON path issues/questions