Foreign keys ("relationships") are not needed for querying. They are for integrity. They tell the DBMS that a list of values for a list of columns of a table have to appear as a list of values for a different list of columns forming a candidate key in a table. An SQL foreign key just has to reference columns that form a UNIQUE column set ("superkey"). PRIMARY KEYs are just a special case of that.
If you would like to tell the DBMS that the author of a post has to be from among several disjoint tables, there's no declarative way in most SQLs. However you can organize tables and columns differently so that you can enforce declaratively:
Create a table Poster with a poster_id PK and poster_type column with UNIQUE (poster_id, poster_type). Then give the various poster tables those columns too as a FOREIGN KEY referencing Poster. Each subtype of poster (entity, user, anonymous) has its own value for poster_type, which is the same throughout its table. Poster CHECKs that poster_type is one of the valid subtype values; each subtype table CHECKs that its poster_type is its own value.
For some other approaches see this answer re "Foreign Key to multiple tables". Or this answer. Google subtyping in SQL.