Re: ALTER TABLE SET ACCESS METHOD on partitioned tables

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: ALTER TABLE SET ACCESS METHOD on partitioned tables
Дата
Msg-id 202403281558.xk5pgf7ur3dq@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: ALTER TABLE SET ACCESS METHOD on partitioned tables  (Justin Pryzby <pryzby@telsasoft.com>)
Ответы Re: ALTER TABLE SET ACCESS METHOD on partitioned tables  (Alexander Lakhin <exclusion@gmail.com>)
Список pgsql-hackers
On 2024-Mar-26, Justin Pryzby wrote:

> Looks right.  That's how I originally wrote it, except for the
> "stmt->accessMethod != NULL" case.
> 
> I prefered my way - the grammar should refuse to set stmt->accessMethod
> for inappropriate relkinds.  And you could assert that.

Hmm, I didn't like this at first sight, because it looked convoluted and
baroque, but I compared both versions for a while and I ended up liking
yours more than mine, so I adopted it.

> I also prefered to set "accessMethodId = InvalidOid" once, rather than
> twice.

Grumble.  I don't like initialization at declare time, so far from the
code that depends on the value.  But the alternative would have been to
assign right where this blocks starts, an additional line.  I pushed it
like you had it.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"This is what I like so much about PostgreSQL.  Most of the surprises
are of the "oh wow!  That's cool" Not the "oh shit!" kind.  :)"
Scott Marlowe, http://archives.postgresql.org/pgsql-admin/2008-10/msg00152.php



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] plpython function causes server panic
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [PATCH] plpython function causes server panic