Make `Connection`’s `parsedStatements` a prototypeless object

Author: briancCreated Mar 5, 2026Updated Aug 11, 2026

make Connection’s parsedStatements a prototypeless object

(= namedQueries on the native Client)

Maybe nobody has ever tried to prepare a query with name: 'constructor' (let alone the more obscure options on Object.prototype), and maybe nobody ever will, but it would be nice not to have to think about this anymore. Technically a breaking change for anyone who’s reaching into pg internals to do an inadvisable client.connection.parsedStatements.hasOwnProperty(…) check, for example.

Originally posted by @charmander in https://github.com/brianc/node-postgres/discussions/3598#discussioncomment-15942909