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

From: Muhammad Ikram <mmikram(at)gmail(dot)com>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Column data type in doc example may be changed to VARCHAR from TEXT
Date: 2024-07-18 05:10:35
Message-ID: CAGeimVq=a4B5KhnBjmm5CrwkDuMtBC1=dvL93LUeucyPBS2ufw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Kashif Zeeshan 2024-07-18 05:17:20 Re: A minor bug in doc. Hovering over heading shows # besides it.
Previous Message David Rowley 2024-07-18 05:07:39 Re: A minor bug in doc. Hovering over heading shows # besides it.