We use generated columns extensively. And we have foreign-keys attached to those generated columns.
The fact they are always Stored thus wastes space in our case. Any chance PostgreSQL might gain actual virtual / non-stored generated columns soon? Ever?
For reference, both Oracle and SQLite have virtual / non-stored columns. And both support FKs and indexes on those too.
Would be great to have feature parity on this particular point, eventually.