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

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Ken Tanzer <ken(dot)tanzer(at)gmail(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:34:33
Message-ID: CAMkU=1yycATjA4Ti7d=t8i9HV-3iN9iC8yQpBsZANc+-GUxn8w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Mon, Jun 17, 2019 at 8:23 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:

> On 6/17/19 4:33 PM, Ken Tanzer wrote:
> >
> > 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
>
> If I am following the below correctly it is intentional:
>
>
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/bin/psql/tab-complete.c;h=68a2ba27aec22302625c5481a8f74cf866f4dc23;hb=d22ca701a39dfd03cdfa1ca238370d34f4bc4ac4
>
> Line 2888
>

But that portion doesn't offer the DEFAULT completion. It stops at
offering '=', and goes no further.

It is at line 2859 which accidentally offers to complete DEFAULT, and that
is not part of the UPDATE-specific code.

Cheers,

Jeff

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2019-06-18 00:39:21 Re: psql UPDATE field [tab] expands to DEFAULT?
Previous Message Adrian Klaver 2019-06-18 00:29:54 Re: Inserts restricted to a trigger

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-06-18 00:39:21 Re: psql UPDATE field [tab] expands to DEFAULT?
Previous Message Jeff Janes 2019-06-18 00:23:47 Re: psql UPDATE field [tab] expands to DEFAULT?