Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-05-05 Thread Robert Haas
On Fri, May 1, 2015 at 1:06 PM, Andres Freund wrote: > On 2015-05-01 13:03:39 -0400, Bruce Momjian wrote: >> Applied and backpatched to 9.4. > > Ah. Forgot about that. Thanks! > > Andres > > .oO(bugtracker?) I don't really see how that would help. People can forget about a ticket in a bugtracker

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-05-01 Thread Andres Freund
On 2015-05-01 13:03:39 -0400, Bruce Momjian wrote: > Applied and backpatched to 9.4. Ah. Forgot about that. Thanks! Andres .oO(bugtracker?) -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hac

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-05-01 Thread Bruce Momjian
On Thu, Mar 12, 2015 at 03:14:48PM +0100, Andres Freund wrote: > Hi, > > On 2015-03-12 14:25:24 +0100, Marko Tiikkaja wrote: > > My colleague Per Lejontand brought to my attention that when dumping views > > with circular dependencies from a postgres version older than 9.4 using a > > recent pg_du

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Tom Lane
Robert Haas writes: > On Thu, Mar 12, 2015 at 12:46 PM, Tom Lane wrote: >> Sorry, that's mere historical revisionism. > Can we please keep this a little more civil? Saying it that way > implies bad faith. You could instead write "I think you are > mistaken". Hmm, I take that phrase as being a

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Robert Haas
On Thu, Mar 12, 2015 at 12:46 PM, Tom Lane wrote: >> As it happens it does not; the issue came up originally because of a >> hack I came up with, and I've never used any pg version so old it didn't >> have CREATE OR REPLACE VIEW. Nor does it look like the change was ever >> backpatched (or at leas

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Tom Lane
Andrew Gierth writes: > "Tom" == Tom Lane writes: > Tom> Yeah, possibly. The existing pg_dump coding dates from before we > Tom> had CREATE OR REPLACE VIEW. > As it happens it does not; the issue came up originally because of a > hack I came up with, and I've never used any pg version so old

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Alvaro Herrera
Andrew Gierth wrote: > > "Tom" == Tom Lane writes: > Tom> Yeah, possibly. The existing pg_dump coding dates from before we > Tom> had CREATE OR REPLACE VIEW. > > As it happens it does not; the issue came up originally because of a > hack I came up with, and I've never used any pg version

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Andrew Gierth
> "Tom" == Tom Lane writes: >> 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 ...; Tom> Yeah, possibly. The existing pg_dump coding

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Andres Freund
Hi, On 2015-03-12 14:25:24 +0100, Marko Tiikkaja wrote: > My colleague Per Lejontand brought to my attention that when dumping views > with circular dependencies from a postgres version older than 9.4 using a > recent pg_dump, the SQL looks something like the following: > > create table qwr();

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Tom Lane
Andrew Gierth writes: > "Marko" == Marko Tiikkaja writes: > 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::type

Re: [HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Andrew Gierth
> "Marko" == Marko Tiikkaja 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: M

[HACKERS] pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

2015-03-12 Thread Marko Tiikkaja
Hi, My colleague Per Lejontand brought to my attention that when dumping views with circular dependencies from a postgres version older than 9.4 using a recent pg_dump, the SQL looks something like the following: create table qwr(); create rule "_RETURN" as on select to qwr do instead sel