From: Holger Jakobs <holger@jakobs.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: PostgreSQL CHARACTER VARYING vs CHARACTER VARYING (Length)
Date: Tue, 28 Apr 2020 11:43:39 +0200
Message-ID: <cfa5d279-0d2e-38ad-fa7f-3a2788120a83@jakobs.com> (raw)
In-Reply-To: <CAOasRJYCUwMYdd=BL29TupW_iCbvM3YRM01YTB_WYSUEays3CA@mail.gmail.com>
References: <CAOasRJYCUwMYdd=BL29TupW_iCbvM3YRM01YTB_WYSUEays3CA@mail.gmail.com>
No, there is no impact.
Am 28.04.20 um 11:22 schrieb Rajin Raj:
> Is there any impact of using the character varying without providing
> the length while creating tables?
> I have created two tables and inserted 1M records. But I don't see any
> difference in pg_class. (size, relpage)
>
> create table test_1(name varchar);
> create table test_2(name varchar(50));
>
> insert into test_1 ... 10M records
> insert into test_2 ... 10M records
>
> vacuum (full,analyze) db_size_test_1;
> vacuum (full,analyze) db_size_test_2;
>
> Which option is recommended?
>
> *Regards,*
> *Rajin *
--
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: holger@jakobs.com, pgsql-admin@lists.postgresql.org
Subject: Re: PostgreSQL CHARACTER VARYING vs CHARACTER VARYING (Length)
In-Reply-To: <cfa5d279-0d2e-38ad-fa7f-3a2788120a83@jakobs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox