Outdated version of the documentation. Find the latest one here.

Datenbank

In PostGIS importieren

Beschreibung

Imports a vector layer currently loaded in QGIS into a PostGIS database. Prior to this a connection between QGIS and the PostGIS database has to be created (for example with the DB Manager).

Parameter

Layer to import [vector: any]
Existing vector layer in QGIS.
Datenbank (Verbindungsname) [selection]

Name of the database connection (not the database name).

Optionen:

  • 0 — local

Vorgabe: 0

Schema (Schemaname) [string]

An existing schema of the selected database can be chosen. By default this is the ‘public’ schema.

Vorgabe: public

Importieren in Tabelle (leer lassen um den Layername zu verwenden) [string]

Defines a table name for the imported vector file. By default the name of the vector file is chosen.

Vorgabe: (not set)

Primärschlüsselfeld [tablefield: any]

Optional.

Sets the primary key field from an existing field in the vector layer.

Geometriespalte [string]

Defines the name of the geometry column in the new PostGIS table. Geometry information for the features is stored in this column.

Vorgabe: geom

Überschreiben [boolean]

Überschreibt Tabellen, die den selben Namen haben.

Vorgabe: True

Räumlichen Index erzeugen [boolean]

Specify whether to create a spatial index or not. By default a spatial index is created.

Vorgabe: True

Convert field names to lowercase [boolean]

If activated this prevents the field names of the input vector layer from being converted to lowercase. By default field names will be lowercase after the import.

Vorgabe: True

Längenbeschränkungen auf Textfeld verwerfen [boolean]

Specify whether the length constraints on character fields should be dropped or not. By default the length constraints are applied.

Vorgabe: False

Ausgaben

Verwendung der Konsole

processing.runalg('qgis:importintopostgis', input, database, schema, tablename, primary_key, geometry_column, overwrite, createindex, lowercase_names, drop_string_length)

Siehe auch

PostGIS-SQL-Ausführen

Beschreibung

Allows a SQL database query to be performed on a PostGIS database connected to QGIS.

Parameter

Datenbank [string]

Name of the database, not the connection name. By default you don’t have to fill in the name, the current database connection will be chosen.

Vorgabe: (not set)

SQL-Anfrage [string]

Defines the SQL query, for example ‘create schema test;’.

Vorgabe: (not set)

Ausgaben

Verwendung der Konsole

processing.runalg('qgis:postgisexecutesql', database, sql)

Siehe auch