There is no information about the key "pgsql.custom.query" on the page https://www.zabbix.com/documentation/5.4/manual/config/items/itemtypes/zabbix_agent/zabbix_agent2
And in the specification config for Linux and Windows, parameter "Plugins.Postgres.CustomQueriesPath":
No information from version 5.0 to the current version (5.4)
It would also be helpful to post more prominently the use of custom queries. Now located at the link here https://www.zabbix.com/documentation/current/manual/config/items/plugins (https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/postgres/README.md)
I will be glad if the information appears in the near future.