The list of all the queries

Perhaps USING syntax could be used for joining in the subqueries of derived tables

Query goal: Find derived tables that use newer join syntax where join conditions are written in the WHERE clause but do not use USING synatx.
Query type: Problem detection (Each row in the result could represent a flaw in the design)
Query reliability: Low (Many false-positive results)
Query license: MIT License
Data source: INFORMATION_SCHEMA+system catalog
SQL query: Click on query to copy it

WITH views AS (SELECT 
views.table_schema, 
views.table_name, 
'VIEW' AS type,
views.view_definition
FROM 
information_schema.views
WHERE table_schema NOT IN (SELECT schema_name
FROM INFORMATION_SCHEMA.schemata
WHERE schema_name<>'public' AND
schema_owner='postgres' AND schema_name IS NOT NULL)
UNION SELECT schemaname, matviewname, 'MATERIALIZED VIEW' AS type, definition
FROM pg_catalog.pg_matviews),
views_processed AS (SELECT
table_schema,
table_name,
type,
view_definition,
regexp_replace(view_definition,'[\r\n]','<br>','g') AS view_definition_changed
FROM views)
SELECT table_schema, table_name, type, view_definition_changed AS view_definition
FROM views_processed
WHERE view_definition~*'JOIN'
AND view_definition!~*'USING[[:space:]]*[(]'
ORDER BY table_schema, table_name;

Categories where the query belongs to

Category nameCategory description
Comfortability of database evolutionQueries of this category provide information about the means that influence database evolution.
Derived tablesQueries of this category provide information about the derived tables (views, materialized views), which are used to implement virtual data layer.
SyntacticsQueries of this category provide information about syntactic mistakes.

Reference materials for further reading

Reference
https://www.neilwithdata.com/join-using

The list of all the queries