mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Fix ALTER TRIGGER ... RENAME, broken in WITH OIDS removal.
I (Andres) broke this in 578b229718
.
Author: Rushabh Lathia
Discussion: https://postgr.es/m/CAGPqQf04PywZX3sVQaF6H=oLiW9GJncRW+=e78vTy4MokEWcZw@mail.gmail.com
This commit is contained in:
@ -1721,14 +1721,14 @@ renametrig(RenameStmt *stmt)
|
||||
NULL, 2, key);
|
||||
if (HeapTupleIsValid(tuple = systable_getnext(tgscan)))
|
||||
{
|
||||
Form_pg_trigger trigform = (Form_pg_trigger) GETSTRUCT(tuple);
|
||||
|
||||
tgoid = trigform->oid;
|
||||
Form_pg_trigger trigform;
|
||||
|
||||
/*
|
||||
* Update pg_trigger tuple with new tgname.
|
||||
*/
|
||||
tuple = heap_copytuple(tuple); /* need a modifiable copy */
|
||||
trigform = (Form_pg_trigger) GETSTRUCT(tuple);
|
||||
tgoid = trigform->oid;
|
||||
|
||||
namestrcpy(&trigform->tgname,
|
||||
stmt->newname);
|
||||
|
Reference in New Issue
Block a user