Re: Mirroring a DB

From: Peter Eisentraut <e99re41(at)DoCS(dot)UU(dot)SE>
To: hackers(at)postgresql(dot)org
Cc: swalton(at)galileo(dot)csun(dot)edu, Karl DeBisschop <kdebisschop(at)range(dot)infoplease(dot)com>
Subject: Re: Mirroring a DB
Date: 1999-12-11 14:51:44
Message-ID: Pine.GSO.4.02A.9912111546350.5375-100000@Krabba.DoCS.UU.SE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general 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(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Karl DeBisschop 1999-12-11 23:20:18 Mirroring a DB (was Re: [GENERAL] \d shows all my tables twice)
Previous Message Karl DeBisschop 1999-12-11 14:41:41 Re: Mirroring a DB

Browse pgsql-hackers by date

  From Date Subject
Next Message Don Baccus 1999-12-11 15:09:28 Re: [HACKERS] LONG
Previous Message Karl DeBisschop 1999-12-11 14:41:41 Re: Mirroring a DB