Marko Kreen <marko@l-t.ee> writes:
> But what should be return type of decrypt()?
You'll need more than one name: decrypt to text, decrypt to bytea, etc.
Think about what happens when you need to support additional types.
Relying on implicit conversions or binary equivalence will not scale.
regards, tom lane