pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marc Mitchell <marcm@eisolution.com>
To: pgsql-admin@postgresql.org
Subject: pg_dump and views
Date: Wed, 27 Mar 2002 16:26:15 -0600
Message-ID: <01f201c1d5de$6ba33a80$7501050a@eisolution.com> (raw)

I've run into what I think is a problem with pg_dump.

I'm running 7.1.2 under RedHat.

I issue a schema-only pg_dump as follows:

pg_dump -c -s -S postgres me|gzip>
/u0/prod/sql/backups/$YEAR.$MONTH.$DAY.schema.gz

Everything seems to run fine.  However, upon restore no views were seen.
Investigation of the created dump file showed the commands to GRANT were
issued before the actual command to create the views in the first place.
See the following:

--
-- Name: plc_loc_view Type: ACL Owner:
--

REVOKE ALL on "plc_loc_view" from PUBLIC;
GRANT ALL on "plc_loc_view" to PUBLIC;
GRANT ALL on "plc_loc_view" to "me";

--
-- TOC Entry ID 58 (OID 135271)
--
-- Name: plc_loc_view Type: VIEW Owner: me
--

CREATE VIEW "plc_loc_view" as SELECT plc.plc_uid, plc.plc_type_code,
plc.account
_nbr, plc.plc_name, plc.address_1, plc.address_2, plc.loc_uid,
plc.nd_zipcode, p


Is there something here I'm missing.

Marc Mitchell
Enterprise Information Solutions, Inc.
marcm@eisolution.com





Message-ID: <01f201c1d5de$6ba33a80$7501050a@eisolution.com>
Permalink:  ../01f201c1d5de$6ba33a80$7501050a@eisolution.com/
Also on:    postgresql.org/message-id/01f201c1d5de$6ba33a80$7501050a@eisolution.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: marcm@eisolution.com
  Subject: Re: pg_dump and views
  In-Reply-To: <01f201c1d5de$6ba33a80$7501050a@eisolution.com>
  References: <01f201c1d5de$6ba33a80$7501050a@eisolution.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox