src/bin/pg_dump/pg_dump.c
bool
shouldPrintColumn(const DumpOptions *dopt, const TableInfo *tbinfo, int colno)
{
	if (dopt->binary_upgrade)
		return true;
	if (tbinfo->attisdropped[colno])
		return false;
	return (tbinfo->attislocal[colno] || tbinfo->ispartition);
}
/*
 * Test whether a column should be printed as part of table's CREATE TABLE.
 * Column number is zero-based.
 *
 * Normally this is always true, but it's false for dropped columns, as well
 * as those that were inherited without any local definition.  (If we print
 * such a column it will mistakenly get pg_attribute.attislocal set to true.)
 * For partitions, it's always true, because we want the partitions to be
 * created independently and ATTACH PARTITION used afterwards.
 *
 * In binary_upgrade mode, we must print all columns and fix the attislocal/
 * attisdropped state later, so as to keep control of the physical column
 * order.
 *
 * This function exists because there are scattered nonobvious places that
 * must be kept in sync with this decision.
 */
Test whether a column should be printed as part of table's CREATE TABLE.
Column number is zero-based.

Normally this is always true, but it's false for dropped columns, as well
as those that were inherited without any local definition.  (If we print
such a column it will mistakenly get pg_attribute.attislocal set to true.)
For partitions, it's always true, because we want the partitions to be
created independently and ATTACH PARTITION used afterwards.

In binary_upgrade mode, we must print all columns and fix the attislocal
attisdropped state later, so as to keep control of the physical column
order.

This function exists because there are scattered nonobvious places that
must be kept in sync with this decision.
Test whether a column should be printed as part of table ' s CREATE TABLE . Column number is zero - based . Normally this is always true but it ' s false for dropped columns as well as those that were inherited without any local definition . ( If we print such a column it will mistakenly get pg_attribute . attislocal set to true . ) For partitions it ' s always true because we want the partitions to be created independently and ATTACH PARTITION used afterwards . In binary_upgrade mode we must print all columns and fix the attislocal attisdropped state later so as to keep control of the physical column order . This function exists because there are scattered nonobvious places that must be kept in sync with this decision .
bool
shouldPrintColumn(const DumpOptions *dopt, const TableInfo *tbinfo, int colno)
{
	if (dopt->binary_upgrade)
		return true;
	if (tbinfo->attisdropped[colno])
		return false;
	return (tbinfo->attislocal[colno] || tbinfo->ispartition);
}
bool shouldPrintColumn ( const DumpOptions * dopt , const TableInfo * tbinfo , int colno ) { if ( dopt -> binary_upgrade ) return true ; if ( tbinfo -> attisdropped [ colno ] ) return false ; return ( tbinfo -> attislocal [ colno ] || tbinfo -> ispartition ) ; }
Test whether a column should be printed as part of table's CREATE TABLE.
Test whether a column should be printed as part of table ' s CREATE TABLE .