Re: Identifying no-op length coercions
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Jim Nasby <jim@nasby.net>
Cc: Alexey Klyukin <alexk@commandprompt.com>, Noah Misch <noah@leadboat.com>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org
Date: 2011-06-03T16:13:44Z
Lists: pgsql-hackers
On Fri, Jun 3, 2011 at 11:43 AM, Jim Nasby <jim@nasby.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