Tool Execute SQL
Execute SQL commands on a connected PostgreSQL source. Separate different commands with a semicolon (';').
- Author: O.Conrad (c) 2013
- Menu: Database|PostgreSQL|Tools
Parameters
| Name | Type | Identifier | Description | Constraints |
Output | Tables | table list, output | TABLES | - | - |
Options | Host | text, CMD | PG_HOST | - | Default: 127.0.0.1 |
Port | integer number, CMD | PG_PORT | - | Minimum: 0 Default: 5432 |
Database | text, CMD | PG_NAME | - | - |
User | text, CMD | PG_USER | - | - |
Password | text, CMD | PG_PWD | - | - |
Connections | choice, GUI | CONNECTION | - | Available Choices: Default: 0 |
SQL Statement | long text | SQL | - | Default: CREATE TABLE myTable1 (Col1 VARCHAR(255) PRIMARY KEY, Col2 INTEGER); INSERT INTO myTable1 (Col1, Col2) VALUES('First Value', 1); DROP TABLE myTable1;
|
Output | choice | OUTPUT | - | Available Choices: [0] none [1] message window [2] tables Default: 2 |
Stop on Error | boolean | STOP | - | Default: 0 |
Command-line
Usage: saga_cmd db_pgsql 6 [-PG_HOST <str>] [-PG_PORT <num>] [-PG_NAME <str>] [-PG_USER <str>] [-PG_PWD <str>] [-SQL <str>] [-TABLES <str>] [-OUTPUT <str>] [-STOP <str>]
-PG_HOST:<str> Host
text, CMD
Default: 127.0.0.1
-PG_PORT:<num> Port
integer number, CMD
Minimum: 0
Default: 5432
-PG_NAME:<str> Database
text, CMD
-PG_USER:<str> User
text, CMD
-PG_PWD:<str> Password
text, CMD
-SQL:<str> SQL Statement
long text
Default: CREATE TABLE myTable1 (Col1 VARCHAR(255) PRIMARY KEY, Col2 INTEGER);
INSERT INTO myTable1 (Col1, Col2) VALUES('First Value', 1);
DROP TABLE myTable1;
-TABLES:<str> Tables
table list, output
-OUTPUT:<str> Output
choice
Available Choices:
[0] none
[1] message window
[2] tables
Default: 2
-STOP:<str> Stop on Error
boolean
Default: 0