Select one incorrect description regarding the following SQL statement defining a function.
CREATE OR REPLACE FUNCTION get_file_list(TEXT, BOOLEAN) RETURNS SETOF TEXT LANGUAGE C STRICT SECURITY DEFINER AS 'myfuncs.so';
Suggested Answer: E
Get Premium PGCES-02 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
12 comments · newest first
AH
Ahmad
2 months ago
I feel like E is misleading too. It runs with the definer's privileges, not the caller's.
DI
Dick
2 months ago
Agreed! It might just return NULL instead.
AL
Altha
2 months ago
I think D is incorrect. It won't return 0 with NULL.
LO
Loreen
2 months ago
E) I think that's wrong, it should run with the definer's authority.
CH
Charolette
2 months ago
D) Wait, what? A NULL parameter returning 0 seems off.
SA
Samira
2 months ago
C) Yup, it's definitely written in C.
SH
Shizue
3 months ago
B) Totally agree, it can return multiple rows.
KR
Kristofer
3 months ago
A) is correct, the function is in 'myfuncs.so'.
MA
Mabel
3 months ago
I feel like E is correct too, but I can't recall if SECURITY DEFINER changes that behavior.
KE
Keneth
3 months ago
I practiced a similar question where we discussed the RETURN type, and I think B is definitely true since it says SETOF TEXT.
TA
Tandra
3 months ago
I think D might be the incorrect one, but I'm not entirely sure how NULL parameters are handled in C functions.
RO
Robt
4 months ago
I remember that functions can be defined in external libraries like 'myfuncs.so', so A seems correct.