pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gerard Mason <gerardmason@hotmail.com>
To: pgsql-admin@postgresql.org
Subject: pg_dump dumps views as tables???
Date: Thu, 14 Jun 2001 23:20:18 +0100
Message-ID: <9gbd3s$2d6$1@news.tht.net> (raw)

I am running postgresql-server-7.0.3-12mdk (Mandrake 8.0). The relevant part
of my build script looks like this:

create view included_works
as
  select uuid, title as lhs
       , trim(to_char(cast(year_of_publication as int), '0000')) as rhs
    from works
   where include=true
;

What pg_dump actually outputs is this:

CREATE TABLE "included_works" (
 "uuid" character(36),
 "lhs" character varying(80),
 "rhs" text
);


I would be more appalled if I was less gobsmacked. Surely I'm doing
something wrong? But I can't find any reference to this in either the Admin
Guide or the Reference Manual (though admittedly I'm looking at the 7.1
ones -- the 7.0 ones didn't have any info on it at all, I think).

Help.






view thread (6+ messages)  latest in thread

Message-ID: <9gbd3s$2d6$1@news.tht.net>
Permalink:  ../9gbd3s$2d6$1@news.tht.net/
Also on:    postgresql.org/message-id/9gbd3s$2d6$1@news.tht.net

 · 

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: gerardmason@hotmail.com
  Subject: Re: pg_dump dumps views as tables???
  In-Reply-To: <9gbd3s$2d6$1@news.tht.net>
  References: <9gbd3s$2d6$1@news.tht.net>

* 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