Re: varchar_transform

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Mohsen SM <mohsensoodkhah(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: varchar_transform
Date: 2014-02-25 16:54:06
Message-ID: CA+TgmoZZmTQEX3OR6d7P5=_6obhYSnadps57zf9Rdz-T2jau8g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 24, 2014 at 2:11 AM, Mohsen SM <mohsensoodkhah(at)gmail(dot)com> wrote:
> when did use varchar_transform function?
> src/backend/uitls/adt/varchar.c.

The main point of that machinery is that if you do something like
ALTER TABLE zot ALTER COLUMN thunk SET DATA TYPE varchar(30) on a
column that is currently varchar(20), it won't feel obliged to rewrite
the table. That function lets it figure out that anything that's a
valid varchar(20) value is also a valid varchar(30) value.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2014-02-25 17:18:02 Re: [PATCH] Use MAP_HUGETLB where supported (v3)
Previous Message Robert Haas 2014-02-25 16:49:37 Re: 9.5: UPDATE/DELETE .. ORDER BY .. LIMIT ..