Re: invalidly encoded strings - Mailing list pgsql-hackers

From Tom Lane
Subject Re: invalidly encoded strings
Date
Msg-id 4802.1190001767@sss.pgh.pa.us
Whole thread Raw
In response to Re: invalidly encoded strings  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: invalidly encoded strings
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> What I think we'd need to have a complete solution is
>> 
>> convert(text, name) returns bytea
>> -- convert from DB encoding to arbitrary encoding
>> 
>> convert(bytea, name, name) returns bytea
>> -- convert between any two encodings
>> 
>> convert(bytea, name) returns text
>> -- convert from arbitrary encoding to DB encoding
>> 
>> The second and third would need to do a verify step before
>> converting, of course.

> Is there any reason these functions shouldn't be marked immutable?

No, not as long as DB encoding is frozen...

> I'm wondering if we should give them disambiguating names, rather than 
> call them all convert.

No.  We have a function overloading system, we should use it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: invalidly encoded strings
Next
From: Gregory Stark
Date:
Subject: Small Release Notes Comment