mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
Disallow changing/dropping default expression of a SERIAL column
Dhanaraj M
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.185 2006/06/16 18:42:21 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.186 2006/06/27 03:21:54 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -3365,6 +3365,11 @@ ATExecColumnDefault(Relation rel, const char *colName,
|
||||
* safety, but at present we do not expect anything to depend on the
|
||||
* default.
|
||||
*/
|
||||
if (newDefault)
|
||||
RemoveSequenceDefault(RelationGetRelid(rel), attnum, DROP_RESTRICT, false);
|
||||
else
|
||||
RemoveSequenceDefault(RelationGetRelid(rel), attnum, DROP_RESTRICT, true);
|
||||
|
||||
RemoveAttrDefault(RelationGetRelid(rel), attnum, DROP_RESTRICT, false);
|
||||
|
||||
if (newDefault)
|
||||
|
Reference in New Issue
Block a user