Re: Eliminating pg_catalog.pg_rewrite.ev_attr
От | Alvaro Herrera |
---|---|
Тема | Re: Eliminating pg_catalog.pg_rewrite.ev_attr |
Дата | |
Msg-id | 20130904161253.GE5227@eldon.alvh.no-ip.org обсуждение исходный текст |
Ответ на | Eliminating pg_catalog.pg_rewrite.ev_attr (Kevin Grittner <kgrittn@ymail.com>) |
Список | pgsql-hackers |
Is this transformation correct? If I read this correctly, you're missing the rangeTableEntry_used() condition, no? > *** a/src/backend/rewrite/rewriteHandler.c > --- b/src/backend/rewrite/rewriteHandler.c > *************** > *** 1273,1287 **** matchLocks(CmdType event, > } > } > > ! if (oneLock->event == event) > ! { > ! if (parsetree->commandType != CMD_SELECT || > ! (oneLock->attrno == -1 ? > ! rangeTableEntry_used((Node *) parsetree, varno, 0) : > ! attribute_used((Node *) parsetree, > ! varno, oneLock->attrno, 0))) > ! matching_locks = lappend(matching_locks, oneLock); > ! } > } > > return matching_locks; > --- 1273,1280 ---- > } > } > > ! if (oneLock->event == event && parsetree->commandType != CMD_SELECT) > ! matching_locks = lappend(matching_locks, oneLock); > } > > return matching_locks; -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: