| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
| Cc: | pgsql(at)j-davis(dot)com, andrew(at)dunslane(dot)net, laurenz(dot)albe(at)wien(dot)gv(dot)at, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: invalidly encoded strings |
| Date: | 2007-09-11 20:12:54 |
| Message-ID: | 18395.1189541574@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-patches |
Tatsuo Ishii <ishii(at)postgresql(dot)org> writes:
>> If we make convert() operate on bytea and return bytea, as Tom
>> suggested, would that solve your use case?
> The problem is, the above use case is just one of what I can think of.
> Another use case is, something like this:
> SELECT sum(octet_length(convert(text_column using utf8_to_euc_jp))) FROM mytable;
> to know the total byte length of text column if it's encoded in
> EUC_JP.
Since octet_length exists and produces identical results for both text
and bytea, this example is hardly very convincing...
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2007-09-11 20:27:45 | Re: What is happening on buildfarm member dugong |
| Previous Message | Marshall, Steve | 2007-09-11 19:43:10 | PL/TCL Patch to prevent postgres from becoming multithreaded |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Simon Riggs | 2007-09-11 21:30:40 | Re: HOT patch - version 15 |
| Previous Message | Tom Lane | 2007-09-11 20:10:49 | Re: HOT patch - version 15 |