QUERY: SELECT p1.oid, p1.typname
FROM pg_type as p1
WHERE (p1.typlen <= 0 AND p1.typlen != -1) OR
    (p1.typtype != 'b' AND p1.typtype != 'c') OR
    NOT p1.typisdefined OR
    (p1.typalign != 'c' AND p1.typalign != 's' AND
     p1.typalign != 'i' AND p1.typalign != 'd');
oid|typname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.typname
FROM pg_type as p1
WHERE p1.typbyval AND
    (p1.typlen != 1 OR p1.typalign != 'c') AND
    (p1.typlen != 2 OR p1.typalign != 's') AND
    (p1.typlen != 4 OR p1.typalign != 'i');
oid|typname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.typname
FROM pg_type as p1
WHERE (p1.typtype = 'c' AND p1.typrelid = 0) OR
    (p1.typtype != 'c' AND p1.typrelid != 0);
oid|typname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.typname
FROM pg_type as p1
WHERE p1.typtype != 'c' AND
    (p1.typinput = 0 OR p1.typoutput = 0 OR
     p1.typreceive = 0 OR p1.typsend = 0);
oid|typname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.typname, p2.oid, p2.proname
FROM pg_type AS p1, pg_proc AS p2
WHERE p1.typinput = p2.oid AND p1.typtype = 'b' AND
    (p2.pronargs != 1 OR p2.proretset) AND
    (p2.pronargs != 3 OR p2.proretset OR p2.proargtypes[2] != 23);
oid|typname|oid|proname
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.typname, p2.oid, p2.proname
FROM pg_type AS p1, pg_proc AS p2
WHERE p1.typoutput = p2.oid AND p1.typtype = 'b' AND
    (p2.pronargs != 1 OR p2.proretset) AND
    (p2.pronargs != 2 OR p2.proretset OR p1.typelem = 0);
oid|typname|oid|proname
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.typname, p2.oid, p2.proname
FROM pg_type AS p1, pg_proc AS p2
WHERE p1.typreceive = p2.oid AND p1.typtype = 'b' AND
    (p2.pronargs != 1 OR p2.proretset) AND
    (p2.pronargs != 3 OR p2.proretset OR p2.proargtypes[2] != 23);
oid|typname|oid|proname
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.typname, p2.oid, p2.proname
FROM pg_type AS p1, pg_proc AS p2
WHERE p1.typsend = p2.oid AND p1.typtype = 'b' AND
    (p2.pronargs != 1 OR p2.proretset) AND
    (p2.pronargs != 2 OR p2.proretset OR p1.typelem = 0);
oid|typname|oid|proname
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.relname
FROM pg_class as p1
WHERE (p1.relkind != 'r' AND p1.relkind != 'i' AND
       p1.relkind != 's' AND p1.relkind != 'S');
oid|relname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.relname
FROM pg_class as p1
WHERE (p1.relkind = 'i' AND p1.relam = 0) OR
    (p1.relkind != 'i' AND p1.relam != 0);
oid|relname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.attrelid, p1.attname
FROM pg_attribute as p1
WHERE p1.attrelid = 0 OR p1.atttypid = 0 OR p1.attnum = 0 OR
    p1.attcacheoff != -1;
oid|attrelid|attname
---+--------+-------
(0 rows)

QUERY: SELECT p1.oid, p1.attname, p2.oid, p2.attname
FROM pg_attribute AS p1, pg_attribute AS p2
WHERE p1.oid != p2.oid AND
    p1.attrelid = p2.attrelid AND
    (p1.attname = p2.attname OR p1.attnum = p2.attnum);
oid|attname|oid|attname
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.attname, p2.oid, p2.relname
FROM pg_attribute AS p1, pg_class AS p2
WHERE p1.attrelid = p2.oid AND p1.attnum > p2.relnatts;
oid|attname|oid|relname
---+-------+---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.relname
FROM pg_class AS p1
WHERE p1.relnatts != (SELECT count(*) FROM pg_attribute AS p2
                      WHERE p2.attrelid = p1.oid AND p2.attnum > 0);
oid|relname
---+-------
(0 rows)

QUERY: SELECT p1.oid, p1.attname, p2.oid, p2.typname
FROM pg_attribute AS p1, pg_type AS p2
WHERE p1.atttypid = p2.oid AND
    (p1.attlen != p2.typlen OR
     p1.attalign != p2.typalign OR
     p1.attbyval != p2.typbyval);
oid|attname|oid|typname
---+-------+---+-------
(0 rows)

