PostgreSQL_CE
PGCES-02 · Question #47
PGCES-02 Question #47: Real Exam Question with Answer & Explanation
Sign in or unlock PGCES-02 to reveal the answer and full explanation for question #47. The question stem and answer options stay visible for context.
Question
A table is defined as follows: CREATE TABLE t (id INT, val TEXT); Select two correct statements from below about the function "get_head" defined below. CREATE FUNCTION get_head(BOOLEAN) RETURNS TEXT LANGUAGE sql CALLED ON NULL INPUT AS 'SELECT val FROM t WHERE $1 OR id > 0 ORDER BY id LIMIT 1;';
Options
- AThis function is defined using PL/pgSQL.
- BThere are cases where this function returns multiple lines.
- CWhen NULL is passed for the argument and the function is executed, NULL is returned.
- DEven if this function is passed the same parameter value and executed multiple times, the
- EIf a function with the same name and with type BOOLEAN as the parameter is already defined,
Unlock PGCES-02 to see the answer
You've previewed enough free PGCES-02 questions. Unlock PGCES-02 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.