Re: Double prepare
Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
From: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
To: Igor Korot <ikorot01@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, "pgsql-generallists.postgresql.org" <pgsql-general@lists.postgresql.org>,
Rob Sargent <robjsargent@gmail.com>
Date: 2026-05-16T14:37:38Z
Lists: pgsql-general
A couple more things to keep in mind: 1) The client has to re-prepare statements on "deallocate all", "alter", "create", "drop", "alter", "set search_path" statements. The backend does not automatically keep the prepared statement workable across those calls. The offending error messages are "ERROR: cached plan must not change result type", "ERROR: prepared statement "S_2" does not exist" 2) I've an answer regarding "prepared statement lifespan" at https://stackoverflow.com/questions/32297503/whats-the-life-span-of-a-postgresql-server-side-prepared-statement/32300222#32300222 Looking forward to adding more references there. Feel free pinging me in the comments. Vladimir