Baldur Norddahl <bbn-pgsql(dot)general(at)clansoft(dot)dk> writes:> Seems like "like" knows how to convert bytea to text,
No, it doesn't. The reason that works is there's a LIKE operator forbytea (try "\do ~~" in psql).
regards, tom lane