Thread: possible TODOs

possible TODOs

From
Andrew Dunstan
Date:
From recent IRC discussion:

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

Thoughts?

cheers

andrew


Re: possible TODOs

From
Peter Eisentraut
Date:
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/


Re: possible TODOs

From
Tom Lane
Date:
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


Re: possible TODOs

From
Andrew Dunstan
Date:
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