Re: pg_upgrade + Extensions

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Smitha Pamujula <smitha(dot)pamujula(at)iovation(dot)com>
Cc: "David E(dot) Wheeler" <david(at)justatheory(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Grant Holly <grant(dot)holly(at)iovation(dot)com>
Subject: Re: pg_upgrade + Extensions
Date: 2015-07-13 18:56:40
Message-ID: 55A409E8.5090004@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 07/13/2015 01:12 PM, Smitha Pamujula wrote:
> Yes. I have checked that the extension didn't exist in any of the
> databases. I used \dx to see if there was json_build was listed and i
> didnt see any. Is that sufficient to check its existence. I am about
> to do another testing in a few minutes on a different machine. I will
> capture before/after shots
>
>

Please don't top-post on the PostgreSQL lists - see
<http://idallen.com/topposting.html>

In theory it should be enough if it was installed in the standard way.
But a more thorough procedure would be to run this command:

select count(*)
from pg_proc
where prosrc ~ 'json_build';

Here's a one-liner that will check every database for you:

for db in `psql -t -c 'select datname from pg_database where
datallowconn'` ; do C=`psql -t -c "select count(*) from pg_proc
where prosrc ~ 'json_build'" $db`; echo $db $C; done

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2015-07-13 19:01:01 Re: A little RLS oversight?
Previous Message Stephen Frost 2015-07-13 18:46:55 Re: Default Roles (was: Additional role attributes)