src/bin/pg_dump/pg_dump.c
static void
makeTableDataInfo(DumpOptions *dopt, TableInfo *tbinfo)
{
	TableDataInfo *tdinfo;

	/*
	 * Nothing to do if we already decided to dump the table.  This will
	 * happen for "config" tables.
	 */
	if (tbinfo->dataObj != NULL)
		return;

	/* Skip VIEWs (no data to dump) */
	if (tbinfo->relkind == RELKIND_VIEW)
		return;
	/* Skip FOREIGN TABLEs (no data to dump) unless requested explicitly */
	if (tbinfo->relkind == RELKIND_FOREIGN_TABLE &&
		(foreign_servers_include_oids.head == NULL ||
		 !simple_oid_list_member(&foreign_servers_include_oids,
								 tbinfo->foreign_server)))
		return;
	/* Skip partitioned tables (data in partitions) */
	if (tbinfo->relkind == RELKIND_PARTITIONED_TABLE)
		return;

	/* Don't dump data in unlogged tables, if so requested */
	if (tbinfo->relpersistence == RELPERSISTENCE_UNLOGGED &&
		dopt->no_unlogged_table_data)
		return;

	/* Check that the data is not explicitly excluded */
	if (simple_oid_list_member(&tabledata_exclude_oids,
							   tbinfo->dobj.catId.oid))
		return;

	/* OK, let's dump it */
	tdinfo = (TableDataInfo *) pg_malloc(sizeof(TableDataInfo));

	if (tbinfo->relkind == RELKIND_MATVIEW)
		tdinfo->dobj.objType = DO_REFRESH_MATVIEW;
	else if (tbinfo->relkind == RELKIND_SEQUENCE)
		tdinfo->dobj.objType = DO_SEQUENCE_SET;
	else
		tdinfo->dobj.objType = DO_TABLE_DATA;

	/*
	 * Note: use tableoid 0 so that this object won't be mistaken for
	 * something that pg_depend entries apply to.
	 */
	tdinfo->dobj.catId.tableoid = 0;
	tdinfo->dobj.catId.oid = tbinfo->dobj.catId.oid;
	AssignDumpId(&tdinfo->dobj);
	tdinfo->dobj.name = tbinfo->dobj.name;
	tdinfo->dobj.namespace = tbinfo->dobj.namespace;
	tdinfo->tdtable = tbinfo;
	tdinfo->filtercond = NULL;	/* might get set later */
	addObjectDependency(&tdinfo->dobj, tbinfo->dobj.dumpId);

	/* A TableDataInfo contains data, of course */
	tdinfo->dobj.components |= DUMP_COMPONENT_DATA;

	tbinfo->dataObj = tdinfo;

	/* Make sure that we'll collect per-column info for this table. */
	tbinfo->interesting = true;
}
/*
 * Make a dumpable object for the data of this specific table
 *
 * Note: we make a TableDataInfo if and only if we are going to dump the
 * table data; the "dump" field in such objects isn't very interesting.
 */
