Re: pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Marko Tiikkaja <marko(at)joh(dot)to>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump: CREATE TABLE + CREATE RULE vs. relreplident
Date: 2015-03-12 13:30:30
Message-ID: 87y4n2qra4.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Marko" == Marko Tiikkaja <marko(at)joh(dot)to> writes:

Marko> Hi,

Marko> My colleague Per Lejontand brought to my attention that when
Marko> dumping views with circular dependencies from a postgres version
Marko> older than 9.4 using a recent pg_dump, the SQL looks something
Marko> like the following:

Marko> create table qwr();
Marko> create rule "_RETURN" as on select to qwr do instead select;

I've wondered for a while whether this wouldn't have been better handled
as:

create view qwr(colnames...) as select null::type1, null::type2, ...;
/* ... */
create or replace view qwr as ...;

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2015-03-12 13:38:50 Re: OOM-killer issue when updating a inheritance table which has large number of child tables
Previous Message Marko Tiikkaja 2015-03-12 13:25:24 pg_dump: CREATE TABLE + CREATE RULE vs. relreplident