Fixed a trucate problem with the seq rename. See #325

This commit is contained in:
Mario de Frutos 2018-03-21 12:05:56 +01:00
parent 04dc39bb16
commit f96c334f48

View File

@ -911,7 +911,7 @@ BEGIN
INTO relseq;
-- If it's the name we want, then rename it
IF relseq IS NOT NULL AND relseq = Format('%I.%I', destschema, destseq) THEN
PERFORM _CDB_SQL(Format('ALTER SEQUENCE %s RENAME TO %s_tmp', relseq, destseq), '_CDB_Rewrite_Table');
PERFORM _CDB_SQL(Format('ALTER SEQUENCE %s RENAME TO tmp_%s', relseq, destseq), '_CDB_Rewrite_Table');
END IF;
END IF;