QUERY: SELECT p1.oid, p1.proname
FROM pg_proc as p1
WHERE p1.prolang = 0 OR p1.prorettype = 0 OR
    p1.pronargs < 0 OR p1.pronargs > 9;
oid|proname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.proname, p2.oid, p2.proname
FROM pg_proc AS p1, pg_proc AS p2
WHERE p1.oid != p2.oid AND
    p1.proname = p2.proname AND
    p1.pronargs = p2.pronargs AND
    p1.proargtypes = p2.proargtypes;
oid|proname|oid|proname
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.proname, p2.oid, p2.proname
FROM pg_proc AS p1, pg_proc AS p2
WHERE p1.oid != p2.oid AND
    p1.prosrc = p2.prosrc AND p1.prolang = 11 AND p2.prolang = 11 AND
    (p1.proisinh != p2.proisinh OR
     p1.proistrusted != p2.proistrusted OR
     p1.proiscachable != p2.proiscachable OR
     p1.pronargs != p2.pronargs OR
     p1.proretset != p2.proretset);
oid|proname|oid|proname
---+-------+---+-------
(0 rows)

QUERY: SELECT DISTINCT p1.prorettype, p2.prorettype
FROM pg_proc AS p1, pg_proc AS p2
WHERE p1.oid != p2.oid AND
    p1.prosrc = p2.prosrc AND p1.prolang = 11 AND p2.prolang = 11 AND
    (p1.prorettype < p2.prorettype);
prorettype|prorettype
----------+----------
        18|        25
        25|      1043
(2 rows)

QUERY: SELECT DISTINCT p1.proargtypes[0], p2.proargtypes[0]
FROM pg_proc AS p1, pg_proc AS p2
WHERE p1.oid != p2.oid AND
    p1.prosrc = p2.prosrc AND p1.prolang = 11 AND p2.prolang = 11 AND
    (p1.proargtypes[0] < p2.proargtypes[0]);
proargtypes|proargtypes
-----------+-----------
         25|       1043
       1042|       1043
(2 rows)

QUERY: SELECT DISTINCT p1.proargtypes[1], p2.proargtypes[1]
FROM pg_proc AS p1, pg_proc AS p2
WHERE p1.oid != p2.oid AND
    p1.prosrc = p2.prosrc AND p1.prolang = 11 AND p2.prolang = 11 AND
    (p1.proargtypes[1] < p2.proargtypes[1]);
proargtypes|proargtypes
-----------+-----------
(0 rows)

QUERY: SELECT DISTINCT p1.proargtypes[2], p2.proargtypes[2]
FROM pg_proc AS p1, pg_proc AS p2
WHERE p1.oid != p2.oid AND
    p1.prosrc = p2.prosrc AND p1.prolang = 11 AND p2.prolang = 11 AND
    (p1.proargtypes[2] < p2.proargtypes[2]);
proargtypes|proargtypes
-----------+-----------
(0 rows)

QUERY: SELECT DISTINCT p1.proargtypes[3], p2.proargtypes[3]
FROM pg_proc AS p1, pg_proc AS p2
WHERE p1.oid != p2.oid AND
    p1.prosrc = p2.prosrc AND p1.prolang = 11 AND p2.prolang = 11 AND
    (p1.proargtypes[3] < p2.proargtypes[3]);
proargtypes|proargtypes
-----------+-----------
(0 rows)

QUERY: SELECT DISTINCT p1.proargtypes[4], p2.proargtypes[4]
FROM pg_proc AS p1, pg_proc AS p2
WHERE p1.oid != p2.oid AND
    p1.prosrc = p2.prosrc AND p1.prolang = 11 AND p2.prolang = 11 AND
    (p1.proargtypes[4] < p2.proargtypes[4]);
proargtypes|proargtypes
-----------+-----------
(0 rows)

