Re: Statistics Import and Export
От | Corey Huinker |
---|---|
Тема | Re: Statistics Import and Export |
Дата | |
Msg-id | CADkLM=f6f+VkpQykYLoD1Jjph_7wvNvKW+2FU8QeKjbSzxsDbA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Statistics Import and Export (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Statistics Import and Export
Re: Statistics Import and Export |
Список | pgsql-hackers |
After a bit of playing around, it seemed messy to make it into
a join, but we could replace the two array_agg sub-selects with
a single one:
(SELECT pg_catalog.array_agg(ROW(attname, attstattarget) ORDER BY attnum)
FROM pg_catalog.pg_attribute WHERE attrelid = i.indexrelid)
and then what we need could be pulled out of that, although
I'm not sure if pg_dump has logic at hand for deconstructing an
array of composite.
From what I can see, it doesn't. Moreover, the attstattarget array agg is only done in version 11 and higher, and we need to go as far back as we've got expression indexes.
Or we could leave it as two array_aggs,
aggregating attname and attstattarget separately but removing
the attstattarget filter.
That's what I was thinking, thanks for the confirmation.
В списке pgsql-hackers по дате отправления: