As far as I can tell, pg_query would treat the equivalent EXISTS and IN (...) forms as different queries with different fingerprints, which seems to fit it's intended use. The github README says:
> Usage: Fingerprinting a query
> Fingerprinting allows you to identify similar queries that are different only because of the specific object that is being queried for (i.e. different object ids in the WHERE clause), or because of formatting.
Pretty cool that we can get the parse tree that PostgreSQL would make from Go or Ruby via the library.