INSERT

In this section:

Hyperstage supports the INSERT statement. For more information, see the PostgreSQL 9.2 Documentation.

INSERT [LOW_PRIORITY|DELAYED|HIGH_PRIORITY] [IGNORE]
    [INTO] tbl_name [(col_name,...)]
    {VALUES|VALUE} ({expr|DEFAULT},...),(...),...

Important: To use INSERT in bulk or batch load, you must set AUTOCOMMIT=0 and explicitly use COMMIT to complete the transaction. If AUTOCOMMIT=1, then each insert will result in the decompression and recompression of data packs, causing very slow performance. Explicit commits ensure that compression is only done once.


Top of page

x
Inserting a Query Result in a PostgreSQL Table

The CREATE TABLE statement can be used in combination with a select statement to generate a series of INSERTs from one table into another. The format is as follows:

CREATE TABLE <table_name> with (ENGINE=BRIGHTHOUSE) AS (SELECT …);

This will result in the creation and population of a new table based on the SELECT criteria. There are a few things to look out for:


WebFOCUS