From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Gerard Mason <gerardmason(at)hotmail(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Re: pg_dump dumps views as tables??? |
Date: | 2001-06-20 20:49:38 |
Message-ID: | Pine.BSF.4.21.0106201342540.99425-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
My guess would be that it's being dumped as a table with
an ON SELECT rule (the internal form of the view). IIRC,
7.1's pg_dump is smarter about this.
Check for a CREATE RULE for the table.
On Tue, 19 Jun 2001, Gerard Mason wrote:
> Anybody?
>
>
> "Gerard Mason" <gerardmason(at)hotmail(dot)com> wrote in message
> news:9gbd3s$2d6$1(at)news(dot)tht(dot)net(dot)(dot)(dot)
> > 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).
From | Date | Subject | |
---|---|---|---|
Next Message | Ross J. Reedstrom | 2001-06-20 21:29:58 | Re: Re: pg_dump dumps views as tables??? |
Previous Message | Peter Eisentraut | 2001-06-20 20:36:28 | Re: Full backup |