Search Postgresql Archives

Re: Having a problem with RoR-3.1.1 and Pg-9.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx
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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux