SAGA-GIS Tool Library Documentation (v9.2.0)

Tool Export Shapes to PostGIS

Exports shapes to a PostGIS database.

Parameters

 NameTypeIdentifierDescriptionConstraints
InputShapesshapes, inputSHAPES--
OptionsHosttext, CMDPG_HOST-Default: 127.0.0.1
Portinteger number, CMDPG_PORT-Minimum: 0
Default: 5432
Databasetext, CMDPG_NAME--
Usertext, CMDPG_USER--
Passwordtext, CMDPG_PWD--
Connectionschoice, GUICONNECTION-Available Choices:
Default: 0
Primary Keytable fieldsSHAPES_PK--
Not Nulltable fieldsSHAPES_NN--
Uniquetable fieldsSHAPES_UQ--
Table NametextNAMEif empty shapes layers's name is used as table name-
If table exists...choiceEXISTS-Available Choices:
[0] abort export
[1] replace existing table
[2] append records, if table structure allows
Default: 0
EPSG Codeinteger numberCRS_EPSG-Minimum: -1
Default: -1

Command-line

Usage: saga_cmd db_pgsql 21 [-PG_HOST <str>] [-PG_PORT <num>] [-PG_NAME <str>] [-PG_USER <str>] [-PG_PWD <str>] [-SHAPES <str>] [-SHAPES_PK <str>] [-SHAPES_NN <str>] [-SHAPES_UQ <str>] [-NAME <str>] [-EXISTS <str>] [-CRS_EPSG <num>]
  -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
  -SHAPES:<str>   	Shapes
	shapes, input
  -SHAPES_PK:<str>	Primary Key
	table fields
  -SHAPES_NN:<str>	Not Null
	table fields
  -SHAPES_UQ:<str>	Unique
	table fields
  -NAME:<str>     	Table Name
	text
  -EXISTS:<str>   	If table exists...
	choice
	Available Choices:
	[0] abort export
	[1] replace existing table
	[2] append records, if table structure allows
	Default: 0
  -CRS_EPSG:<num> 	EPSG Code
	integer number
	Minimum: -1
	Default: -1