possible TODOs

Started by Andrew Dunstanalmost 19 years ago4 messages
#1Andrew Dunstan
andrew@dunslane.net

From recent IRC discussion:

. provide encode() for text values in addition to current bytea
. proved cast from text to bytea

Thoughts?

cheers

andrew

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Andrew Dunstan (#1)
Re: possible TODOs

Am Freitag, 9. Februar 2007 16:45 schrieb Andrew Dunstan:

. provide encode() for text values in addition to current bytea
. proved cast from text to bytea

I'm not sure how exactly you want to define these, but some possible
defintions will be dependent on the server encoding, which sounds
troublesome.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andrew Dunstan (#1)
Re: possible TODOs

Andrew Dunstan <andrew@dunslane.net> writes:

From recent IRC discussion:
. provide encode() for text values in addition to current bytea
. proved cast from text to bytea

What would these be meant to do? In particular I'm wondering if the
proposed cast is meant to be a binary-compatible transformation (thereby
exposing encoding issues), or if it's supposed to do the same backslash
conversions as I/O would, or what.

regards, tom lane

#4Andrew Dunstan
andrew@dunslane.net
In reply to: Peter Eisentraut (#2)
Re: possible TODOs

Peter Eisentraut wrote:

Am Freitag, 9. Februar 2007 16:45 schrieb Andrew Dunstan:

. provide encode() for text values in addition to current bytea
. proved cast from text to bytea

I'm not sure how exactly you want to define these, but some possible
defintions will be dependent on the server encoding, which sounds
troublesome.

Well, the cast wasn't my suggestion, so I'll let that one slide -
someone else can pick it up if they like :P .

The encode() suggestion was to have it have the same effect as:
encode(byteain(varcharout(textvalue)), 'encodingtype')

Would it be such a worry to have that dependent on server encoding?

cheers

andrew