From: Tom Lane Date: Thu, 13 Jun 2002 20:02:31 +0000 (+0000) Subject: Suppress 'owner of datatype appears to be invalid' warning message for X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=8ac069143929b1faeabe8c352fafa013de320a16;p=users%2Fbernd%2Fpostgres.git Suppress 'owner of datatype appears to be invalid' warning message for undefined (shell) types. --- diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 55524851b2..ce633da2a3 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -1579,6 +1579,8 @@ getTypes(int *numTypes) * array elements by user-defined types * * we filter out the built-in types when we dump out the types + * + * same approach for undefined (shell) types */ /* Make sure we are in proper schema */ @@ -1633,10 +1635,6 @@ getTypes(int *numTypes) tinfo[i].typrelid = strdup(PQgetvalue(res, i, i_typrelid)); tinfo[i].typtype = *PQgetvalue(res, i, i_typtype); - if (strlen(tinfo[i].usename) == 0) - write_msg(NULL, "WARNING: owner of data type %s appears to be invalid\n", - tinfo[i].typname); - /* * check for user-defined array types, omit system generated ones */ @@ -1650,6 +1648,10 @@ getTypes(int *numTypes) tinfo[i].isDefined = true; else tinfo[i].isDefined = false; + + if (strlen(tinfo[i].usename) == 0 && tinfo[i].isDefined) + write_msg(NULL, "WARNING: owner of data type %s appears to be invalid\n", + tinfo[i].typname); } *numTypes = ntups;