Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd412f79

Browse files
committed
Make opr_sanity test complain about built-in functions marked prosecdef.
Currently, there are no built-in functions that are SECURITY DEFINER.But we just found an instance where one was mistakenly marked that way,so it seems prudent to add a test about it. If we ever grow somefunctions that are intentionally SECURITY DEFINER, we can alter theexpected output of this test, or adjust the query to filter out functionsfor which it's okay.Per suggestion from Robert Haas.Discussion:https://postgr.es/m/CA+TgmoYXg7McY33+jbWmG=rS-HNUur0S6W8Q8kVNFf7epFimVA@mail.gmail.com
1 parent15c9156 commitd412f79

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

‎src/test/regress/expected/opr_sanity.out

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,16 @@ WHERE proiswindow AND (proisagg OR proretset);
9696
-----+---------
9797
(0 rows)
9898

99+
-- currently, no built-in functions should be SECURITY DEFINER;
100+
-- this might change in future, but there will probably never be many.
101+
SELECT p1.oid, p1.proname
102+
FROM pg_proc AS p1
103+
WHERE prosecdef
104+
ORDER BY 1;
105+
oid | proname
106+
-----+---------
107+
(0 rows)
108+
99109
-- pronargdefaults should be 0 iff proargdefaults is null
100110
SELECT p1.oid, p1.proname
101111
FROM pg_proc AS p1

‎src/test/regress/sql/opr_sanity.sql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ SELECT p1.oid, p1.proname
9595
FROM pg_procAS p1
9696
WHERE proiswindowAND (proisaggOR proretset);
9797

98+
-- currently, no built-in functions should be SECURITY DEFINER;
99+
-- this might change in future, but there will probably never be many.
100+
SELECTp1.oid,p1.proname
101+
FROM pg_procAS p1
102+
WHERE prosecdef
103+
ORDER BY1;
104+
98105
-- pronargdefaults should be 0 iff proargdefaults is null
99106
SELECTp1.oid,p1.proname
100107
FROM pg_procAS p1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp