[Qgis-user] Options when loading layers into PostGIS with DBManager

Michael Dufty MDufty at mbsenvironmental.com.au
Sun Apr 19 08:05:30 PDT 2020


Answering my own question again.
It does look like leaving everything alone works pretty well.
Primary key unchecked results in a primary key being set up with the id column as shown in grey.  This caused a problem when the layer had a pre-existing non-unique id column.  Works fine if the existing id column has unique values, or does not exist.
Leaving the geometry column unticked seems to create a geom column (as shown in grey).
If a spatial index is needed and wasn’t ticked, a warning will show in db manager afterwards and it is easy to create one from there.

Just needs the documentation update to say not to worry about it.  A bit like the lack of documentation on how to upgrade an existing install.  It doesn’t seem to matter what you do, but you can waste a lot of time trying to look it up if too cautious.

Michael Dufty
Senior Environmental Engineer

[cid:image001.jpg at 01D6169E.C91D6900]
MBS ENVIRONMENTAL
4 Cook Street, West Perth  WA 6005

t:    +61 8 9226-3166
f:    +61 8 9226-3177

e:   mdufty at mbsenvironmental.com.au<mailto:mdufty at mbsenvironmental.com.au>
w:   www.mbsenvironmental.com.au<blocked::http://www.mbsenvironmental.com.au/>
Disclaimer:
The information contained in this message is intended for those to whom it is addressed. It may contain confidential or privileged information and if you are not the intended recipient, you must not copy, distribute or take any action in reliance on it. If you received this message in error please destroy it and reply to the sender immediately or contact Martinick Bosch Sell Pty Ltd. on +61 8 9226 3166 immediately. All care has been taken to ensure that this message and any attachments are virus free; we do not accept responsibility for any virus infections caused by receipt of this message

From: Michael Dufty <MDufty at mbsenvironmental.com.au>
Sent: Sunday, 19 April 2020 4:43 PM
To: qgis-user at lists.osgeo.org
Subject: [Qgis-user] Options when loading layers into PostGIS with DBManager

Hi,
I am trying out saving data in PostGIS, and have got stuck on the upload “import layer/file” dialog in DB Manager.

Can anyone recommend a good reference on what options should be selected?
It seems to fall into a gap between PostGIS documentation and QGIS documentation and I can’t find any information on what should be selected in what circumstances.

In particular
Primary key – should this be ticked and the existing id field selected? What happens if it is left unticked?
Geometry column – is this needed? Objects still seem to have geometry if it is left out.
Create spatial index – this sounds like a good idea, but the one youtube tutorial I found (Klas Karlson) he left it unticked and said the layer already had everything.  Is it needed for some source formats and not others eg shapefile vs geopackage?

Convert field names to lower case doesn’t sound very useful, but I presume it is there for a reason, does anyone know the circumstances that would be needed?

Cheers,


Michael Dufty
Senior Environmental Engineer

[cid:image001.jpg at 01D6169E.C91D6900]
MBS ENVIRONMENTAL
4 Cook Street, West Perth  WA 6005

t:    +61 8 9226-3166
f:    +61 8 9226-3177

e:   mdufty at mbsenvironmental.com.au<mailto:mdufty at mbsenvironmental.com.au>
w:   www.mbsenvironmental.com.au<blocked::http://www.mbsenvironmental.com.au/>
Disclaimer:
The information contained in this message is intended for those to whom it is addressed. It may contain confidential or privileged information and if you are not the intended recipient, you must not copy, distribute or take any action in reliance on it. If you received this message in error please destroy it and reply to the sender immediately or contact Martinick Bosch Sell Pty Ltd. on +61 8 9226 3166 immediately. All care has been taken to ensure that this message and any attachments are virus free; we do not accept responsibility for any virus infections caused by receipt of this message

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20200419/ffa6c4df/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 1513 bytes
Desc: image001.jpg
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20200419/ffa6c4df/attachment-0001.jpg>


More information about the Qgis-user mailing list