Re: psql UPDATE field [tab] expands to DEFAULT?

From: Tim Cross <theophilusx(at)gmail(dot)com>
To: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: psql UPDATE field [tab] expands to DEFAULT?
Date: 2019-06-18 00:09:11
Message-ID: CAC=50j-YLBHrr+wyDv5FhvjOKSnRGg8N2ayk-yHmjzbaa85nkw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Tue, 18 Jun 2019 at 09:34, Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com> wrote:

> On Mon, Jun 17, 2019 at 4:24 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
> wrote:
>
>> On 6/17/19 3:03 PM, Ken Tanzer wrote:
>> >
>> > 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?
>>
>> Not sure how long that has been around.
>>
>> My cheat for dealing with many/long column names is:
>>
>>
> Thanks Adrian, though I wasn't really seeking tips for column names. I
> was instead trying to understand whether this particular tab expansion was
> intentional and considered useful, and if so what that usefulness was,
> because it's rather escaping me!
>
> Cheers,
> Ken
>
>
>
Have to say, I fid that behaviour unusual as well. I would expect that once
I've typed some characters, the completion mechanism would attempt to
complete based on the characters I've typed and if it cannot, to do
nothing. Instead, what happens is that what I have typed is replaced by
'default'. For example, if I type

update my_table set my_col = other_t

and hit tab, 'other_t is replaced by 'default', which is of no use. What I
would expect is for tab to either complete (possibly only partially if
there is multiple candidates) what it could for candidates which start with
'other_t' e.g. 'other_table' or it would do nothing i.e. no completion
candidates found, telling me there is no match based on the prefix I've
typed.

--
regards,

Tim

--
Tim Cross

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2019-06-18 00:22:53 Re: psql UPDATE field [tab] expands to DEFAULT?
Previous Message Miles Elam 2019-06-17 23:54:51 Inserts restricted to a trigger

Browse pgsql-hackers by date

  From Date Subject
Next Message Adrian Klaver 2019-06-18 00:22:53 Re: psql UPDATE field [tab] expands to DEFAULT?
Previous Message Ken Tanzer 2019-06-17 23:33:44 Re: psql UPDATE field [tab] expands to DEFAULT?