cli
cli copied to clipboard
fix (pg-v5): Look for pg_stat_statements in heroku_ext
Following https://devcenter.heroku.com/changelog-items/2446
We need to also include heroku_ext
here.
Testing on a new db:
ds9aic4ustc1f=> SELECT exists(
SELECT 1 FROM pg_extension e LEFT JOIN pg_namespace n ON n.oid = e.extnamespace
WHERE e.extname='pg_stat_statements' AND n.nspname = 'public'
);
exists
--------
f
(1 row)
ds9aic4ustc1f=> SELECT exists(
SELECT 1 FROM pg_extension e LEFT JOIN pg_namespace n ON n.oid = e.extnamespace
WHERE e.extname='pg_stat_statements' AND n.nspname = 'heroku_ext'
);
exists
--------
t
(1 row)
ds9aic4ustc1f=> SELECT exists(
SELECT 1 FROM pg_extension e LEFT JOIN pg_namespace n ON n.oid = e.extnamespace
WHERE e.extname='pg_stat_statements' AND n.nspname IN ('heroku_ext', 'public')
);
exists
--------
t
(1 row)