Re: Overhead changing varchar(2000) to text

From: Edson Richter <edsonrichter(at)hotmail(dot)com>
To: Kevin Grittner <kgrittn(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Overhead changing varchar(2000) to text
Date: 2015-12-09 23:43:26
Message-ID: BLU436-SMTP354A1736B78CA7A5E6E4B6CFE80@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks.
After reading, I've run some tests and found no storage changes in
tables moving from varchar(2000) to text.
Actually, the biggest change is that I don't have to keep another
constraint between app and database - if I want to increase the user
perceived space, now I just have to change the application (of course,
under the limits).

Atenciosamente,

Edson Carlos Ericksson Richter

Em 09/12/2015 21:17, Kevin Grittner escreveu:
> On Wed, Dec 9, 2015 at 5:13 PM, Edson Richter <edsonrichter(at)hotmail(dot)com> wrote:
>
>> I do have several tables that uses varchar(2000) as store for remarks.
>> Lately, one customer need to store more than 2000 characteres, and I'm
>> considering changing from varchar(2000) to text.
>>
>> What is the overhead?
> None -- they are stored in exactly the same format; the only
> difference is whether the length is limited.
>
>> Is there any place where I can learn about storage impacto for each data
>> type?
> http://www.postgresql.org/docs/current/interactive/datatype-character.html
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message FattahRozzaq 2015-12-10 00:27:17 Re: HELP!!! The WAL Archive is taking up all space
Previous Message Kevin Grittner 2015-12-09 23:31:48 Re: Overhead changing varchar(2000) to text