Dean Rasheed <dean.a.rash...@gmail.com> writes: > [ alter-rule-rename_complete.v2.patch ]
Committed with assorted editorialization. Aside from cosmetic issues, the main changes were: * use RangeVarGetRelidExtended with a callback to perform the lookup and locking of the target relation. This is a new API that the original version of RenameRewriteRule couldn't have known about. I borrowed the code pretty much verbatim from renametrig(), and am now wondering whether there shouldn't be some attempt to unify the callbacks for this. * call CacheInvalidateRelcache to ensure that other sessions notice the rule tuple update. It may be that this isn't necessary because nothing looks at the rule name fields in relcache entries ... but I wouldn't bet on that, and in any case it seems like bad practice to let stale cache entries hang around. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers