"hernan gonzalez" <hgonzalez@xxxxxxxxx> writes: > IMHO, the semantics of encode() and decode() are correct (the bridge > between bytea and text ... in the backend encoding; they should be the > only bridge), convert() is also ok (deals with bytes), but > convert_to() and convert_from() are dubious if not broken: they imply > texts in arbitrary encodings (for output or input) , lead to > anomalities and shouldnt be necessary at all. postgres=# \df convert_from List of functions Schema | Name | Result data type | Argument data types ------------+--------------+------------------+--------------------- pg_catalog | convert_from | text | bytea, name (1 row) postgres=# \df convert_to List of functions Schema | Name | Result data type | Argument data types ------------+------------+------------------+--------------------- pg_catalog | convert_to | bytea | text, name (1 row) Looks like they produce and consume byteas to me. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services! ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend