Re: Identifying no-op length coercions

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jim Nasby <jim(at)nasby(dot)net>
Cc: Alexey Klyukin <alexk(at)commandprompt(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Identifying no-op length coercions
Date: 2011-06-03 16:13:44
Message-ID: BANLkTikuy3f1vYtb807mPDU3nkmvHbNxsg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 3, 2011 at 11:43 AM, Jim Nasby <jim(at)nasby(dot)net> wrote:
> On Jun 3, 2011, at 10:11 AM, Alexey Klyukin wrote:
>>> Is your interest in cheap varchar(N)->varchar(N+M) conversions specifically, or
>>> in some broader application of this facility?
>>
>> Exactly varchar conversions.
>
> Why limit it to varchar? Shouldn't we be able to do this for any varlena? The only challenge I see is numeric; we'd need to ensure that both size and precision are not decreasing.

More than that: you should also be able to make it work for things
like xml -> text.

Indeed, I believe Noah has plans to do just that.

Which, quite frankly, will be awesome.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Radosław Smogura 2011-06-03 16:19:19 Streaming solution and v3.1 protocol
Previous Message Tom Lane 2011-06-03 16:13:04 Re: About bug #6049