Column data type in doc example may be changed to VARCHAR from TEXT

Поиск
Список
Период
Сортировка
От Muhammad Ikram
Тема Column data type in doc example may be changed to VARCHAR from TEXT
Дата
Msg-id CAGeimVq=a4B5KhnBjmm5CrwkDuMtBC1=dvL93LUeucyPBS2ufw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Column data type in doc example may be changed to VARCHAR from TEXT
Список pgsql-docs

Hi,

IMHO, a minor issue in the doc. As a good practice we use TEXT data type when we expect longer text e.g. comments, doc kind of columns.
For columns where we know what can be a maximum Text size though variable, we use VARCHAR to limit accidental long text or for other worthy reasons.

Following example may be revised.
From
CREATE TABLE products (    product_no integer,    name text,    price numeric
);
To
CREATE TABLE products (    product_no integer,    name varchar(expected length),    price numeric
);
Muhammad Ikram,
Bitnine Global.

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