src/bin/pg_dump/pg_dump.c
static void
selectDumpableType(TypeInfo *tyinfo, Archive *fout)
{
	/* skip complex types, except for standalone composite types */
	if (OidIsValid(tyinfo->typrelid) &&
		tyinfo->typrelkind != RELKIND_COMPOSITE_TYPE)
	{
		TableInfo  *tytable = findTableByOid(tyinfo->typrelid);

		tyinfo->dobj.objType = DO_DUMMY_TYPE;
		if (tytable != NULL)
			tyinfo->dobj.dump = tytable->dobj.dump;
		else
			tyinfo->dobj.dump = DUMP_COMPONENT_NONE;
		return;
	}

	/* skip auto-generated array types */
	if (tyinfo->isArray || tyinfo->isMultirange)
	{
		tyinfo->dobj.objType = DO_DUMMY_TYPE;

		/*
		 * Fall through to set the dump flag; we assume that the subsequent
		 * rules will do the same thing as they would for the array's base
		 * type.  (We cannot reliably look up the base type here, since
		 * getTypes may not have processed it yet.)
		 */
	}

	if (checkExtensionMembership(&tyinfo->dobj, fout))
		return;					/* extension membership overrides all else */

	/* Dump based on if the contents of the namespace are being dumped */
	tyinfo->dobj.dump = tyinfo->dobj.namespace->dobj.dump_contains;
}
/*
 * selectDumpableType: policy-setting subroutine
 *		Mark a type as to be dumped or not
 *
 * If it's a table's rowtype or an autogenerated array type, we also apply a
 * special type code to facilitate sorting into the desired order.  (We don't
 * want to consider those to be ordinary types because that would bring tables
 * up into the datatype part of the dump order.)  We still set the object's
 * dump flag; that's not going to cause the dummy type to be dumped, but we
 * need it so that casts involving such types will be dumped correctly -- see
 * dumpCast.  This means the flag should be set the same as for the underlying
 * object (the table or base type).
 */
policy-setting subroutine
Mark a type as to be dumped or not

If it's a table's rowtype or an autogenerated array type, we also apply a
special type code to facilitate sorting into the desired order.  (We don't
want to consider those to be ordinary types because that would bring tables
up into the datatype part of the dump order.)  We still set the object's
dump flag; that's not going to cause the dummy type to be dumped, but we
need it so that casts involving such types will be dumped correctly -- see
dumpCast.  This means the flag should be set the same as for the underlying
object (the table or base type).
policy - setting subroutine Mark a type as to be dumped or not If it ' s a table ' s rowtype or an autogenerated array type we also apply a special type code to facilitate sorting into the desired order . ( We don ' t want to consider those to be ordinary types because that would bring tables up into the datatype part of the dump order . ) We still set the object ' s dump flag ; that ' s not going to cause the dummy type to be dumped but we need it so that casts involving such types will be dumped correctly -- see dumpCast . This means the flag should be set the same as for the underlying object ( the table or base type ) .
static void
selectDumpableType(TypeInfo *tyinfo, Archive *fout)
{
	if (OidIsValid(tyinfo->typrelid) &&
		tyinfo->typrelkind != RELKIND_COMPOSITE_TYPE)
	{
		TableInfo  *tytable = findTableByOid(tyinfo->typrelid);
		tyinfo->dobj.objType = DO_DUMMY_TYPE;
		if (tytable != NULL)
			tyinfo->dobj.dump = tytable->dobj.dump;
		else
			tyinfo->dobj.dump = DUMP_COMPONENT_NONE;
		return;
	}
	if (tyinfo->isArray || tyinfo->isMultirange)
	{
		tyinfo->dobj.objType = DO_DUMMY_TYPE;
	}
	if (checkExtensionMembership(&tyinfo->dobj, fout))
		return;					
	tyinfo->dobj.dump = tyinfo->dobj.namespace->dobj.dump_contains;
}
static void selectDumpableType ( TypeInfo * tyinfo , Archive * fout ) { if ( OidIsValid ( tyinfo -> typrelid ) && tyinfo -> typrelkind != RELKIND_COMPOSITE_TYPE ) { TableInfo * tytable = findTableByOid ( tyinfo -> typrelid ) ; tyinfo -> dobj . objType = DO_DUMMY_TYPE ; if ( tytable != NULL ) tyinfo -> dobj . dump = tytable -> dobj . dump ; else tyinfo -> dobj . dump = DUMP_COMPONENT_NONE ; return ; } if ( tyinfo -> isArray || tyinfo -> isMultirange ) { tyinfo -> dobj . objType = DO_DUMMY_TYPE ; } if ( checkExtensionMembership ( & tyinfo -> dobj , fout ) ) return ; tyinfo -> dobj . dump = tyinfo -> dobj . namespace -> dobj . dump_contains ; }
selectDumpableType: policy-setting subroutine
              Mark a type as to be dumped or not
selectDumpableType : policy - setting subroutine Mark a type as to be dumped or not
/* skip complex types, except for standalone composite types */ /* skip auto-generated array types */ /*
		 * Fall through to set the dump flag; we assume that the subsequent
		 * rules will do the same thing as they would for the array's base
		 * type.  (We cannot reliably look up the base type here, since
		 * getTypes may not have processed it yet.)
		 */ /* extension membership overrides all else */ /* Dump based on if the contents of the namespace are being dumped */