Re: Statistics Import and Export

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Statistics Import and Export
Дата
Msg-id 3049348.1740855411@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Statistics Import and Export  (Alexander Lakhin <exclusion@gmail.com>)
Ответы Re: Statistics Import and Export
Список pgsql-hackers
Alexander Lakhin <exclusion@gmail.com> writes:
> 01.03.2025 20:04, Tom Lane wrote:
>> I was suspecting those float conversions as a likely cause, but
>> what do you think is wrong exactly?  I see nothing obviously
>> buggy in pg_strtof().

>  From my understanding, pg_strtof () can't stand against endptr == NULL.

D'oh!  I'm blind as a bat today.

> I have changed that line to:
>          char *tptr;
>          float        reltuples = strtof(PQgetvalue(res, i, i_reltuples), &tptr);
> and 002_compare_backups passed for me.

Cool, but surely the right fix is to make pg_strtof() adhere to
the POSIX specification, so we don't have to learn this lesson
again elsewhere.  I'll go make it so.

Independently of that, do we want to switch over to storing
reltuples as a string instead of converting it?  I still feel
uncomfortable about the amount of baggage we added to pg_dump
to avoid that.

            regards, tom lane



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