Re: Use more CppAsString2() in pg_amcheck.c

2024-11-25 Thread Michael Paquier
On Mon, Nov 25, 2024 at 06:25:46PM +0300, Karina Litskevich wrote: > The patch looks good to me. Thanks for the review. > They are not identical: space before AND vs space at the end of the > previous line. I'd say that it would be better if they were > identical. Personally, I prefer the one wit

Re: Use more CppAsString2() in pg_amcheck.c

2024-11-25 Thread Karina Litskevich
On Sat, Oct 19, 2024 at 4:17 AM Michael Paquier wrote: > Removed that in the v2 attached. Hi Michael, The patch looks good to me. I'd like to suggest discussing a little cosmetic change in the affected lines. Compare the following. Lines 2095-2098: appendPQExpBuffer(&sql, "

Re: Use more CppAsString2() in pg_amcheck.c

2024-10-18 Thread Michael Paquier
On Fri, Oct 18, 2024 at 12:22:26PM -0500, Nathan Bossart wrote: > On Fri, Oct 18, 2024 at 06:50:50PM +0900, Michael Paquier wrote: >> -appendPQExpBufferStr(&sql, "\nWHERE c.relpersistence != 't'"); >> +appendPQExpBufferStr(&sql, "\nWHERE c.relpersistence != " >> +

Re: Use more CppAsString2() in pg_amcheck.c

2024-10-18 Thread Nathan Bossart
On Fri, Oct 18, 2024 at 06:50:50PM +0900, Michael Paquier wrote: > - appendPQExpBufferStr(&sql, "\nWHERE c.relpersistence != 't'"); > + appendPQExpBufferStr(&sql, "\nWHERE c.relpersistence != " > + > CppAsString2(RELPERSISTENCE_TEMP) " "); I th

Re: Use more CppAsString2() in pg_amcheck.c

2024-10-18 Thread Alvaro Herrera
On 2024-Oct-18, Alvaro Herrera wrote: > Hmm, aren't you losing the single quotes? Ah, the defines themselves include the quotes, so this is not needed. Sorry for the noise. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ Syntax error: function hell() needs an ar

Re: Use more CppAsString2() in pg_amcheck.c

2024-10-18 Thread Alvaro Herrera
On 2024-Oct-18, Michael Paquier wrote: > pg_amcheck.c is one of these places where relkind and relpersistence > values are hardcoded in queries based on the contents of pg_class_d.h. > Similarly to other places in src/bin/, let's sprinkle some > CppAsString2() and feed to the binary the values fro

Re: Use more CppAsString2() in pg_amcheck.c

2024-10-18 Thread Daniel Gustafsson
> On 18 Oct 2024, at 11:50, Michael Paquier wrote: > pg_amcheck.c is one of these places where relkind and relpersistence > values are hardcoded in queries based on the contents of pg_class_d.h. > Similarly to other places in src/bin/, let's sprinkle some > CppAsString2() and feed to the binary t