I am failing to create a rule which will return the insert's data.
The table is:
CREATE TABLE foo(a int, b text);
My attempt for the rule is:
CREATE RULE return_data AS ON INSERT TO foo DO RETURN *;
I am failing to create a rule which will return the insert's data. The table is:
My attempt for the rule is:
|
|||
You can create an
Note that you can do something identical by just adding the RETURNING clause to the INSERT statement:
|
||||
|
INSERT INTO foo VALUES (1, 'test') RETURNING *;
) – hbn Sep 21 '14 at 19:39