Skip to content

Home > extract-pg-schema > ForeignTableColumn

ForeignTableColumn interface

Column in a foreign table.

Signature:

typescript
export interface ForeignTableColumn

Properties

Property

Modifiers

Type

Description

comment

string | null

Comment on the column.

defaultValue

any

Default value of the column.

expandedType

string

Expanded type name. If the type is an array, brackets will be appended to the type name.

generated

"ALWAYS" | "NEVER" | "BY DEFAULT"

Behavior of the generated column. "ALWAYS" if always generated, "NEVER" if never generated, "BY DEFAULT" if generated when a value is not provided.

informationSchemaValue

InformationSchemaColumn

Information schema value for the column.

isArray

boolean

Whether the column is an array.

isIdentity

boolean

Whether the column is an identity column.

isNullable?

boolean

(Optional) Whether the column is nullable. This is only present if the view is resolved.

isPrimaryKey?

boolean

(Optional) Whether the column is a primary key. This is only present if the view is resolved.

isUpdatable

boolean

Whether the column is updatable.

maxLength

number | null

Maximum length of the column.

name

string

Column name.

ordinalPosition

number

Ordinal position of the column in the view. Starts from 1.

source

{ schema: string; table: string; column: string; } | null

This will contain a "link" to the source table or view and column, if it can be determined.

type

ForeignTableColumnType

Type information.