From: | "James B(dot) Byrne" <byrnejb(at)harte-lyne(dot)ca> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | "Adrian Klaver" <adrian(dot)klaver(at)gmail(dot)com> |
Subject: | Re: Having a problem with RoR-3.1.1 and Pg-9.1 |
Date: | 2012-02-27 19:44:09 |
Message-ID: | 6323c3cf20daaf399059c55d91bed0be.squirrel@webmail.harte-lyne.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, February 27, 2012 13:54, Adrian Klaver wrote:
> On 02/27/2012 08:51 AM, James B. Byrne wrote:
>>
>> The options seem to be run the script as the owner of
>> the
>> plpgsql EXTENSION or do not include the comment.
>>
>> How does one instruct pg_dump not to include the COMMENT
>> for the plpgsql extension?
>
> I am not sure pg_dump is including the COMMENT. From your
> previous post the source of the COMMENT would seem to be
> development_structure.sql, which I assume is coming from
> RoR.
>
RoR is using pg_dump to create development_structure.sql.
A direct invocation of pg_dump -s from the command line
gives this output.
. . .
COMMENT ON SCHEMA public IS 'standard public schema';
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA
pg_catalog;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural
language';
. . .
So, RoR is simply trying to deal with what Pg is providing
it.
The questions are:
1. Can the comments be suppressed? If so then how are the
COMMENT statements suppressed within Pg itself or
pg_dump?. The development_structure.sql is regenerated
automatically so editing that file is futile.
2. Why is this an error in the first place? Surely a
warning is sufficient if a comment cannot be applied.
3. Why are these dependencies not owned by the database
owner to begin with? Surely this code:
CREATE EXTENSION plpgsql
SCHEMA pg_catalog
VERSION "1.0";
ALTER EXTENSION plpgsql
OWNER TO postgres;
could just as easily specify the actual database owner
instead?
--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB(at)Harte-Lyne(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | James B. Byrne | 2012-02-27 20:02:33 | Re: Having a problem with RoR-3.1.1 and Pg-9.1 |
Previous Message | Mike Blackwell | 2012-02-27 19:31:00 | Orphaned temp table |