Re: Chante domain type - Postgres 9.2

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Chante domain type - Postgres 9.2
Дата
Msg-id 998.1474901921@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Chante domain type - Postgres 9.2  (Rob Sargent <robjsargent@gmail.com>)
Список pgsql-general
Rob Sargent <robjsargent@gmail.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


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Chante domain type - Postgres 9.2
Следующее
От:
Дата:
Сообщение: Re: Stats update difference between VACUUM ANALYZE and ANALYZE in 9.2?