Re: [HACKERS] Re: Mirroring a DB - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Re: Mirroring a DB
Date
Msg-id 25498.944978592@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Re: Mirroring a DB  (Karl DeBisschop <kdebisschop@range.infoplease.com>)
List pgsql-hackers
Karl DeBisschop <kdebisschop@range.infoplease.com> writes:
>> Current
>> sources will put table prefixes on every var in a rule if more than one
>> table appears in the rule's rangelist.  I think this should be
>> sufficient, but it's hard to tell from this incomplete example;

> Version 6.5.3 seem to behave as you said, so I'm guessing that this
> fix occurred relatively recently and I was just unaware it had been
> fixed.

Actually, 6.5.3 just unconditionally prefixes all vars in a decompiled
rule, all the time.  That was a quick-patch solution to the type of
problem you are complaining of.  Current sources (6.6/7.0-to-be) try to
be smarter by only prefixing vars when there is possible ambiguity (ie,
more than one table in the rangelist).  That's why I was concerned about
the details of your example --- I was wondering if this "improvement"
might fail under the right special case...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Jesus, what have I done (was: LONG)
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] createdb with alternate location