($INBOX_DIR/description missing)
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Corey Huinker <[email protected]>
Cc: Jeff Davis <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: jian he <[email protected]>
Cc: Nathan Bossart <[email protected]>
Cc: Bruce Momjian <[email protected]>
Cc: Matthias van de Meent <[email protected]>
Cc: Magnus Hagander <[email protected]>
Cc: Stephen Frost <[email protected]>
Cc: Ashutosh Bapat <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: [email protected]
Subject: Re: Statistics Import and Export
Date: Sun, 23 Feb 2025 20:14:16 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CADkLM=ckXu5wzSQZ3Y_fvAaL8rZ+upZdSecBLf5FCTMj7M6T-A@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<CADkLM=fzX7QX6r78fShWDjNN3Vcr4PVAnvXxQ4DiGy6V=0bCUA@mail.gmail.com>
<[email protected]>
<CADkLM=cALMHZkXU+xZw9-WeR4XSXzDYj_-xERHg8haYq1zbjhg@mail.gmail.com>
<[email protected]>
<[email protected]>
<sdno5atrplq5b67vcx7x6fkzevwkzojd23izbguy2yma424wmp@siwbi3ijxdxs>
<x5yo5ly5u3dhzfaq3hrzeqhju3io5zmwk4yqrkge3ywcflffck@ghbbgsfv56yb>
<[email protected]>
<blezfpeafycxlizyynwvwzh2vywmklhvfqudhicjrccu4raqpx@4ttfufowc2vo>
<[email protected]>
<CADkLM=f0a43aTd88xW4xCFayEF25g-7hTrHX_WhV40HyocsUGg@mail.gmail.com>
<[email protected]>
<CADkLM=ckXu5wzSQZ3Y_fvAaL8rZ+upZdSecBLf5FCTMj7M6T-A@mail.gmail.com>
Corey Huinker <[email protected]> writes:
> If we're fine with giving up on appendNamedArgument() for relstats,
> wouldn't we also want to mash these into a single call?
> appendPQExpBuffer(out, "\t'relation', '%s'::regclass,\n", qualname);
> appendPQExpBuffer(out, "\t'version', '%u'::integer,\n",
> fout->remoteVersion);
> appendPQExpBuffer(out, "\t'relpages', '%d'::integer,\n", rsinfo->relpages);
> appendPQExpBuffer(out, "\t'reltuples', '%s'::real,\n", reltuples_str);
> appendPQExpBuffer(out, "\t'relallvisible', '%d'::integer\n);\n",
> rsinfo->relallvisible);
> to:
> appendPQExpBuffer(out, "\t'relation', '%s'::regclass"
> ",\n\t'version', '%u'::integer"
> ",\n\t'relpages', '%d'::integer"
> ",\n\t'reltuples', '%s'::real"
> ",\n\t'relallvisible', '%d'::integer",
> qualname, fout->remoteVersion, rsinfo->relpages,
> rsinfo->reltuples_str, rsinfo->relallvisible);
> appendPQExpBufferStr(out, "\n);\n");
That doesn't seem like an improvement. It's less readable ---
you have to match up %'s with arguments that are some distance
away --- and harder to modify. There might be some microscopic
performance benefit but it'd be pretty microscopic.
regards, tom lane
view thread (26+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Statistics Import and Export
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox