Skip to content

Commit b1313e3

Browse files
committed
Suppress 'owner of datatype appears to be invalid' warning message for
undefined (shell) types.
1 parent c66eb00 commit b1313e3

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
*
2424
* IDENTIFICATION
25-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.265 2002/05/28 22:26:56 tgl Exp $
25+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.266 2002/06/13 20:02:31 tgl Exp $
2626
*
2727
*-------------------------------------------------------------------------
2828
*/
@@ -1579,6 +1579,8 @@ getTypes(int *numTypes)
15791579
* array elements by user-defined types
15801580
*
15811581
* we filter out the built-in types when we dump out the types
1582+
*
1583+
* same approach for undefined (shell) types
15821584
*/
15831585

15841586
/* Make sure we are in proper schema */
@@ -1633,10 +1635,6 @@ getTypes(int *numTypes)
16331635
tinfo[i].typrelid = strdup(PQgetvalue(res, i, i_typrelid));
16341636
tinfo[i].typtype = *PQgetvalue(res, i, i_typtype);
16351637

1636-
if (strlen(tinfo[i].usename) == 0)
1637-
write_msg(NULL, "WARNING: owner of data type %s appears to be invalid\n",
1638-
tinfo[i].typname);
1639-
16401638
/*
16411639
* check for user-defined array types, omit system generated ones
16421640
*/
@@ -1650,6 +1648,10 @@ getTypes(int *numTypes)
16501648
tinfo[i].isDefined = true;
16511649
else
16521650
tinfo[i].isDefined = false;
1651+
1652+
if (strlen(tinfo[i].usename) == 0 && tinfo[i].isDefined)
1653+
write_msg(NULL, "WARNING: owner of data type %s appears to be invalid\n",
1654+
tinfo[i].typname);
16531655
}
16541656

16551657
*numTypes = ntups;

0 commit comments

Comments
 (0)