Re: Identifying no-op length coercions

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Re: Identifying no-op length coercions
Дата
Msg-id 20110603162740.GB30150@tornado.leadboat.com
обсуждение исходный текст
Ответ на Re: Identifying no-op length coercions  (Jim Nasby <jim@nasby.net>)
Список pgsql-hackers
On Fri, Jun 03, 2011 at 10:43:17AM -0500, Jim Nasby 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
needto ensure that both size and precision are not decreasing.
 

I've implemented support for varchar, varbit, numeric, time, timetz, timestamp,
timestamptz, and interval.  However, I'll probably submit only varchar in the
initial infrastructure patch and the rest in followup patches in a later CF.

For numeric, we store the display scale in every datum, so any change to it
rewrites the table.  You'll be able to cheaply change numeric(7,2) to
numeric(9,2) but not to numeric(9,3).


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Radosław Smogura
Дата:
Сообщение: Streaming solution and v3.1 protocol
Следующее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: Domains versus polymorphic functions, redux