From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Rob Sargent <robjsargent(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Chante domain type - Postgres 9.2 |
Date: | 2016-09-26 14:58:41 |
Message-ID: | 998.1474901921@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Rob Sargent <robjsargent(at)gmail(dot)com> writes:
> On 09/26/2016 08:14 AM, Adrian Klaver wrote:
>> https://www.postgresql.org/docs/9.5/static/datatype-character.html
>> ".. If character varying is used without length specifier, the type
>> accepts strings of any size. The latter is a PostgreSQL extension."
> Does that trick remove the overhead (length check) Tom mentioned upstream?
Partly. It should get rid of actual calls to the varchar length checking
function. There's still some distributed overhead arising from the fact
that text, not varchar, is the native string type in Postgres. So for
example anyplace you apply a concatenation operator, varchar inputs have
to be casted to text, and the result has to be casted to varchar if it's
being stored into a varchar field. I've never seen any serious attempt
to quantify how much that costs, but it's not zero.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | pbj | 2016-09-26 15:17:38 | Re: Stats update difference between VACUUM ANALYZE and ANALYZE in 9.2? |
Previous Message | Adrian Klaver | 2016-09-26 14:56:18 | Re: Chante domain type - Postgres 9.2 |