Re: IF (NOT) EXISTS in psql-completion - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: IF (NOT) EXISTS in psql-completion
Date
Msg-id CAFj8pRBVKa6NG4JwZ2QmrO7inudFJws5w0+demVgZZNuF-HUkQ@mail.gmail.com
Whole thread Raw
In response to Re: IF (NOT) EXISTS in psql-completion  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: IF (NOT) EXISTS in psql-completion  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List 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


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Move PinBuffer and UnpinBuffer to atomics
Next
From: Amit Kapila
Date:
Subject: Re: Updated backup APIs for non-exclusive backups