Need help extripating plpgsql - Mailing list pgsql-general

From James B. Byrne
Subject Need help extripating plpgsql
Date
Msg-id 1b8bae0e0822578a72f686d528337525.squirrel@webmail.harte-lyne.ca
Whole thread Raw
Responses Re: Need help extripating plpgsql  ("James B. Byrne" <byrnejb@harte-lyne.ca>)
Re: Need help extripating plpgsql  (Adrian Klaver <adrian.klaver@gmail.com>)
List pgsql-general
I am trying, without success, to create a PG-9.2 database without
including the plpgsql extension.  I have tried specifying template0
and the database is nonetheless created with plpgsql.  I have deleted
plpgsql from template1 and the new database is nonetheless created
with plpgsql.

I desire to remove plpgsql from newly created databases because the
dump that is generated by pgdump contains this line:

CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;

And for some reason this statement causes my test suit to fail with
this error:

psql:/home/byrnejb/Projects/Software/theHeart/code/proforma_rails_3_2/db/=
structure.sql:22:
ERROR:  must be owner of extension plpgsql

I do not understand why this happens since, as I read this, if the
plpgsql extension already exists in the database, which it does, then
this statement should not be executed at all.  But it does.  Further,
I do not understand why or how plpgsql is being included into
databases on create as I have removed it from template1 and it does
not exist in template0 to begin with.

I note that plpgsql has NO owner specified in the newly created
database, which mystifies me as well.  Naively I thought that newly
created databases would have all of their components owned by the
database owner.

How do I resolve this problem?


--=20
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3

pgsql-general by date:

Previous
From: Asmir Mustafic
Date:
Subject: Full text and removing dashes from names
Next
From: bricklen
Date:
Subject: View to show privileges on views/tables/sequences/foreign tables