Re: [HACKERS] Return of INSTEAD rules

2002-10-04 Thread Zeugswetter Andreas SB SD
> > > I am confused how yours differs from mine. I don't see how the last > > > matching tagged query would not be from an INSTEAD rule. > > > > You could have both INSTEAD and non-INSTEAD rules firing for the same > > original query. If the alphabetically-last rule is a non-INSTEAD rule, > >

Re: [HACKERS] Return of INSTEAD rules

2002-10-04 Thread Bruce Momjian
Manfred Koizar wrote: > On Thu, 3 Oct 2002 22:21:27 -0400 (EDT), Bruce Momjian > <[EMAIL PROTECTED]> wrote: > >so I propose we handle > >INSTEAD rules this way: that we return the oid and tuple count of the > >last INSTEAD rule query with a tag matching the main query. > > Bruce, this won't wo

Re: [HACKERS] Return of INSTEAD rules

2002-10-04 Thread Bruce Momjian
Tom Lane wrote: > You can create as many rules as you want. One reasonably likely > scenario is that you have a view, you make an ON INSERT DO INSTEAD > rule to support insertions into the view (by inserting into some > underlying table(s) instead), and then you add some not-INSTEAD > rules to pe

Re: [HACKERS] Return of INSTEAD rules

2002-10-04 Thread Manfred Koizar
On Thu, 3 Oct 2002 22:21:27 -0400 (EDT), Bruce Momjian <[EMAIL PROTECTED]> wrote: >so I propose we handle >INSTEAD rules this way: that we return the oid and tuple count of the >last INSTEAD rule query with a tag matching the main query. Bruce, this won't work for this example >> CREATE

Re: [HACKERS] Return of INSTEAD rules

2002-10-04 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Bruce Momjian <[EMAIL PROTECTED]> writes: > I am confused how yours differs from mine. I don't see how the last > matching tagged query would not be from an INSTEAD rule. >> >> You could have both INSTEAD and non-INSTEAD rules firing

Re: [HACKERS] Return of INSTEAD rules

2002-10-04 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > I am confused how yours differs from mine. I don't see how the last > > matching tagged query would not be from an INSTEAD rule. > > You could have both INSTEAD and non-INSTEAD rules firing for the same > original query. If the alp

Re: [HACKERS] Return of INSTEAD rules

2002-10-03 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > I am confused how yours differs from mine. I don't see how the last > matching tagged query would not be from an INSTEAD rule. You could have both INSTEAD and non-INSTEAD rules firing for the same original query. If the alphabetically-last rule is a n

Re: [HACKERS] Return of INSTEAD rules

2002-10-03 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > We have talked about possible return values for RULES, particularly > > INSTEAD rule. Manfred has a nice example here, so I propose we handle > > INSTEAD rules this way: that we return the oid and tuple count of the > > last INSTEAD

Re: [HACKERS] Return of INSTEAD rules

2002-10-03 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > We have talked about possible return values for RULES, particularly > INSTEAD rule. Manfred has a nice example here, so I propose we handle > INSTEAD rules this way: that we return the oid and tuple count of the > last INSTEAD rule query with a tag mat

[HACKERS] Return of INSTEAD rules

2002-10-03 Thread Bruce Momjian
We have talked about possible return values for RULES, particularly INSTEAD rule. Manfred has a nice example here, so I propose we handle INSTEAD rules this way: that we return the oid and tuple count of the last INSTEAD rule query with a tag matching the main query. The returned tag, of cours