Re: [HACKERS] Incomplete idea about views and INSERT...RETURNING

2001-07-22 Thread Tom Lane
Andrew McMillan <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Could we get away with restricting INSERT RETURNING to work only on >> inserts directly to tables (no ON INSERT DO INSTEAD allowed)? Or is >> that too much of a kluge? > Isn't it likely that the person writing the RULE would want t

Re: [HACKERS] Incomplete idea about views and INSERT...RETURNING

2001-07-22 Thread Andrew McMillan
Tom Lane wrote: > > While this all seems good at first glance, I am wondering just how > useful it really would be in practice. The problem is: how do you know > which rows to return in the RETURNS query? If you don't qualify the > selection then you'll get all the rows in the view, which is su

Re: [HACKERS] Incomplete idea about views and INSERT...RETURNING

2001-07-21 Thread Philip Warner
At 18:03 21/07/01 -0400, Tom Lane wrote: > >Could we get away with restricting INSERT RETURNING to work only on >inserts directly to tables (no ON INSERT DO INSTEAD allowed)? Or is >that too much of a kluge? > I don't see it as a kludge, just a limitation on the first pass. If people need the fe

[HACKERS] Incomplete idea about views and INSERT...RETURNING

2001-07-21 Thread Tom Lane
I like the idea of adding an INSERT ... RETURNING capability, per Philip Warner's suggestion of about a year ago (http://fts.postgresql.org/db/mw/msg.html?mid=68704). We did not figure out what to do if the INSERT operation is rewritten by a rule, but I have an idea about that. ISTM that to supp