Re: IF (NOT) EXISTS in psql-completion

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: David Steele <david(at)pgmasters(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: IF (NOT) EXISTS in psql-completion
Date: 2016-03-30 07:23:49
Message-ID: CAFj8pRBVKa6NG4JwZ2QmrO7inudFJws5w0+demVgZZNuF-HUkQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

...
>> =# alter table if<tab>
>> =# alter table if exists
>> ======
>> =# alter table I<tab>
>> =# alter table IF EXISTS // "information_schema" doesn't match.
>>
>> Since this is another problem from IF (NOT) EXISTS, this is
>> in separate form.
>>
>> What do you think about this?
>>
>
> +1
>

The new behave is much better.

I found new warning

tab-complete.c:1438:87: warning: right-hand operand of comma expression
has no effect [-Wunused-value]
gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard
-g -O2 -I. -I. -I../../../src/interfaces/libpq -I../../../src/include
-D_GNU_SOURCE -I/usr/include/libxml2 -c -o sql_help.o sql_help.c

There is small minor issue - I don't know if it is solvable. Autocomplete
is working only for "if" keyword. When I am writing "if " or "if " or "if
exi" - then autocomplete doesn't work. But this issue is exactly same for
other "multi words" completation like "alter foreign data wrapper". So if
it is fixable, then it can be out of scope this patch.

anything else looks well.

Regards

Pavel

>
> Regards
>
> Pavel
>
>
>
>>
>> regards,
>>
>> --
>> Kyotaro Horiguchi
>> NTT Open Source Software Center
>>
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2016-03-30 08:09:01 Re: Updated backup APIs for non-exclusive backups
Previous Message Andres Freund 2016-03-30 07:16:16 Re: Move PinBuffer and UnpinBuffer to atomics