Move regression test listing of builtin leakproof functions to opr_sanity.sql.

The original location in create_function_3.sql didn't invite the close
structinity warranted for adding new leakproof functions. Add comments
to the test explaining that functions should only be added after
careful consideration and understanding what a leakproof function is.

Per complaint from Tom Lane after 5eebb8d954.
This commit is contained in:
Andres Freund 2014-06-05 13:54:16 +02:00
parent 8776faa81c
commit e0cb4aa89d
4 changed files with 268 additions and 258 deletions

View File

@ -149,244 +149,6 @@ CREATE FUNCTION functext_E_3(int) RETURNS bool LANGUAGE 'sql'
LEAKPROOF AS 'SELECT $1 < 200'; -- failed
ERROR: only superuser can define a leakproof function
RESET SESSION AUTHORIZATION;
---
-- list of built-in leakproof functions
---
-- temporarily disable fancy output, so catalog changes create less diff noise
\a\t
SELECT proname, prorettype::regtype, proargtypes::regtype[]
FROM pg_proc JOIN pg_namespace ON pronamespace = pg_namespace.oid
WHERE nspname = 'pg_catalog' AND proleakproof ORDER BY proname;
abstimeeq|boolean|[0:1]={abstime,abstime}
abstimege|boolean|[0:1]={abstime,abstime}
abstimegt|boolean|[0:1]={abstime,abstime}
abstimele|boolean|[0:1]={abstime,abstime}
abstimelt|boolean|[0:1]={abstime,abstime}
abstimene|boolean|[0:1]={abstime,abstime}
biteq|boolean|[0:1]={bit,bit}
bitge|boolean|[0:1]={bit,bit}
bitgt|boolean|[0:1]={bit,bit}
bitle|boolean|[0:1]={bit,bit}
bitlt|boolean|[0:1]={bit,bit}
bitne|boolean|[0:1]={bit,bit}
booleq|boolean|[0:1]={boolean,boolean}
boolge|boolean|[0:1]={boolean,boolean}
boolgt|boolean|[0:1]={boolean,boolean}
boolle|boolean|[0:1]={boolean,boolean}
boollt|boolean|[0:1]={boolean,boolean}
boolne|boolean|[0:1]={boolean,boolean}
bpchareq|boolean|[0:1]={character,character}
bpcharne|boolean|[0:1]={character,character}
byteaeq|boolean|[0:1]={bytea,bytea}
byteage|boolean|[0:1]={bytea,bytea}
byteagt|boolean|[0:1]={bytea,bytea}
byteale|boolean|[0:1]={bytea,bytea}
bytealt|boolean|[0:1]={bytea,bytea}
byteane|boolean|[0:1]={bytea,bytea}
cash_eq|boolean|[0:1]={money,money}
cash_ge|boolean|[0:1]={money,money}
cash_gt|boolean|[0:1]={money,money}
cash_le|boolean|[0:1]={money,money}
cash_lt|boolean|[0:1]={money,money}
cash_ne|boolean|[0:1]={money,money}
chareq|boolean|[0:1]={"\"char\"","\"char\""}
charge|boolean|[0:1]={"\"char\"","\"char\""}
chargt|boolean|[0:1]={"\"char\"","\"char\""}
charle|boolean|[0:1]={"\"char\"","\"char\""}
charlt|boolean|[0:1]={"\"char\"","\"char\""}
charne|boolean|[0:1]={"\"char\"","\"char\""}
cideq|boolean|[0:1]={cid,cid}
circle_eq|boolean|[0:1]={circle,circle}
circle_ge|boolean|[0:1]={circle,circle}
circle_gt|boolean|[0:1]={circle,circle}
circle_le|boolean|[0:1]={circle,circle}
circle_lt|boolean|[0:1]={circle,circle}
circle_ne|boolean|[0:1]={circle,circle}
date_eq|boolean|[0:1]={date,date}
date_ge|boolean|[0:1]={date,date}
date_gt|boolean|[0:1]={date,date}
date_le|boolean|[0:1]={date,date}
date_lt|boolean|[0:1]={date,date}
date_ne|boolean|[0:1]={date,date}
float48eq|boolean|[0:1]={real,"double precision"}
float48ge|boolean|[0:1]={real,"double precision"}
float48gt|boolean|[0:1]={real,"double precision"}
float48le|boolean|[0:1]={real,"double precision"}
float48lt|boolean|[0:1]={real,"double precision"}
float48ne|boolean|[0:1]={real,"double precision"}
float4eq|boolean|[0:1]={real,real}
float4ge|boolean|[0:1]={real,real}
float4gt|boolean|[0:1]={real,real}
float4le|boolean|[0:1]={real,real}
float4lt|boolean|[0:1]={real,real}
float4ne|boolean|[0:1]={real,real}
float84eq|boolean|[0:1]={"double precision",real}
float84ge|boolean|[0:1]={"double precision",real}
float84gt|boolean|[0:1]={"double precision",real}
float84le|boolean|[0:1]={"double precision",real}
float84lt|boolean|[0:1]={"double precision",real}
float84ne|boolean|[0:1]={"double precision",real}
float8eq|boolean|[0:1]={"double precision","double precision"}
float8ge|boolean|[0:1]={"double precision","double precision"}
float8gt|boolean|[0:1]={"double precision","double precision"}
float8le|boolean|[0:1]={"double precision","double precision"}
float8lt|boolean|[0:1]={"double precision","double precision"}
float8ne|boolean|[0:1]={"double precision","double precision"}
int24eq|boolean|[0:1]={smallint,integer}
int24ge|boolean|[0:1]={smallint,integer}
int24gt|boolean|[0:1]={smallint,integer}
int24le|boolean|[0:1]={smallint,integer}
int24lt|boolean|[0:1]={smallint,integer}
int24ne|boolean|[0:1]={smallint,integer}
int28eq|boolean|[0:1]={smallint,bigint}
int28ge|boolean|[0:1]={smallint,bigint}
int28gt|boolean|[0:1]={smallint,bigint}
int28le|boolean|[0:1]={smallint,bigint}
int28lt|boolean|[0:1]={smallint,bigint}
int28ne|boolean|[0:1]={smallint,bigint}
int2eq|boolean|[0:1]={smallint,smallint}
int2ge|boolean|[0:1]={smallint,smallint}
int2gt|boolean|[0:1]={smallint,smallint}
int2le|boolean|[0:1]={smallint,smallint}
int2lt|boolean|[0:1]={smallint,smallint}
int2ne|boolean|[0:1]={smallint,smallint}
int42eq|boolean|[0:1]={integer,smallint}
int42ge|boolean|[0:1]={integer,smallint}
int42gt|boolean|[0:1]={integer,smallint}
int42le|boolean|[0:1]={integer,smallint}
int42lt|boolean|[0:1]={integer,smallint}
int42ne|boolean|[0:1]={integer,smallint}
int48eq|boolean|[0:1]={integer,bigint}
int48ge|boolean|[0:1]={integer,bigint}
int48gt|boolean|[0:1]={integer,bigint}
int48le|boolean|[0:1]={integer,bigint}
int48lt|boolean|[0:1]={integer,bigint}
int48ne|boolean|[0:1]={integer,bigint}
int4eq|boolean|[0:1]={integer,integer}
int4ge|boolean|[0:1]={integer,integer}
int4gt|boolean|[0:1]={integer,integer}
int4le|boolean|[0:1]={integer,integer}
int4lt|boolean|[0:1]={integer,integer}
int4ne|boolean|[0:1]={integer,integer}
int82eq|boolean|[0:1]={bigint,smallint}
int82ge|boolean|[0:1]={bigint,smallint}
int82gt|boolean|[0:1]={bigint,smallint}
int82le|boolean|[0:1]={bigint,smallint}
int82lt|boolean|[0:1]={bigint,smallint}
int82ne|boolean|[0:1]={bigint,smallint}
int84eq|boolean|[0:1]={bigint,integer}
int84ge|boolean|[0:1]={bigint,integer}
int84gt|boolean|[0:1]={bigint,integer}
int84le|boolean|[0:1]={bigint,integer}
int84lt|boolean|[0:1]={bigint,integer}
int84ne|boolean|[0:1]={bigint,integer}
int8eq|boolean|[0:1]={bigint,bigint}
int8ge|boolean|[0:1]={bigint,bigint}
int8gt|boolean|[0:1]={bigint,bigint}
int8le|boolean|[0:1]={bigint,bigint}
int8lt|boolean|[0:1]={bigint,bigint}
int8ne|boolean|[0:1]={bigint,bigint}
interval_eq|boolean|[0:1]={interval,interval}
interval_ge|boolean|[0:1]={interval,interval}
interval_gt|boolean|[0:1]={interval,interval}
interval_le|boolean|[0:1]={interval,interval}
interval_lt|boolean|[0:1]={interval,interval}
interval_ne|boolean|[0:1]={interval,interval}
lseg_eq|boolean|[0:1]={lseg,lseg}
lseg_ge|boolean|[0:1]={lseg,lseg}
lseg_gt|boolean|[0:1]={lseg,lseg}
lseg_le|boolean|[0:1]={lseg,lseg}
lseg_lt|boolean|[0:1]={lseg,lseg}
lseg_ne|boolean|[0:1]={lseg,lseg}
macaddr_eq|boolean|[0:1]={macaddr,macaddr}
macaddr_ge|boolean|[0:1]={macaddr,macaddr}
macaddr_gt|boolean|[0:1]={macaddr,macaddr}
macaddr_le|boolean|[0:1]={macaddr,macaddr}
macaddr_lt|boolean|[0:1]={macaddr,macaddr}
macaddr_ne|boolean|[0:1]={macaddr,macaddr}
nameeq|boolean|[0:1]={name,name}
namege|boolean|[0:1]={name,name}
namegt|boolean|[0:1]={name,name}
namele|boolean|[0:1]={name,name}
namelt|boolean|[0:1]={name,name}
namene|boolean|[0:1]={name,name}
network_eq|boolean|[0:1]={inet,inet}
network_ge|boolean|[0:1]={inet,inet}
network_gt|boolean|[0:1]={inet,inet}
network_le|boolean|[0:1]={inet,inet}
network_lt|boolean|[0:1]={inet,inet}
network_ne|boolean|[0:1]={inet,inet}
oideq|boolean|[0:1]={oid,oid}
oidge|boolean|[0:1]={oid,oid}
oidgt|boolean|[0:1]={oid,oid}
oidle|boolean|[0:1]={oid,oid}
oidlt|boolean|[0:1]={oid,oid}
oidne|boolean|[0:1]={oid,oid}
reltimeeq|boolean|[0:1]={reltime,reltime}
reltimege|boolean|[0:1]={reltime,reltime}
reltimegt|boolean|[0:1]={reltime,reltime}
reltimele|boolean|[0:1]={reltime,reltime}
reltimelt|boolean|[0:1]={reltime,reltime}
reltimene|boolean|[0:1]={reltime,reltime}
texteq|boolean|[0:1]={text,text}
textne|boolean|[0:1]={text,text}
tideq|boolean|[0:1]={tid,tid}
tidge|boolean|[0:1]={tid,tid}
tidgt|boolean|[0:1]={tid,tid}
tidle|boolean|[0:1]={tid,tid}
tidlt|boolean|[0:1]={tid,tid}
tidne|boolean|[0:1]={tid,tid}
time_eq|boolean|[0:1]={"time without time zone","time without time zone"}
time_ge|boolean|[0:1]={"time without time zone","time without time zone"}
time_gt|boolean|[0:1]={"time without time zone","time without time zone"}
time_le|boolean|[0:1]={"time without time zone","time without time zone"}
time_lt|boolean|[0:1]={"time without time zone","time without time zone"}
time_ne|boolean|[0:1]={"time without time zone","time without time zone"}
timestamp_eq|boolean|[0:1]={"timestamp without time zone","timestamp without time zone"}
timestamp_ge|boolean|[0:1]={"timestamp without time zone","timestamp without time zone"}
timestamp_gt|boolean|[0:1]={"timestamp without time zone","timestamp without time zone"}
timestamp_le|boolean|[0:1]={"timestamp without time zone","timestamp without time zone"}
timestamp_lt|boolean|[0:1]={"timestamp without time zone","timestamp without time zone"}
timestamp_ne|boolean|[0:1]={"timestamp without time zone","timestamp without time zone"}
timestamptz_eq|boolean|[0:1]={"timestamp with time zone","timestamp with time zone"}
timestamptz_ge|boolean|[0:1]={"timestamp with time zone","timestamp with time zone"}
timestamptz_gt|boolean|[0:1]={"timestamp with time zone","timestamp with time zone"}
timestamptz_le|boolean|[0:1]={"timestamp with time zone","timestamp with time zone"}
timestamptz_lt|boolean|[0:1]={"timestamp with time zone","timestamp with time zone"}
timestamptz_ne|boolean|[0:1]={"timestamp with time zone","timestamp with time zone"}
timetz_eq|boolean|[0:1]={"time with time zone","time with time zone"}
timetz_ge|boolean|[0:1]={"time with time zone","time with time zone"}
timetz_gt|boolean|[0:1]={"time with time zone","time with time zone"}
timetz_le|boolean|[0:1]={"time with time zone","time with time zone"}
timetz_lt|boolean|[0:1]={"time with time zone","time with time zone"}
timetz_ne|boolean|[0:1]={"time with time zone","time with time zone"}
tintervaleq|boolean|[0:1]={tinterval,tinterval}
tintervalge|boolean|[0:1]={tinterval,tinterval}
tintervalgt|boolean|[0:1]={tinterval,tinterval}
tintervalle|boolean|[0:1]={tinterval,tinterval}
tintervalleneq|boolean|[0:1]={tinterval,reltime}
tintervallenge|boolean|[0:1]={tinterval,reltime}
tintervallengt|boolean|[0:1]={tinterval,reltime}
tintervallenle|boolean|[0:1]={tinterval,reltime}
tintervallenlt|boolean|[0:1]={tinterval,reltime}
tintervallenne|boolean|[0:1]={tinterval,reltime}
tintervallt|boolean|[0:1]={tinterval,tinterval}
tintervalne|boolean|[0:1]={tinterval,tinterval}
uuid_eq|boolean|[0:1]={uuid,uuid}
uuid_ge|boolean|[0:1]={uuid,uuid}
uuid_gt|boolean|[0:1]={uuid,uuid}
uuid_le|boolean|[0:1]={uuid,uuid}
uuid_lt|boolean|[0:1]={uuid,uuid}
uuid_ne|boolean|[0:1]={uuid,uuid}
varbiteq|boolean|[0:1]={"bit varying","bit varying"}
varbitge|boolean|[0:1]={"bit varying","bit varying"}
varbitgt|boolean|[0:1]={"bit varying","bit varying"}
varbitle|boolean|[0:1]={"bit varying","bit varying"}
varbitlt|boolean|[0:1]={"bit varying","bit varying"}
varbitne|boolean|[0:1]={"bit varying","bit varying"}
xideq|boolean|[0:1]={xid,xid}
-- restore normal output mode
\a\t
--
-- CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT
--

