From: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Euler Taveira <euler(at)eulerto(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Small memory fixes for pg_createsubcriber |
Date: | 2025-02-27 13:23:31 |
Message-ID: | CAEudQArao0KJ8n9neBbnOw_s76Tma4UwhGhyjGjgizD=yJXkXA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Em qui., 27 de fev. de 2025 às 02:51, Michael Paquier <michael(at)paquier(dot)xyz>
escreveu:
> On Tue, Feb 25, 2025 at 08:54:31AM -0300, Ranier Vilela wrote:
> > @@ -455,7 +455,9 @@ set_locale_and_encoding(void)
> > locale->db_locale,
> > strlen(locale->db_locale));
> > else
> > - datlocale_literal = pg_strdup("NULL");
> > + datlocale_literal = PQescapeLiteral(conn_new_template1,
> > + "NULL",
> > + strlen("NULL"));
>
> Yeah, I've considered that but hardcoding NULL twice felt a bit weird,
> as well. Perhaps it's slightly cleaner to use an intermediate
> variable given then as an argument of PQescapeLiteral()?
>
Yeah, I also think it would look good like this.
v1 attached.
best regards,
Ranier Vilela
Attachment | Content-Type | Size |
---|---|---|
v1-avoid-mix-api-pg_upgrade.patch | application/octet-stream | 1.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2025-02-27 13:38:24 | Re: Serverside SNI support in libpq |
Previous Message | Andres Freund | 2025-02-27 13:21:22 | Re: Add support for EXTRA_REGRESS_OPTS for meson |