PostgreSQL decoding binary

I have a BYTEA column and output is set to hex, but Xojo appears to be decoding the column for me. Where is this documented and why is it doing this?

Db.ExecuteSQL("SET bytea_ouput = 'hex';")
Var Rows As RowSet = Db.ExecuteSQL("SELECT binary_column FROM table;")
Var Column As String = Rows.Column("binary_column").StringValue
// Column is binary instead of hex

Of course I can SELECT encode(binary_column, 'hex') to compensate, but that’s not my point.

? and ? :slight_smile:

I’m no expert but the following should work:

Db.ExecuteSQL("SELECT encode(binary_column::bytea, 'hex') FROM table;")