EPUB | CHM | PDF

TPSQLCopy.Properties.Options

Top Previous Next

Specifies various behavioral properties of the TPSQLCopy.

Syntax:

TCopyOption = (coUseOIDs, coBinary, coCSV, coHeader, coNULL, coDelimiter, coQuote, coEscape, coFreeze);
TCopyOptions = set of TCopyOption;
property Options: TCopyOptions;

Description:

Set Options to include the desired properties for the TPSQLCopy. Options is a set drawn from the following values:

coUseOIDs

Specifies copying the OID for each row.

An error is raised if OIDs is specified for a table that does not have OIDs, or in the case of copying a query using SQL property.

coBinary

Causes all data to be stored or read in binary format rather than as text. You cannot specify the coDelimiter, coNULL, or coCSV options in binary mode.

coCSV

Selects Comma Separated Value (CSV) mode.

coHeader

Specifies the output or input contains a header line with the names of each column. On output, the first line contains the column names from the table, and on input, the first line is ignored.

coNULL

Enables representing NULL values as NullValue property value.

coDelimiter

Enables using Delimiter property value as a column separator in a CSV mode.

coQuote

Enables using Quote property value as a quotation character in CSV mode.

coEscape

Enables using Escape property value as a character that should appear before a Quote data character value in CSV mode.

coFreeze

Requests copying the data with rows already frozen, just as they would be after running the VACUUM FREEZE command. This is intended as a performance option for initial data loading. Rows will be frozen only if the table being loaded has been created or truncated in the current subtransaction, there are no cursors open and there are no older snapshots held by this transaction.

Note that all other sessions will immediately be able to see the data once it has been successfully loaded. This violates the normal rules of MVCC visibility and users specifying should be aware of the potential problems this might cause.

See also: DataFormat, Delimiter, Escape, NullValue, Quote, SQL