Make a dumpable object for the data of this specific table
Note: we make a TableDataInfo if and only if we are going to dump the
table data; the "dump" field in such objects isn't very interesting.
Make a dumpable object for the data of this specific table Note : we make a TableDataInfo if and only if we are going to dump the table data ; the " dump " field in such objects isn ' t very interesting .
static void
makeTableDataInfo(DumpOptions *dopt, TableInfo *tbinfo)
{
	TableDataInfo *tdinfo;
	if (tbinfo->dataObj != NULL)
		return;
	if (tbinfo->relkind == RELKIND_VIEW)
		return;
	if (tbinfo->relkind == RELKIND_FOREIGN_TABLE &&
		(foreign_servers_include_oids.head == NULL ||
		 !simple_oid_list_member(&foreign_servers_include_oids,
								 tbinfo->foreign_server)))
		return;
	if (tbinfo->relkind == RELKIND_PARTITIONED_TABLE)
		return;
	if (tbinfo->relpersistence == RELPERSISTENCE_UNLOGGED &&
		dopt->no_unlogged_table_data)
		return;
	if (simple_oid_list_member(&tabledata_exclude_oids,
							   tbinfo->dobj.catId.oid))
		return;
	tdinfo = (TableDataInfo *) pg_malloc(sizeof(TableDataInfo));
	if (tbinfo->relkind == RELKIND_MATVIEW)
		tdinfo->dobj.objType = DO_REFRESH_MATVIEW;
	else if (tbinfo->relkind == RELKIND_SEQUENCE)
		tdinfo->dobj.objType = DO_SEQUENCE_SET;
	else
		tdinfo->dobj.objType = DO_TABLE_DATA;
	tdinfo->dobj.catId.tableoid = 0;
	tdinfo->dobj.catId.oid = tbinfo->dobj.catId.oid;
	AssignDumpId(&tdinfo->dobj);
	tdinfo->dobj.name = tbinfo->dobj.name;
	tdinfo->dobj.namespace = tbinfo->dobj.namespace;
	tdinfo->tdtable = tbinfo;
	tdinfo->filtercond = NULL;	
	addObjectDependency(&tdinfo->dobj, tbinfo->dobj.dumpId);
	tdinfo->dobj.components |= DUMP_COMPONENT_DATA;
	tbinfo->dataObj = tdinfo;
	tbinfo->interesting = true;
}
static void makeTableDataInfo ( DumpOptions * dopt , TableInfo * tbinfo ) { TableDataInfo * tdinfo ; if ( tbinfo -> dataObj != NULL ) return ; if ( tbinfo -> relkind == RELKIND_VIEW ) return ; if ( tbinfo -> relkind == RELKIND_FOREIGN_TABLE && ( foreign_servers_include_oids . head == NULL || ! simple_oid_list_member ( & foreign_servers_include_oids , tbinfo -> foreign_server ) ) ) return ; if ( tbinfo -> relkind == RELKIND_PARTITIONED_TABLE ) return ; if ( tbinfo -> relpersistence == RELPERSISTENCE_UNLOGGED && dopt -> no_unlogged_table_data ) return ; if ( simple_oid_list_member ( & tabledata_exclude_oids , tbinfo -> dobj . catId . oid ) ) return ; tdinfo = ( TableDataInfo * ) pg_malloc ( sizeof ( TableDataInfo ) ) ; if ( tbinfo -> relkind == RELKIND_MATVIEW ) tdinfo -> dobj . objType = DO_REFRESH_MATVIEW ; else if ( tbinfo -> relkind == RELKIND_SEQUENCE ) tdinfo -> dobj . objType = DO_SEQUENCE_SET ; else tdinfo -> dobj . objType = DO_TABLE_DATA ; tdinfo -> dobj . catId . tableoid = 0 ; tdinfo -> dobj . catId . oid = tbinfo -> dobj . catId . oid ; AssignDumpId ( & tdinfo -> dobj ) ; tdinfo -> dobj . name = tbinfo -> dobj . name ; tdinfo -> dobj . namespace = tbinfo -> dobj . namespace ; tdinfo -> tdtable = tbinfo ; tdinfo -> filtercond = NULL ; addObjectDependency ( & tdinfo -> dobj , tbinfo -> dobj . dumpId ) ; tdinfo -> dobj . components |= DUMP_COMPONENT_DATA ; tbinfo -> dataObj = tdinfo ; tbinfo -> interesting = true ; }
Make a dumpable object for the data of this specific table
 Note: we make a TableDataInfo if and only if we are going to dump the
 table data; the "dump" field in such objects isn't very interesting.
Make a dumpable object for the data of this specific table Note : we make a TableDataInfo if and only if we are going to dump the table data ; the " dump " field in such objects isn ' t very interesting .
/*
	 * Nothing to do if we already decided to dump the table.  This will
	 * happen for "config" tables.
	 */ /* Skip VIEWs (no data to dump) */ /* Skip FOREIGN TABLEs (no data to dump) unless requested explicitly */ /* Skip partitioned tables (data in partitions) */ /* Don't dump data in unlogged tables, if so requested */ /* Check that the data is not explicitly excluded */ /* OK, let's dump it */ /*
	 * Note: use tableoid 0 so that this object won't be mistaken for
	 * something that pg_depend entries apply to.
	 */ /* might get set later */ /* A TableDataInfo contains data, of course */ /* Make sure that we'll collect per-column info for this table. */