Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6adc255

Browse files
author
Hiroshi Inoue
committed
Keep relations open until they are no longer needed.
1 parent1112a2a commit6adc255

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/commands/command.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.115 2001/01/07 00:05:22 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.116 2001/01/08 03:14:58 inoue Exp $
1212
*
1313
* NOTES
1414
* The PerformAddAttribute() code, like most of the relation
@@ -1195,10 +1195,10 @@ AlterTableAddConstraint(char *relationName,
11951195
pfree(slot);
11961196

11971197
heap_endscan(scan);
1198-
heap_close(rel,NoLock);
11991198

12001199
if (!successful)
12011200
{
1201+
heap_close(rel,NoLock);
12021202
elog(ERROR,"AlterTableAddConstraint: rejected due to CHECK constraint %s",name);
12031203
}
12041204
/*
@@ -1208,6 +1208,7 @@ AlterTableAddConstraint(char *relationName,
12081208
* the table.
12091209
*/
12101210
AddRelationRawConstraints(rel,NIL,constlist);
1211+
heap_close(rel,NoLock);
12111212
pfree(constlist);
12121213

12131214
break;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp