On 10-05-2016 21:12, David E. Wheeler wrote: > This makes sense, of course, and I could fix it by comparing text > values instead of json values when the values are JSON. But of course > the lack of a = operator is not limited to JSON. So I’m wondering if > there’s an interface at the SQL level to tell me whether a type has > an = operator? That way I could always use text values in those > situations. > There isn't an equality notation at catalogs. You could try "SELECT oprname FROM pg_operator WHERE oprcode::text ~ 'eq'" but it is too fragile. You could also try oprname, oprrest or oprjoin but the result is worse than the former solution. You definitely need a hack.
Also, IS DISTINCT FROM is an alias for = operator per standard IIRC. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers