MADlib
1.1 A newer version is available
User Documentation
|
Compatibility SQL functions. More...
Go to the source code of this file.
Functions | |
void | insert_into (varchar inTableName, varchar inSQL) |
Mimick INSERT INTO . Create new rows in a table. More... | |
void | create_table_as (varchar inTableName, varchar inSQL, varchar inDistributed="RANDOMLY") |
Mimick CREATE TABLE AS . Create a table and fill it with data computed by a SELECT command. More... | |
void | create_temporary_table_as (varchar inTableName, varchar inSQL, varchar inDistributed="RANDOMLY") |
Mimick CREATE TEMPORARY TABLE AS . Create a temporary table and fill it with data computed by a SELECT command. More... | |
Definition in file compatibility.sql_in.
void create_table_as | ( | varchar | inTableName, |
varchar | inSQL, | ||
varchar | inDistributed = "RANDOMLY" |
||
) |
inTableName | The name (optionally schema-qualified) of the table to be created. |
inSQL | A SELECT command. |
inDistributed | The Greenplum Database distribution policy for the table. This can be either RANDOMLY , which is the default, or BY (column, [...]) . This parameter is ignored on PostgreSQL. |
CREATE TABLE AS
statement: SELECT create_table_as('table_name', $$ query $$, 'BY (column, [...]) | RANDOMLY');
SELECT create_table_as('public.test', $$ SELECT * FROM generate_series(1,10) AS id $$, 'BY (id)');
SELECT create_table_as('logregr_result', $$ SELECT * FROM logregr('data', 'y', 'x') $$, 'RANDOMLY');
CREATE TABLE AS
statement whenever possible. Known caveats of this workaround:CREATE TABLE AS
statement. Definition at line 225 of file compatibility.sql_in.
void create_temporary_table_as | ( | varchar | inTableName, |
varchar | inSQL, | ||
varchar | inDistributed = "RANDOMLY" |
||
) |
Definition at line 258 of file compatibility.sql_in.
void insert_into | ( | varchar | inTableName, |
varchar | inSQL | ||
) |
inTableName | The name (optionally schema-qualified) of an existing table. |
inSQL | A SELECT command. |
INSERT INTO
statement: SELECT insert_into('table_name', $$ query $$);
SELECT insert_into('public.test', $$ SELECT * FROM generate_series(1,10) AS id $$);
SELECT insert_into('logregr_results', $$ SELECT * FROM logregr('data', 'y', 'x') $$);
INSERT INTO
statement whenever possible. Known caveats of this workaround:INSERT INTO
statement. Definition at line 110 of file compatibility.sql_in.