| От | Tom Lane |
|---|---|
| Тема | Re: stawidth inconsistency with all NULL columns |
| Дата | |
| Msg-id | 4897.1558472065@sss.pgh.pa.us обсуждение |
| Ответ на | Re: stawidth inconsistency with all NULL columns (Joe Conway <mail@joeconway.com>) |
| Список | pgsql-hackers |
Joe Conway <mail@joeconway.com> writes:
> On 5/21/19 3:55 PM, Tom Lane wrote:
>> Are you suggesting that we should set stawidth to zero even for a
>> fixed-width datatype? That seems pretty silly. We know exactly what
>> the value should be, and would be if we'd chanced to find even one
>> non-null entry.
> Well you could argue in similar fashion for variable width values -- if
> we find even one of those, it will be at least 4 bytes. So why set those
> to zero?
Um, really the minimum width is 1 byte, given short headers. But as
the code notes, zero means we don't know what a sane estimate would
be, which is certainly not the case for fixed-width types.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера