Search Postgresql Archives

About column type to "varchar(1)" or "char(1)"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Good afternoon,

A question about varchar(1) and char(1).
If we have two tables
test1 (col1 varchar(1), ... ... );
test2 (col1 char(1), ... ... );

In the manuall, it written:

*Tip: * There are no performance differences between these three types, apart from the increased storage size when using the blank-padded type. While character(/n/) has performance advantages in some other database systems, it has no such advantages in PostgreSQL. In most situations text or character varying should be used instead.

As a result, setup 'col1' to either "varchar(1)" or "char(1)" does not matter at all?

Thanks a lot,
Emi

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux