3 ms·
If you're willing to sacrifice economics elsewhere, repeating the table's name in the id column is one workaround: from a join b on b.a_id = a.a_id You ca
by smallnamespace 4y ago
If you're willing to sacrifice economics elsewhere, repeating the table's name in the id column is one workaround:
from a
join b on b.a_id = a.a_id
You can even use NATURAL JOIN if you can guarantee that the only fkey/pkey names will overlap between tables.
An unreasonable way to achieve that is to put the table name in every column. A more palatable way is to write some clever functions in your schema to scan the information table look for column name clashes (you essentially write a tiny "linter" inside your schema).