Sample Exam Questions
Choose the most appropriate privilege required to execute the following SELECT statement.
There are no particular restrictions, and any user can execute it.
Only the owner of the function testfunc can execute it.
This function can be executed if the EXECUTE privilege for the function testfunc has been GRANTED.
It can be executed if the SELECT privilege on the table 'testa' has been GRANTED.
Both the EXECUTE privilege for the function testfunc and the SELECT privilege on the table 'testa' must be GRANTED.
※This sample exam is different from those that appear in the actual OSS-DB Exam.
2024/05/02
In PostgreSQL, functions can be defined in various languages, including SQL and PL/pgSQL. The example defines a function in SQL.
To execute a function, you must have the EXECUTE privilege for that function GRANTED.
Furthermore, functions are executed with the privileges of the executor, regardless of their owner. Therefore, when a function accesses an object such as a table, it must have the appropriate access permissions for that object. Since the function in the example only performs a SELECT operation on the table 'testa', the SELECT privilege on 'testa' must also be GRANTED.
Therefore, the correct answer is E.
© EDUCO All Rights Reserved.