View File

@ -4,9 +4,9 @@
-- pg_operator, pg_proc, pg_cast, pg_aggregate, pg_am,
-- pg_amop, pg_amproc, pg_opclass, pg_opfamily.
--
-- None of the SELECTs here should ever find any matching entries,
-- so the expected output is easy to maintain ;-).
-- A test failure indicates someone messed up an entry in the system tables.
-- Every test failures in this file should be closely inspected. The
-- description of the failing test should be read carefully before
-- adjusting the expected output.
--
-- NB: we assume the oidjoins test will have caught any dangling links,
-- that is OID or REGPROC fields that are not zero and do not match some
@ -395,6 +395,249 @@ WHERE d.classoid IS NULL AND p1.oid <= 9999;
-----+---------
(0 rows)
-- List of built-in leakproof functions
--
-- Leakproof functions should only be added after carefully
-- scrutinizing all possibly executed codepaths for possible
-- information leaks. Don't add functions here unless you know what a
-- leakproof function is. If unsure, don't mark it as such.
-- temporarily disable fancy output, so catalog changes create less diff noise
\a\t
SELECT p1.oid::regprocedure
FROM pg_proc p1 JOIN pg_namespace pn
ON pronamespace = pn.oid
WHERE nspname = 'pg_catalog' AND proleakproof
ORDER BY 1;
boollt(boolean,boolean)
boolgt(boolean,boolean)
booleq(boolean,boolean)
chareq("char","char")
nameeq(name,name)
int2eq(smallint,smallint)
int2lt(smallint,smallint)
int4eq(integer,integer)
int4lt(integer,integer)
texteq(text,text)
xideq(xid,xid)
cideq(cid,cid)
charne("char","char")
charle("char","char")
chargt("char","char")
charge("char","char")
boolne(boolean,boolean)
int4ne(integer,integer)
int2ne(smallint,smallint)
int2gt(smallint,smallint)
int4gt(integer,integer)
int2le(smallint,smallint)
int4le(integer,integer)
int4ge(integer,integer)
int2ge(smallint,smallint)
textne(text,text)
int24eq(smallint,integer)
int42eq(integer,smallint)
int24lt(smallint,integer)
int42lt(integer,smallint)
int24gt(smallint,integer)
int42gt(integer,smallint)
int24ne(smallint,integer)
int42ne(integer,smallint)
int24le(smallint,integer)
int42le(integer,smallint)
int24ge(smallint,integer)
int42ge(integer,smallint)
oideq(oid,oid)
oidne(oid,oid)
abstimeeq(abstime,abstime)
abstimene(abstime,abstime)
abstimelt(abstime,abstime)
abstimegt(abstime,abstime)
abstimele(abstime,abstime)
abstimege(abstime,abstime)
reltimeeq(reltime,reltime)
reltimene(reltime,reltime)
reltimelt(reltime,reltime)
reltimegt(reltime,reltime)
reltimele(reltime,reltime)
reltimege(reltime,reltime)
tintervalleneq(tinterval,reltime)
tintervallenne(tinterval,reltime)
tintervallenlt(tinterval,reltime)
tintervallengt(tinterval,reltime)
tintervallenle(tinterval,reltime)
tintervallenge(tinterval,reltime)
float4eq(real,real)
float4ne(real,real)
float4lt(real,real)
float4le(real,real)
float4gt(real,real)
float4ge(real,real)
float8eq(double precision,double precision)
float8ne(double precision,double precision)
float8lt(double precision,double precision)
float8le(double precision,double precision)
float8gt(double precision,double precision)
float8ge(double precision,double precision)
float48eq(real,double precision)
float48ne(real,double precision)
float48lt(real,double precision)
float48le(real,double precision)
float48gt(real,double precision)
float48ge(real,double precision)
float84eq(double precision,real)
float84ne(double precision,real)
float84lt(double precision,real)
float84le(double precision,real)
float84gt(double precision,real)
float84ge(double precision,real)
int8eq(bigint,bigint)
int8ne(bigint,bigint)
int8lt(bigint,bigint)
int8gt(bigint,bigint)
int8le(bigint,bigint)
int8ge(bigint,bigint)
int84eq(bigint,integer)
int84ne(bigint,integer)
int84lt(bigint,integer)
int84gt(bigint,integer)
int84le(bigint,integer)
int84ge(bigint,integer)
namelt(name,name)
namele(name,name)
namegt(name,name)
namege(name,name)
namene(name,name)
oidlt(oid,oid)
oidle(oid,oid)
tintervaleq(tinterval,tinterval)
tintervalne(tinterval,tinterval)
tintervallt(tinterval,tinterval)
tintervalgt(tinterval,tinterval)
tintervalle(tinterval,tinterval)
tintervalge(tinterval,tinterval)
macaddr_eq(macaddr,macaddr)
macaddr_lt(macaddr,macaddr)
macaddr_le(macaddr,macaddr)
macaddr_gt(macaddr,macaddr)
macaddr_ge(macaddr,macaddr)
macaddr_ne(macaddr,macaddr)
int48eq(integer,bigint)
int48ne(integer,bigint)
int48lt(integer,bigint)
int48gt(integer,bigint)
int48le(integer,bigint)
int48ge(integer,bigint)
cash_eq(money,money)
cash_ne(money,money)
cash_lt(money,money)
cash_le(money,money)
cash_gt(money,money)
cash_ge(money,money)
network_eq(inet,inet)
network_lt(inet,inet)
network_le(inet,inet)
network_gt(inet,inet)
network_ge(inet,inet)
network_ne(inet,inet)
lseg_eq(lseg,lseg)
bpchareq(character,character)
bpcharne(character,character)
date_eq(date,date)
date_lt(date,date)
date_le(date,date)
date_gt(date,date)
date_ge(date,date)
date_ne(date,date)
time_lt(time without time zone,time without time zone)
time_le(time without time zone,time without time zone)
time_gt(time without time zone,time without time zone)
time_ge(time without time zone,time without time zone)
time_ne(time without time zone,time without time zone)
time_eq(time without time zone,time without time zone)
timestamptz_eq(timestamp with time zone,timestamp with time zone)
timestamptz_ne(timestamp with time zone,timestamp with time zone)
timestamptz_lt(timestamp with time zone,timestamp with time zone)
timestamptz_le(timestamp with time zone,timestamp with time zone)
timestamptz_ge(timestamp with time zone,timestamp with time zone)
timestamptz_gt(timestamp with time zone,timestamp with time zone)
interval_eq(interval,interval)
interval_ne(interval,interval)
interval_lt(interval,interval)
interval_le(interval,interval)
interval_ge(interval,interval)
interval_gt(interval,interval)
charlt("char","char")
tidne(tid,tid)
tideq(tid,tid)
timetz_eq(time with time zone,time with time zone)
timetz_ne(time with time zone,time with time zone)
timetz_lt(time with time zone,time with time zone)
timetz_le(time with time zone,time with time zone)
timetz_ge(time with time zone,time with time zone)
timetz_gt(time with time zone,time with time zone)
circle_eq(circle,circle)
circle_ne(circle,circle)
circle_lt(circle,circle)
circle_gt(circle,circle)
circle_le(circle,circle)
circle_ge(circle,circle)
lseg_ne(lseg,lseg)
lseg_lt(lseg,lseg)
lseg_le(lseg,lseg)
lseg_gt(lseg,lseg)
lseg_ge(lseg,lseg)
biteq(bit,bit)
bitne(bit,bit)
bitge(bit,bit)
bitgt(bit,bit)
bitle(bit,bit)
bitlt(bit,bit)
oidgt(oid,oid)
oidge(oid,oid)
varbiteq(bit varying,bit varying)
varbitne(bit varying,bit varying)
varbitge(bit varying,bit varying)
varbitgt(bit varying,bit varying)
varbitle(bit varying,bit varying)
varbitlt(bit varying,bit varying)
boolle(boolean,boolean)
boolge(boolean,boolean)
int28eq(smallint,bigint)
int28ne(smallint,bigint)
int28lt(smallint,bigint)
int28gt(smallint,bigint)
int28le(smallint,bigint)
int28ge(smallint,bigint)
int82eq(bigint,smallint)
int82ne(bigint,smallint)
int82lt(bigint,smallint)
int82gt(bigint,smallint)
int82le(bigint,smallint)
int82ge(bigint,smallint)
byteaeq(bytea,bytea)
bytealt(bytea,bytea)
byteale(bytea,bytea)
byteagt(bytea,bytea)
byteage(bytea,bytea)
byteane(bytea,bytea)
timestamp_eq(timestamp without time zone,timestamp without time zone)
timestamp_ne(timestamp without time zone,timestamp without time zone)
timestamp_lt(timestamp without time zone,timestamp without time zone)
timestamp_le(timestamp without time zone,timestamp without time zone)
timestamp_ge(timestamp without time zone,timestamp without time zone)
timestamp_gt(timestamp without time zone,timestamp without time zone)
tidgt(tid,tid)
tidlt(tid,tid)
tidge(tid,tid)
tidle(tid,tid)
uuid_lt(uuid,uuid)
uuid_le(uuid,uuid)
uuid_eq(uuid,uuid)
uuid_ge(uuid,uuid)
uuid_gt(uuid,uuid)
uuid_ne(uuid,uuid)
-- restore normal output mode
\a\t
-- **************** pg_cast ****************
-- Catch bogus values in pg_cast columns (other than cases detected by
-- oidjoins test).

