mirror of
https://github.com/postgres/postgres.git
synced 2025-08-18 12:22:09 +03:00
Fix crash if a DROP is attempted on an internally-dependent object.
Introduced in 8.4 rewrite of dependency.c. Per bug #5072 from Amit Khandekar.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/catalog/dependency.c,v 1.89.2.1 2009/08/07 15:28:07 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/catalog/dependency.c,v 1.89.2.2 2009/09/22 15:46:43 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -559,7 +559,8 @@ findDependentObjects(const ObjectAddress *object,
|
||||
{
|
||||
char *otherObjDesc;
|
||||
|
||||
if (object_address_present(&otherObject, pendingObjects))
|
||||
if (pendingObjects &&
|
||||
object_address_present(&otherObject, pendingObjects))
|
||||
{
|
||||
systable_endscan(scan);
|
||||
/* need to release caller's lock; see notes below */
|
||||
|
Reference in New Issue
Block a user