Re: invalidly encoded strings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Tatsuo Ishii <ishii(at)postgresql(dot)org>, laurenz(dot)albe(at)wien(dot)gv(dot)at, pgsql-hackers(at)postgresql(dot)org
Subject: Re: invalidly encoded strings
Date: 2007-09-17 04:02:47
Message-ID: 4802.1190001767@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan <andrew(at)dunslane(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2007-09-17 11:09:30 Small Release Notes Comment
Previous Message Andrew Dunstan 2007-09-17 00:40:47 Re: invalidly encoded strings

Browse pgsql-patches by date

  From Date Subject
Next Message Pavan Deolasee 2007-09-17 07:32:43 Re: HOT synced with HEAD
Previous Message Pavan Deolasee 2007-09-17 02:29:45 Re: HOT synced with HEAD