View File

@ -107,20 +107,6 @@ CREATE FUNCTION functext_E_3(int) RETURNS bool LANGUAGE 'sql'
RESET SESSION AUTHORIZATION;
---
-- list of built-in leakproof functions
---
-- temporarily disable fancy output, so catalog changes create less diff noise
\a\t
SELECT proname, prorettype::regtype, proargtypes::regtype[]
FROM pg_proc JOIN pg_namespace ON pronamespace = pg_namespace.oid
WHERE nspname = 'pg_catalog' AND proleakproof ORDER BY proname;
-- restore normal output mode
\a\t
--
-- CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT
--

View File

@ -4,9 +4,9 @@
-- pg_operator, pg_proc, pg_cast, pg_aggregate, pg_am,
-- pg_amop, pg_amproc, pg_opclass, pg_opfamily.
--
-- None of the SELECTs here should ever find any matching entries,
-- so the expected output is easy to maintain ;-).
-- A test failure indicates someone messed up an entry in the system tables.
-- Every test failures in this file should be closely inspected. The
-- description of the failing test should be read carefully before
-- adjusting the expected output.
--
-- NB: we assume the oidjoins test will have caught any dangling links,
-- that is OID or REGPROC fields that are not zero and do not match some
@ -298,6 +298,25 @@ FROM pg_proc as p1 LEFT JOIN pg_description as d
ON p1.tableoid = d.classoid and p1.oid = d.objoid and d.objsubid = 0
WHERE d.classoid IS NULL AND p1.oid <= 9999;
-- List of built-in leakproof functions
--
-- Leakproof functions should only be added after carefully
-- scrutinizing all possibly executed codepaths for possible
-- information leaks. Don't add functions here unless you know what a
-- leakproof function is. If unsure, don't mark it as such.
-- temporarily disable fancy output, so catalog changes create less diff noise
\a\t
SELECT p1.oid::regprocedure
FROM pg_proc p1 JOIN pg_namespace pn
ON pronamespace = pn.oid
WHERE nspname = 'pg_catalog' AND proleakproof
ORDER BY 1;
-- restore normal output mode
\a\t
-- **************** pg_cast ****************