Re: psql tab-complete

2022-12-21 Thread Thomas Munro
On Thu, Dec 22, 2022 at 3:25 PM Michael Paquier wrote: > On Wed, Dec 21, 2022 at 05:56:05PM -0500, Tom Lane wrote: > > Thomas Munro writes: > >> Since I really want to be able to use VA_ARGS_NARGS() elsewhere, > > > > +1, that'd be handy. > > > >> ... Assuming those switches actually work as

Re: psql tab-complete

2022-12-21 Thread Michael Paquier
On Wed, Dec 21, 2022 at 05:56:05PM -0500, Tom Lane wrote: > Thomas Munro writes: >> Since I really want to be able to use VA_ARGS_NARGS() elsewhere, > > +1, that'd be handy. > >> ... Assuming those switches actually work as claimed, I see >> two choices: commit this hack with a comment

Re: psql tab-complete

2022-12-21 Thread Tom Lane
Thomas Munro writes: > Since I really want to be able to use VA_ARGS_NARGS() elsewhere, +1, that'd be handy. > ... Assuming those switches actually work as claimed, I see > two choices: commit this hack with a comment reminding us to clean it > up later, or drop 2015. As long as we can hide

Re: psql tab-complete

2022-12-21 Thread Thomas Munro
On Sat, Oct 26, 2019 at 4:59 PM Michael Paquier wrote: > On Fri, Oct 25, 2019 at 11:57:18AM +0300, Victor Spirin wrote: > > This patch resolved one problem in the tab-complete.c on MSVC. The > > VA_ARGS_NARGS macros now work correctly on Windows. > > Can you explain why and in what the use of

Re: psql tab-complete

2019-10-25 Thread Michael Paquier
On Fri, Oct 25, 2019 at 11:57:18AM +0300, Victor Spirin wrote: > This patch resolved one problem in the tab-complete.c on MSVC. The > VA_ARGS_NARGS macros now work correctly on Windows. Can you explain why and in what the use of EXPAND() helps with MSVC builds? Any references which help to

Re: psql tab-complete

2019-10-25 Thread Victor Spirin
This patch resolved one problem in the tab-complete.c on MSVC. The VA_ARGS_NARGS macros now work correctly on Windows. Victor Spirin Postgres Professional:http://www.postgrespro.com The Russian Postgres Company 25.10.2019 0:53, Victor Spirin пишет: Yes, I found, that VA_ARGS_NARGS(__

Re: psql tab-complete

2019-10-24 Thread Victor Spirin
Yes, I found, that VA_ARGS_NARGS(__ VA_ARGS__) macros always return 1 on Windows. Victor Spirin Postgres Professional:http://www.postgrespro.com The Russian Postgres Company 25.10.2019 0:48, Tom Lane пишет: Victor Spirin writes: I found some problem with tab-complete in the 12 version.  I

Re: psql tab-complete

2019-10-24 Thread Tom Lane
Victor Spirin writes: > I found some problem with tab-complete in the 12 version.  I checked > this in the Windows. This change seems to break the case intended by the comment, ie given the context SELECT * FROM tablename WHERE we want to offer the columns of "tablename" as

Re: psql tab-complete

2019-10-24 Thread Victor Spirin
Sorry for wrong place and contents of my message. It seems that the VA_ARGS_NARGS (__ VA_ARGS__) macros always return 1 on Windows. Victor Spirin Postgres Professional:http://www.postgrespro.com The Russian Postgres Company 24.10.2019 19:11, Victor Spirin пишет: I found some problem with

psql tab-complete

2019-10-24 Thread Victor Spirin
I found some problem with tab-complete in the 12 version.  I checked this in the Windows. Victor Spirin Postgres Professional:http://www.postgrespro.com The Russian Postgres Company diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index e00dbab5aa..5d7f24e57a 100644 ---