Re: text fields and performance for ETL

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Grega Jesih <Grega(dot)Jesih(at)actual-it(dot)si>, Bruce Momjian <bruce(at)momjian(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Docs <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: text fields and performance for ETL
Date: 2021-11-11 16:04:47
Message-ID: 92af57f4ea8bda556ad821178f071d8d7daac66a.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Thu, 2021-11-11 at 09:44 +0000, Grega Jesih wrote:
> with this approach, why don't you eliminate char and varchar then ?
> Thanks for thinking over.

Two reasons:

- the SQL standard requires these types

- sometimes you want to enforce a length limit, and a "type modifier" like
varchar(30) is cheaper than a check constraint

Yours,
Laurenz Albe

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2021-11-11 21:24:21 \dp privileges "decoder" dropped in v12 of docs
Previous Message PG Doc comments form 2021-11-11 15:40:12 Ltree pattern matching