|From:||Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>|
|To:||Andres Freund <andres(at)anarazel(dot)de>|
|Cc:||Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>|
|Subject:||Re: [PATCH] Tab completion for ALTER DATABASE … SET TABLESPACE|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2018-09-20 18:38:36 -0400, Tom Lane wrote:
>> hmmm ... but even with variadic, C's macro facility is so weak that
>> I'm not sure we can reimplement these with it. What would the
>> expansion look like?
> There's a dirty hack to count arguments in vararg macros:
Doesn't seem to help for this case. What we really want is to expand
a given pattern once for each variadic argument, and I don't see how
to get there from here.
Although maybe I'm thinking too much inside-the-box. The expansion
doesn't necessarily have to be identical to the code the macros
generate today. In fact, that code is kinda bulky. I wonder if
we could go over to something involving a variadic function, or
maybe an array of string-pointer constants?
regards, tom lane
|Next Message||Peter Geoghegan||2018-09-20 23:18:37||On-disk compatibility for nbtree-unique-key enhancement|
|Previous Message||Andres Freund||2018-09-20 22:46:24||Re: [PATCH] Tab completion for ALTER DATABASE … SET TABLESPACE|