[doc] adding way to examine the plan type of prepared statements
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t43260psql -h localhost -U postgresBuilt from patchset v2 (message #2), October 23, 2026 at 12:58 AM.
Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:
git clone --branch t43260_2 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t43260_2 && git checkout t43260_2Patchset v2 (message #2) is on t43260_2
Hi,
Currently, EXPLAIN is the only way to know whether the plan is generic
or custom according to the manual of PREPARE.
https://www.postgresql.org/docs/devel/sql-prepare.html
After commit d05b172, we can also use pg_prepared_statements view to
examine the plan types.
How about adding this explanation like the attached patch?
Regards,
--
Atsushi Torikoshi
Attachments:
v1-0001-add-way-to-examine-plan-type.patchtext/x-diff; charset=us-ascii; name=v1-0001-add-way-to-examine-plan-type.patchDownload+7-1
On 2020-11-18 11:04, torikoshia wrote:
Hi,
Currently, EXPLAIN is the only way to know whether the plan is generic
or custom according to the manual of PREPARE.https://www.postgresql.org/docs/devel/sql-prepare.html
After commit d05b172, we can also use pg_prepared_statements view to
examine the plan types.How about adding this explanation like the attached patch?
Sorry, but on second thought, since it seems better to add
the explanation to the current description of pg_prepared_statements,
I modified the patch.
Regards,
--
Atsushi Torikoshi
Hi Torikoshi-san,
On Thu, Nov 19, 2020 at 3:19 PM torikoshia <torikoshia@oss.nttdata.com> wrote:
On 2020-11-18 11:04, torikoshia wrote:
Hi,
Currently, EXPLAIN is the only way to know whether the plan is generic
or custom according to the manual of PREPARE.https://www.postgresql.org/docs/devel/sql-prepare.html
After commit d05b172, we can also use pg_prepared_statements view to
examine the plan types.How about adding this explanation like the attached patch?
Sorry, but on second thought, since it seems better to add
the explanation to the current description of pg_prepared_statements,
I modified the patch.
You sent in your patch, v2-0001-add-way-to-examine-plan-type.patch to
pgsql-hackers on Nov 19, but you did not post it to the next
CommitFest[1]https://commitfest.postgresql.org/31/. If this was intentional, then you need to take no
action. However, if you want your patch to be reviewed as part of the
upcoming CommitFest, then you need to add it yourself before
2021-01-01 AoE[2]https://en.wikipedia.org/wiki/Anywhere_on_Earth. Thanks for your contributions.
Regards,
[1]: https://commitfest.postgresql.org/31/
[2]: https://en.wikipedia.org/wiki/Anywhere_on_Earth
--
Masahiko Sawada
EnterpriseDB: https://www.enterprisedb.com/