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