BUG #7615: CREATE RULE + DEFAULT VALUES + pg_dump trouble

Started by Marko Tiikkajaover 13 years ago2 messagesbugs
Jump to latest
#1Marko Tiikkaja
marko@joh.to

The following bug has been logged on the website:

Bug reference: 7615
Logged by: Marko Tiikkaja
Email address: pgmail@joh.to
PostgreSQL version: 9.1.6
Operating system: Linux
Description:

Hi,

Doing this:

CREATE TABLE foo(a int);

CREATE TABLE bar(a int);

CREATE RULE bar_rule1 AS ON INSERT TO bar DO ALSO INSERT INTO foo DEFAULT
VALUES;

breaks pg_dump. It outputs the following:

CREATE RULE bar_rule1 AS ON INSERT TO bar DO INSERT INTO foo () VALUES
();

which obviously won't work. :-(

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Marko Tiikkaja (#1)
Re: BUG #7615: CREATE RULE + DEFAULT VALUES + pg_dump trouble

pgmail@joh.to writes:

Doing this:
CREATE RULE bar_rule1 AS ON INSERT TO bar DO ALSO INSERT INTO foo DEFAULT
VALUES;
breaks pg_dump. It outputs the following:
CREATE RULE bar_rule1 AS ON INSERT TO bar DO INSERT INTO foo () VALUES
();

Ooops :-(. Will fix, thanks for the report!

regards, tom lane