Re: Mirroring a DB - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Mirroring a DB
Date
Msg-id Pine.GSO.4.02A.9912111546350.5375-100000@Krabba.DoCS.UU.SE
Whole thread Raw
Responses Re: [HACKERS] Re: Mirroring a DB
List pgsql-hackers
Could the God of Rules please comment on this? It seems to be a deficiency
in the get_rule_def (sp?) backend function. Perhaps to play it safe all
attributes should be fully qualified, but that's probably not as easy as
it sounds.

On Sat, 11 Dec 1999, Karl DeBisschop wrote:

> to use a real world example, this is the output from pg_dump for a
> view that we have:
> 
> CREATE RULE "_RETelement_types" AS ON SELECT TO "element_types" DO
> INSTEAD SELECT "ref", "fcat", "ecat", "oid" AS "ecat_oid", "ord",                       ^^^^^^          ^^^^^
> "emin", "emax", "rows" FROM "fcat", "ecat" WHERE "ref" = "fcat";
> 
> In fact, it needs to be modified before it will parse to:
> 
> CREATE RULE "_RETelement_types" AS ON SELECT TO "element_types" DO
> INSTEAD SELECT "ref", fcat.fcat, "ecat", ecat.oid AS "ecat_oid",                       ^^^^^^^^^          ^^^^^^^^
> "ord", "emin", "emax", "rows" FROM "fcat", "ecat" WHERE fcat.ref =
> ecat.fcat;

[my highlightings]

-- 
Peter Eisentraut                  Sernanders vaeg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: wieck@debis.com (Jan Wieck)
Date:
Subject: Re: [HACKERS] 6.6 release
Next
From: Don Baccus
Date:
Subject: Re: [HACKERS] LONG