Re: Selecting a constant question

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas ADI SD
Тема Re: Selecting a constant question
Дата
Msg-id E1539E0ED7043848906A8FF995BDA57902240F93@m0143.s-mxs.net
обсуждение исходный текст
Ответ на Re: Selecting a constant question  (Heikki Linnakangas <heikki@enterprisedb.com>)
Список pgsql-hackers
> > Again, *all* other major relational databases do this ...
> even blob fields have a maximum length reported from the database.
>
> So what are you doing with the max length? Not all data types
> and values have a meaningful max length, so you have to be
> able to deal with variable length data anyway.

Imho it has a lot to do with optimizing the interface.
If you know, that the max length is e.g. 16 bytes in UTF-8 for the 3
chars, you will probably not want any on the fly allocation smarts and
preallocate and bind those 16 bytes. When the max length value gets
larger, and it is a variable lenght type, the overhead of varlen
allocation smarts starts to pay off.

A generic interface should keep the sql parsing smarts at a minimum,
thus it cannot know that a returned column is actually a text constant.

Imho the request for a max length is very reasonable, but has no value
once it exceeds a certain size e.g. 64k.

Andreas


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

Предыдущее
От: ITAGAKI Takahiro
Дата:
Сообщение: Re: Autovacuum launcher doesn't notice death of postmaster immediately
Следующее
От: Zdenek Kotala
Дата:
Сообщение: Re: Autovacuum launcher doesn't notice death of postmaster immediately