QUERY: SELECT DISTINCT p1.proargtypes[5], p2.proargtypes[5]
FROM pg_proc AS p1, pg_proc AS p2
WHERE p1.oid != p2.oid AND
    p1.prosrc = p2.prosrc AND p1.prolang = 11 AND p2.prolang = 11 AND
    (p1.proargtypes[5] < p2.proargtypes[5]);
proargtypes|proargtypes
-----------+-----------
(0 rows)

QUERY: SELECT DISTINCT p1.proargtypes[6], p2.proargtypes[6]
FROM pg_proc AS p1, pg_proc AS p2
WHERE p1.oid != p2.oid AND
    p1.prosrc = p2.prosrc AND p1.prolang = 11 AND p2.prolang = 11 AND
    (p1.proargtypes[6] < p2.proargtypes[6]);
proargtypes|proargtypes
-----------+-----------
(0 rows)

QUERY: SELECT DISTINCT p1.proargtypes[7], p2.proargtypes[7]
FROM pg_proc AS p1, pg_proc AS p2
WHERE p1.oid != p2.oid AND
    p1.prosrc = p2.prosrc AND p1.prolang = 11 AND p2.prolang = 11 AND
    (p1.proargtypes[7] < p2.proargtypes[7]);
proargtypes|proargtypes
-----------+-----------
(0 rows)

QUERY: SELECT p1.oid, p1.oprname
FROM pg_operator as p1
WHERE (p1.oprkind != 'b' AND p1.oprkind != 'l' AND p1.oprkind != 'r') OR
    p1.oprresult = 0 OR p1.oprcode = 0;
oid|oprname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.oprname
FROM pg_operator as p1
WHERE (p1.oprleft = 0 and p1.oprkind != 'l') OR
    (p1.oprleft != 0 and p1.oprkind = 'l') OR
    (p1.oprright = 0 and p1.oprkind != 'r') OR
    (p1.oprright != 0 and p1.oprkind = 'r');
oid|oprname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.oprname
FROM pg_operator as p1
WHERE p1.oprcanhash AND NOT
    (p1.oprkind = 'b' AND p1.oprresult = 16 AND p1.oprcom != 0);
oid|oprname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.oprcode, p2.oid, p2.oprcode
FROM pg_operator AS p1, pg_operator AS p2
WHERE p1.oid != p2.oid AND
    p1.oprname = p2.oprname AND
    p1.oprkind = p2.oprkind AND
    p1.oprleft = p2.oprleft AND
    p1.oprright = p2.oprright;
oid|oprcode|oid|oprcode
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.oprcode, p2.oid, p2.oprcode
FROM pg_operator AS p1, pg_operator AS p2
WHERE p1.oprcom = p2.oid AND
    (p1.oprkind != 'b' OR
     p1.oprleft != p2.oprright OR
     p1.oprright != p2.oprleft OR
     p1.oprresult != p2.oprresult OR
     p1.oid != p2.oprcom);
oid|oprcode|oid|oprcode
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.oprcode, p2.oid, p2.oprcode
FROM pg_operator AS p1, pg_operator AS p2
WHERE p1.oprnegate = p2.oid AND
    (p1.oprkind != p2.oprkind OR
     p1.oprleft != p2.oprleft OR
     p1.oprright != p2.oprright OR
     p1.oprresult != 16 OR
     p2.oprresult != 16 OR
     p1.oid != p2.oprnegate);
oid|oprcode|oid|oprcode
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.oprcode, p2.oid, p2.oprcode
FROM pg_operator AS p1, pg_operator AS p2
WHERE p1.oprlsortop = p2.oid AND
    (p1.oprname != '=' OR p2.oprname != '<' OR
     p1.oprkind != 'b' OR p2.oprkind != 'b' OR
     p1.oprleft != p2.oprleft OR
     p1.oprleft != p2.oprright OR
     p1.oprresult != 16 OR
     p2.oprresult != 16 OR
     p1.oprrsortop = 0);
