Started using UUID's as primary key, would like to execute union of entities with BigSerial Primary Key
Casting to text should not add much overhead, however you may want to consider using UNION ALL instead of UNION if you're looking for performance (UNION attempts to filtering duplicates).