pgschema
pgschema copied to clipboard
pgschema can't read procedure definitions which psql can read
Same user in both cases. Once again this is a proc owned by a role I don't have.
~/dev/repos/clientdatamart 🌳tryout-pgschema$ pgschema --debug dump --host dib.prod.bvgs.co --db dib --user marcintustin --schema public --file schemas/public/main.sql --multi-file
time=2025-09-22T14:47:36.054-04:00 level=DEBUG msg="Attempting database connection" host=dib.prod.bvgs.co port=5432 database=dib user=marcintustin sslmode=prefer application_name=pgschema
time=2025-09-22T14:47:36.538-04:00 level=DEBUG msg="Database connection established successfully"
Error: failed to build IR: independent objects: permission denied: cannot access procedure definition for public.etl_refresh_cdm_client_supplier (procedure may be owned by a restricted role)
~/dev/repos/clientdatamart 🌳tryout-pgschema$ psql 'host=dib.prod.bvgs.co user=marcintustin dbname=dib keepalives=1 keepalives_idle=10'
Timing is on.
psql (14.18 (Homebrew), server 14.17)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.
dib=> \set ECHO_HIDDEN on
dib=> \pset pager off
Pager usage is off.
dib=> \sf public.etl_refresh_cdm_client_supplier
********* QUERY **********
SELECT 'public.etl_refresh_cdm_client_supplier '::pg_catalog.regproc::pg_catalog.oid
**************************
********* QUERY **********
SELECT pg_catalog.pg_get_functiondef(9118914)
**************************
CREATE OR REPLACE PROCEDURE public.etl_refresh_cdm_client_supplier()
LANGUAGE sql
AS $procedure$
[...rest of the proc...]
$procedure$
dib=>