Re: [PATCH] Remove make_temptable_name_n()

Aleksander Alekseev <aleksander@tigerdata.com>

From: Aleksander Alekseev <aleksander@tigerdata.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Shinya Kato <shinya11.kato@gmail.com>, Álvaro Herrera <alvherre@kurilemu.de>, Nathan Bossart <nathandbossart@gmail.com>
Date: 2025-10-21T12:36:46Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Remove make_temptable_name_n().

  2. Add support for REFRESH MATERIALIZED VIEW CONCURRENTLY.

Attachments

Hi Shinya,

Thanks for your feedback.

> The v1 revision removed make_temptable_name_n and added psprintf,
> which reduced the code size. However, the code size in v3 is almost
> unchanged, so it's unclear how beneficial this change actually is.

Right, the concept has changed a bit, see Álvaro's comment above.

> Anyway, I have a minor comment about the patch.
>
> + char* nsp = get_namespace_name(RelationGetNamespace(tempRel));
> + char* temprelname = RelationGetRelationName(tempRel);
> + char* diffrelname = psprintf("%s_%d", temprelname, 2);
>
> In PostgreSQL code, "char *xxx" seems to be more commonly used than "char* xxx".

My bad, I forgot to run pgindent. Here is the corrected patch.

-- 
Best regards,
Aleksander Alekseev