Re: [BUG] pg_upgrade test fails from older versions.

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: [BUG] pg_upgrade test fails from older versions.
Дата
Msg-id 20221223163925.GR1153@telsasoft.com
обсуждение исходный текст
Ответ на Re: [BUG] pg_upgrade test fails from older versions.  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: [BUG] pg_upgrade test fails from older versions.  (Michael Paquier <michael@paquier.xyz>)
Re: [BUG] pg_upgrade test fails from older versions.  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Fri, Dec 23, 2022 at 05:51:28PM +0900, Michael Paquier wrote:
> On Thu, Dec 22, 2022 at 09:27:24PM -0600, Justin Pryzby wrote:
> > This would do a single seqscan:
> > SELECT format('ALTER TABLE %I ALTER COLUMN %I TYPE TEXT',
> > attrelid::regclass, attname) FROM pg_attribute WHERE
> > atttypid='aclitem'::regtype; -- AND ...
> > \gexec
> 
> FWIW, I find the use of a FOR loop with a DO block much cleaner to
> follow in this context, so something like the attached would be able
> to group the two queries and address your point on O(N^2).  Do you
> like that? 

LGTM.  Thanks.

-- 
Justin



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

Предыдущее
От: "Takamichi Osumi (Fujitsu)"
Дата:
Сообщение: RE: Time delayed LR (WAS Re: logical replication restrictions)
Следующее
От: Justin Pryzby
Дата:
Сообщение: Re: [RFC] building postgres with meson - v13