> With this approach, you still have to update your rules if
> you want to support RETURNING on your views --- but if you
> don't update them, you don't have a security hole. Basically
> the standard setup for an updatable view would use
> "ON INSERT DO INSTEAD INSERT INTO ... RETURNING
I wrote:
> After some further thought, I think we could make it work if we treat
> XXX RETURNING as a distinct rule event type and make the following
> restrictions (which are exactly analogous to the restrictions for ON
> SELECT rules) for ON XXX RETURNING rules:
After working on this for a bit,
"Jaime Casanova" <[EMAIL PROTECTED]> writes:
> On 8/15/06, Tom Lane <[EMAIL PROTECTED]> wrote:
>> I'm tempted to suggest that the RETURNING commands might need to be
>> separate rule events, and that to support this you'd need to write
>> an additional rule:
>>
>> CREATE RULE r1 AS ON INSERT RETUR
On 8/15/06, Tom Lane <[EMAIL PROTECTED]> wrote:
I'm tempted to suggest that the RETURNING commands might need to be
separate rule events, and that to support this you'd need to write
an additional rule:
CREATE RULE r1 AS ON INSERT RETURNING TO myview DO INSTEAD
INSERT ...
--On Dienstag, August 15, 2006 16:33:27 -0400 Tom Lane <[EMAIL PROTECTED]>
wrote:
I'm tempted to suggest that the RETURNING commands might need to be
separate rule events, and that to support this you'd need to write
an additional rule:
CREATE RULE r1 AS ON INSERT RETURNING TO myview DO
On 8/15/06, Tom Lane <[EMAIL PROTECTED]> wrote:
But even this seems like it would fail in complicated cases. What if
the view is a join, and your ON INSERT rule inserts into two different
underlying tables in two commands? If you need fields from both tables
to generate a full RETURNING list th
"Jaime Casanova" <[EMAIL PROTECTED]> writes:
> On 8/15/06, Tom Lane <[EMAIL PROTECTED]> wrote:
>> What are you testing exactly? I think this recent fix might be
>> relevant:
>> http://archives.postgresql.org/pgsql-committers/2006-08/msg00299.php
> i have tested again against current HEAD... what
On 8/15/06, Tom Lane <[EMAIL PROTECTED]> wrote:
"Jaime Casanova" <[EMAIL PROTECTED]> writes:
> I'm doing some tests of Bernd's updatable views patch and found
> something interesting about the RETURNING behavior
> ...
> but if i insert using the rules the returning clause is ignored
> testing_uv=
"Jaime Casanova" <[EMAIL PROTECTED]> writes:
> I'm doing some tests of Bernd's updatable views patch and found
> something interesting about the RETURNING behavior
> ...
> but if i insert using the rules the returning clause is ignored
> testing_uv=# insert into v_bar values (3), (4) returning *;
>
Hi,
I'm doing some tests of Bernd's updatable views patch and found
something interesting about the RETURNING behavior
testing_uv=# create table bar (field1 integer);
CREATE TABLE
testing_uv=# create view v_bar as select * from bar;
CREATE VIEW
the rules are created as:
"_DELETE" AS
ON DELE
10 matches
Mail list logo