Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0074a3a

Browse files
committed
fix DROP TABLE bug
1 parent 33689dc commit 0074a3a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/hooks.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ pathman_prepare_drop(Node *parsetree)
777777
{
778778
RangeVar *rv = makeRangeVarFromNameList((List *) lfirst(cell));
779779
Oid relid = RangeVarGetRelid(rv, lockmode, true);
780-
Relation rel = heap_open(relid, lockmode);
780+
Relation rel;
781781

782782
if (!OidIsValid(relid))
783783
{
@@ -790,6 +790,8 @@ pathman_prepare_drop(Node *parsetree)
790790
rv->relname)));
791791
}
792792

793+
rel = heap_open(relid, lockmode);
794+
793795
/* Is it pg_pathman's partitioned table? */
794796
if (get_pathman_relation_info(relid) != NULL)
795797
{

0 commit comments

Comments
 (0)