oid|oprcode|oid|oprcode
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.oprcode, p2.oid, p2.oprcode
FROM pg_operator AS p1, pg_operator AS p2
WHERE p1.oprrsortop = p2.oid AND
    (p1.oprname != '=' OR p2.oprname != '<' OR
     p1.oprkind != 'b' OR p2.oprkind != 'b' OR
     p1.oprright != p2.oprleft OR
     p1.oprright != p2.oprright OR
     p1.oprresult != 16 OR
     p2.oprresult != 16 OR
     p1.oprlsortop = 0);
oid|oprcode|oid|oprcode
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.oprname FROM pg_operator AS p1
WHERE p1.oprlsortop != 0 AND
      p1.oprcom = 0;
oid|oprname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.oprname FROM pg_operator AS p1
WHERE p1.oprlsortop != 0 AND NOT
      EXISTS(SELECT * FROM pg_operator AS p2 WHERE
        p2.oprname = '<' AND
        p2.oprleft = p1.oprleft AND
        p2.oprright = p1.oprright AND
        p2.oprkind = 'b');
oid|oprname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.oprname FROM pg_operator AS p1
WHERE p1.oprlsortop != 0 AND NOT
      EXISTS(SELECT * FROM pg_operator AS p2 WHERE
        p2.oprname = '>' AND
        p2.oprleft = p1.oprleft AND
        p2.oprright = p1.oprright AND
        p2.oprkind = 'b');
oid|oprname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.oprname, p2.oid, p2.proname
FROM pg_operator AS p1, pg_proc AS p2
WHERE p1.oprcode = p2.oid AND
    p1.oprkind = 'b' AND
    (p2.pronargs != 2
);
oid|oprname|oid|proname
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.oprname, p2.oid, p2.proname
FROM pg_operator AS p1, pg_proc AS p2
WHERE p1.oprcode = p2.oid AND
    p1.oprkind = 'l' AND
    (p2.pronargs != 1 OR
     p1.oprresult != p2.prorettype OR
     (p1.oprright != p2.proargtypes[0] AND p2.proargtypes[0] != 0) OR
     p1.oprleft != 0);
oid|oprname|oid|proname
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.oprname, p2.oid, p2.proname
FROM pg_operator AS p1, pg_proc AS p2
WHERE p1.oprcode = p2.oid AND
    p1.oprkind = 'r' AND
    (p2.pronargs != 1 OR
     p1.oprresult != p2.prorettype OR
     (p1.oprleft != p2.proargtypes[0] AND p2.proargtypes[0] != 0) OR
     p1.oprright != 0);
oid|oprname|oid|proname
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.oprname, p2.oid, p2.proname
FROM pg_operator AS p1, pg_proc AS p2
WHERE p1.oprrest = p2.oid AND
    (p1.oprresult != 16 OR
     p2.prorettype != 701 OR p2.proretset OR
     p2.pronargs != 5 OR
     p2.proargtypes[0] != 26 OR p2.proargtypes[1] != 26 OR
     p2.proargtypes[2] != 21 OR p2.proargtypes[3] != 0 OR
     p2.proargtypes[4] != 23);
oid|oprname|oid|proname
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.oprname, p2.oid, p2.proname
FROM pg_operator AS p1, pg_proc AS p2
WHERE p1.oprjoin = p2.oid AND
    (p1.oprkind != 'b' OR p1.oprresult != 16 OR
     p2.prorettype != 701 OR p2.proretset OR
     p2.pronargs != 5 OR
     p2.proargtypes[0] != 26 OR p2.proargtypes[1] != 26 OR
     p2.proargtypes[2] != 21 OR p2.proargtypes[3] != 26 OR
     p2.proargtypes[4] != 21);
oid|oprname|oid|proname
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.aggname
FROM pg_aggregate as p1
WHERE (p1.aggbasetype = 0 AND p1.aggtransfn1 != 0) OR aggfinaltype = 0;
oid|aggname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.aggname
FROM pg_aggregate as p1
WHERE p1.aggtransfn1 = 0 AND p1.aggtransfn2 = 0;
oid|aggname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.aggname
FROM pg_aggregate as p1
WHERE p1.aggtransfn1 != 0 AND p1.aggtransfn2 = 0 AND
    (p1.aggtranstype1 = 0 OR p1.aggtranstype2 != 0 OR
     (p1.aggfinalfn = 0 AND p1.aggfinaltype != p1.aggtranstype1));
oid|aggname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.aggname
FROM pg_aggregate as p1
WHERE p1.aggtransfn1 = 0 AND p1.aggtransfn2 != 0 AND
    (p1.aggtranstype1 != 0 OR p1.aggtranstype2 = 0 OR
     (p1.aggfinalfn = 0 AND p1.aggfinaltype != p1.aggtranstype2));
oid|aggname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.aggname
FROM pg_aggregate as p1
WHERE p1.aggtransfn1 != 0 AND p1.aggtransfn2 != 0 AND
    (p1.aggtranstype1 = 0 OR p1.aggtranstype2 = 0 OR
     p1.aggfinalfn = 0);
oid|aggname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.aggname, p2.oid, p2.proname
FROM pg_aggregate AS p1, pg_proc AS p2
WHERE p1.aggtransfn1 = p2.oid AND
    (p2.proretset OR p2.pronargs != 2
);
oid|aggname|oid|proname
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.aggname, p2.oid, p2.proname
FROM pg_aggregate AS p1, pg_proc AS p2
WHERE p1.aggtransfn2 = p2.oid AND
    (p2.proretset OR p1.aggtranstype2 != p2.prorettype OR
     p2.pronargs != 1 OR
     p1.aggtranstype2 != p2.proargtypes[0]);
oid|aggname|oid|proname
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.aggname, p2.oid, p2.proname
FROM pg_aggregate AS p1, pg_proc AS p2
WHERE p1.aggfinalfn = p2.oid AND
    (p2.proretset OR p1.aggfinaltype != p2.prorettype OR
     p2.pronargs != 2 OR
     p1.aggtranstype1 != p2.proargtypes[0] OR
     p1.aggtranstype2 != p2.proargtypes[1]);
oid|aggname|oid|proname
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid
FROM pg_amop as p1
WHERE p1.amopid = 0 OR p1.amopclaid = 0 OR p1.amopopr = 0 OR
    p1.amopstrategy <= 0 OR p1.amopselect = 0 OR p1.amopnpages = 0;
oid
---
(0 rows)

QUERY: SELECT p1.oid, p2.oid
FROM pg_amop AS p1, pg_amop AS p2
WHERE p1.oid != p2.oid AND
    p1.amopid = p2.amopid AND
    p1.amopclaid = p2.amopclaid AND
    p1.amopstrategy = p2.amopstrategy;
oid|oid
---+---
(0 rows)

QUERY: SELECT p1.oid, p2.oid, p2.amname
FROM pg_amop AS p1, pg_am AS p2
WHERE p1.amopid = p2.oid AND p1.amopstrategy > p2.amstrategies;
oid|oid|amname
---+---+------
(0 rows)

QUERY: SELECT p1.oid, p1.amname, p2.oid, p2.opcname
FROM pg_am AS p1, pg_opclass AS p2
WHERE p1.amstrategies != (SELECT count(*) FROM pg_amop AS p3
                          WHERE p3.amopid = p1.oid AND p3.amopclaid = p2.oid)
              AND EXISTS (SELECT * FROM pg_amop AS p3
                          WHERE p3.amopid = p1.oid AND p3.amopclaid = p2.oid);
oid|amname|oid|opcname
---+------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p2.oid, p2.oprname
FROM pg_amop AS p1, pg_operator AS p2
WHERE p1.amopopr = p2.oid AND
    (p2.oprkind != 'b' OR p2.oprresult != 16);
