Re: extend VacAttrStats to allow stavalues of different types

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: extend VacAttrStats to allow stavalues of different types
Дата
Msg-id 18320.1212417449@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: extend VacAttrStats to allow stavalues of different types  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Ответы Re: extend VacAttrStats to allow stavalues of different types
Список pgsql-patches
"Heikki Linnakangas" <heikki@enterprisedb.com> writes:
> Jan Urbański wrote:
>> +      * XXX or maybe fall back on attrtype-> stuff when these are NULL? That way
>> +      * we won't break other people's custom typanalyze functions. Not sure if
>> +      * any exist, though.

> I tried to google for a user defined data type with a custom typanalyze
> function but didn't find anything, so I don't think it's an issue.

Oh, it absolutely is an issue.  PostGIS has them, if no one else does.

I think the correct solution is to initialize the fields to match the
column type before calling the typanalyze function.  Then you don't
break compatibility for existing typanalyze functions.  It's also less
code, since the standard typanalyze functions can rely on those preset
values.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Feature: give pg_dump a WHERE clause expression
Следующее
От: Jan Urbański
Дата:
Сообщение: Re: extend VacAttrStats to allow stavalues of different types