Subject | Additional Table Permissions Needed by Update in Stored Procedure |
---|---|
Author | pvmalone@netzero.net |
Post date | 2014-04-24T20:08:39Z |
Firebird Version: 2.5.2.26540
OS: Windows 7
I'm having an update permissions problem on a SQL update statement when I use the SQL in a stored procedure with "RETURNING/INTO".
I have granted update permissions on column1 and column2 to role1 with this command:
GRANT REFERENCES, SELECT, UPDATE(column1, column2) ON table1 TO ROLE role1;
This is the SQL update in the stored procedure:
UPDATE table1
SET column1 = 0,
column2 = 'NOW'
WHERE user_name = :p_user_name
RETURNING column3, column4
INTO :ret_column3, :ret_column4;
I get this error: "no permission for update/write access to column
table1.column3"
If I remove "RETURNING/INTO" from the SQL, then the update is successful. With "RETURNING" it requires me to grant update permissions on column3 and column4 even though column3 and column4 are not being updated. Should permissions work this way or is there a bug?
Thank you,
____________________________________________________________
Do THIS before eating carbs (every time)
1 EASY tip to increase fat-burning, lower blood sugar & decrease fat storage
http://thirdpartyoffers.netzero.net/TGL3231/53596f76c5f0d6f7671ebst01duc
OS: Windows 7
I'm having an update permissions problem on a SQL update statement when I use the SQL in a stored procedure with "RETURNING/INTO".
I have granted update permissions on column1 and column2 to role1 with this command:
GRANT REFERENCES, SELECT, UPDATE(column1, column2) ON table1 TO ROLE role1;
This is the SQL update in the stored procedure:
UPDATE table1
SET column1 = 0,
column2 = 'NOW'
WHERE user_name = :p_user_name
RETURNING column3, column4
INTO :ret_column3, :ret_column4;
I get this error: "no permission for update/write access to column
table1.column3"
If I remove "RETURNING/INTO" from the SQL, then the update is successful. With "RETURNING" it requires me to grant update permissions on column3 and column4 even though column3 and column4 are not being updated. Should permissions work this way or is there a bug?
Thank you,
____________________________________________________________
Do THIS before eating carbs (every time)
1 EASY tip to increase fat-burning, lower blood sugar & decrease fat storage
http://thirdpartyoffers.netzero.net/TGL3231/53596f76c5f0d6f7671ebst01duc