John R Pierce <pierce@hogranch.com> writes:
> generally, built in functionality in PostgreSQL closely follows existing
> SQL database standards and practices, I've not seen or heard of any such
> 'persistent named prepared statements' before in any database system, so
> I suspect the core developers aren't going to go anywhere with this
> suggestion, but of course, I can't speak for them.
There have been previous proposals for a shared plan cache, which is
somewhat close to what the OP is suggesting. The trouble with the idea
is that maintenance of the cache would be a mess, and contention for it
would take a big bite out of whatever performance improvement might be
hoped for. We do already have session-local plan caching; it's unclear
that it makes sense to go further than that.
regards, tom lane