Re: Statistics Import and Export

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Statistics Import and Export
Дата
Msg-id 8bc6ffe1e5abeac0fdde1a83d95409f0463af013.camel@j-davis.com
обсуждение исходный текст
Ответ на Re: Statistics Import and Export  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Statistics Import and Export  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, 2024-03-31 at 14:48 -0400, Tom Lane wrote:
> What happens when
> somebody adds a new stakind (and hence new pg_stats column)?
> You could try to add an overloaded pg_set_attribute_stats
> version with more parameters, but I'm pretty sure that would
> lead to "ambiguous function call" failures when trying to load
> old dump files containing only the original parameters.

Why would you need to overload in this case? Wouldn't we just define a
new function with more optional named parameters?

>   The
> present design is also fragile in that an unrecognized parameter
> will lead to a parse-time failure and no function call happening,
> which is less robust than I'd like.

I agree on this point; I found this annoying when testing the feature.

> So this leads me to suggest that we'd be best off with a VARIADIC
> ANY signature, where the variadic part consists of alternating
> parameter labels and values:

I didn't consider this and I think it has a lot of advantages. It's
slightly unfortunate that we can't make them explicitly name/value
pairs, but pg_dump can use whitespace or even SQL comments to make it
more readable.

Regards,
    Jeff Davis




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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Combine Prune and Freeze records emitted by vacuum
Следующее
От: "Imseih (AWS), Sami"
Дата:
Сообщение: Re: Psql meta-command conninfo+