On Sun, Jan 23, 2022 at 7:25 PM Michael Paquier wrote:
> On Sun, Jan 23, 2022 at 01:31:03PM -0500, Tom Lane wrote:
> > We could consider a more global change to get rid of using
> > appendPQExpBuffer where it's not absolutely necessary, so that
> > there are fewer bad examples to copy. Another i
On Sun, Jan 23, 2022 at 01:31:03PM -0500, Tom Lane wrote:
> We could consider a more global change to get rid of using
> appendPQExpBuffer where it's not absolutely necessary, so that
> there are fewer bad examples to copy. Another idea is to deem
> it an anti-pattern to end a query with a semicol
"David G. Johnston" writes:
> I just spent 10 minutes thinking you were wrong because I confused the
> upgrade_query and upgrade_buffer variables in that function.
> You might just as well have fixed the first upgrade_query command to be
> print instead of append. And, better yet, renamed its va
On Sun, Jan 23, 2022 at 11:31 AM Tom Lane wrote:
>
> res = ExecuteSqlQueryForSingleRow(fout, upgrade_query->data);
> ...
> appendPQExpBuffer(upgrade_query,
> "SELECT t.oid, t.typarray "
> ...
> res = ExecuteSqlQueryForSingleRow(fou
While investigating for 353708e1f, I happened to notice that pg_dump's
binary_upgrade_set_type_oids_by_type_oid() contains
PQExpBuffer upgrade_query = createPQExpBuffer();
...
appendPQExpBuffer(upgrade_query,
"SELECT typarray "
...
res = ExecuteSqlQueryFor