oid|oid|oprname
---+---+-------
(0 rows)

QUERY: SELECT p1.oid, p2.oid, p2.oprname, p3.oid, p3.opcname
FROM pg_amop AS p1, pg_operator AS p2, pg_opclass AS p3
WHERE p1.amopopr = p2.oid AND p1.amopclaid = p3.oid AND
    p3.opcdeftype != 0 AND
    (p3.opcdeftype != p2.oprleft OR p3.opcdeftype != p2.oprright);
oid|oid|oprname|oid|opcname
---+---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p2.oid, p2.proname
FROM pg_amop AS p1, pg_proc AS p2
WHERE p1.amopselect = p2.oid AND
    (p2.prorettype != 701 OR p2.proretset OR
     p2.pronargs != 7 OR
     p2.proargtypes[0] != 26 OR p2.proargtypes[1] != 26 OR
     p2.proargtypes[2] != 21 OR p2.proargtypes[3] != 0 OR
     p2.proargtypes[4] != 23 OR p2.proargtypes[5] != 23 OR
     p2.proargtypes[6] != 26);
oid|oid|proname
---+---+-------
(0 rows)

QUERY: SELECT p1.oid, p2.oid, p2.proname
FROM pg_amop AS p1, pg_proc AS p2
WHERE p1.amopnpages = p2.oid AND
    (p2.prorettype != 701 OR p2.proretset OR
     p2.pronargs != 7 OR
     p2.proargtypes[0] != 26 OR p2.proargtypes[1] != 26 OR
     p2.proargtypes[2] != 21 OR p2.proargtypes[3] != 0 OR
     p2.proargtypes[4] != 23 OR p2.proargtypes[5] != 23 OR
     p2.proargtypes[6] != 26);
oid|oid|proname
---+---+-------
(0 rows)

QUERY: SELECT p1.oid
FROM pg_amproc as p1
WHERE p1.amid = 0 OR p1.amopclaid = 0 OR p1.amproc = 0 OR
    p1.amprocnum <= 0;
oid
---
(0 rows)

QUERY: SELECT p1.oid, p2.oid
FROM pg_amproc AS p1, pg_amproc AS p2
WHERE p1.oid != p2.oid AND
    p1.amid = p2.amid AND
    p1.amopclaid = p2.amopclaid AND
    p1.amprocnum = p2.amprocnum;
oid|oid
---+---
(0 rows)

QUERY: SELECT p1.oid, p2.oid, p2.amname
FROM pg_amproc AS p1, pg_am AS p2
WHERE p1.amid = p2.oid AND p1.amprocnum > p2.amsupport;
oid|oid|amname
---+---+------
(0 rows)

QUERY: SELECT p1.oid, p1.amname, p2.oid, p2.opcname
FROM pg_am AS p1, pg_opclass AS p2
WHERE p1.amsupport != (SELECT count(*) FROM pg_amproc AS p3
                       WHERE p3.amid = p1.oid AND p3.amopclaid = p2.oid)
           AND EXISTS (SELECT * FROM pg_amproc AS p3
                       WHERE p3.amid = p1.oid AND p3.amopclaid = p2.oid);
oid|amname|oid|opcname
---+------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p2.oid, p2.proname, p3.oid, p4.oid, p4.proname
FROM pg_amproc AS p1, pg_proc AS p2, pg_amproc AS p3, pg_proc AS p4
WHERE p1.oid != p3.oid AND
    p1.amid = p3.amid AND p1.amprocnum = p3.amprocnum AND
    p1.amproc = p2.oid AND p3.amproc = p4.oid AND
    (p2.proretset OR p4.proretset OR p2.pronargs != p4.pronargs);
oid|oid|proname|oid|oid|proname
---+---+-------+---+---+-------
(0 rows)

