Say there is a PostgreSQL parent table files
that is empty; it's 'abstract'. And then there are tables that inherit from files
that contain data: red-files
, green-files
, blue-files
.
I can select from all three by selecting from files*
, but how can I select from both red-files
and green-files
only?
That is, if the query would retrieve 3 rows from red-files
and 2 rows from green-files
, then the combined query I'm looking for would show 5 rows.