Re: BUG #7842: pg_dump scripts view to table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: lopuszanski(at)oleofarm(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #7842: pg_dump scripts view to table
Date: 2013-01-31 19:27:35
Message-ID: 18122.1359660455@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

lopuszanski(at)oleofarm(dot)com writes:
> 1. after using pg_dump to dump WHOLE database to file, 1 of views 'turned'
> into a table.

> so there is no 'create or replace VIEW XXXX .......' with definition, but
> instead:
> its scripted as 'create TABLE XXXX......' and definition.(in file that
> pg_dump created)

There's probably a CREATE RULE command further down that turns it into a
view again.

> 2. but after using pg_dump to dump only this 1 problematic 'view' (with -t
> option) it stores it correcly as 'create or replace VIEW XXXX .......'

That's not terribly surprising. The separate table and rule entries
would only be used when it's necessary to work around a circular
dependency with some other object.

> it looks like pg_dump has problem with dependancies of this view.....

I see no reason to think there's a bug here. If you still think it's
a bug, you need to provide enough information for someone else to
reproduce the case.
http://www.postgresql.org/docs/9.1/static/bug-reporting.html

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2013-01-31 20:04:14 Re: BUG #7840: PostgreSQL 9.3 devel select for no key share lock bug?
Previous Message Toby Murray 2013-01-31 17:17:52 Violation of primary key constraint