SAGA-GIS Module Library Documentation (v2.1.4)

Module Execute SQL

Execute SQL commands on a connected PostgreSQL source. Separate different commands with a semicolon (';').

Parameters

 NameTypeIdentifierDescriptionConstraints
OptionsHostTextPG_HOSTPassword-
PortIntegerPG_PORT-Minimum: 0
Default: 5432
DatabaseTextPG_NAMEDatabase Name-
UserTextPG_USERUser Name-
PasswordTextPG_PWDPassword-
SQL StatmentLong textSQL-Default: CREATE TABLE myTable1 (Col1 VARCHAR(255) PRIMARY KEY, Col2 INTEGER);
INSERT INTO myTable1 (Col1, Col2) VALUES('First Value', 1);
DROP TABLE myTable1;
Show ResultsBooleanOUTPUT-Default: 1
Stop on ErrorBooleanSTOP-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>] [-OUTPUT <str>] [-STOP <str>]
  -PG_HOST:<str>	Host
	Text
  -PG_PORT:<num>	Port
	Integer
	Minimum: 0
	Default: 5432
  -PG_NAME:<str>	Database
	Text
  -PG_USER:<str>	User
	Text
  -PG_PWD:<str> 	Password
	Text
  -SQL:<str>    	SQL Statment
	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;

  -OUTPUT:<str> 	Show Results
	Boolean
	Default: 1
  -STOP:<str>   	Stop on Error
	Boolean
	Default: 0