<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#000000" text="#ffffff">
On 1/8/2011 5:11 PM, Ben Madin wrote:
<blockquote
cite="mid:B57CAECE-4BBB-439F-8DEC-7845D7967070@remoteinformation.com.au"
type="cite">
<pre wrap="">Byron,
A little bit more information may help here - what do you mean by 'importing' the table into QGIS?</pre>
</blockquote>
Ach, "Add PostGIS Layer" was use.<br>
<br>
<blockquote
cite="mid:B57CAECE-4BBB-439F-8DEC-7845D7967070@remoteinformation.com.au"
type="cite">
<pre wrap=""> Have you checked that the primary key is unique</pre>
</blockquote>
Yes, it is. They are very simple tables.<br>
<blockquote
cite="mid:B57CAECE-4BBB-439F-8DEC-7845D7967070@remoteinformation.com.au"
type="cite">
<pre wrap=""> - and such a constraint exists on the table definition? </pre>
</blockquote>
It does, in each table.<br>
<blockquote
cite="mid:B57CAECE-4BBB-439F-8DEC-7845D7967070@remoteinformation.com.au"
type="cite">
<pre wrap="">and that the column is in the geometry_columns table</pre>
</blockquote>
The gid column is missing from the geometry_columns table. AH HA! ah
ha? Problem?<br>
<blockquote
cite="mid:B57CAECE-4BBB-439F-8DEC-7845D7967070@remoteinformation.com.au"
type="cite">
<pre wrap=""> - you may want to try populate_geometry_columns() function.
</pre>
</blockquote>
As John Cleese said in "Silverado", "Today, my jurisdiction ends
here." I'm clueless as how to proceed.<br>
Just add it, as the primary key?<br>
<blockquote
cite="mid:B57CAECE-4BBB-439F-8DEC-7845D7967070@remoteinformation.com.au"
type="cite">
<pre wrap="">
maybe post the output of \d tablename.
cheers
Ben
On 09/01/2011, at 9:46 AM, Byron Como wrote:
</pre>
<blockquote type="cite">
<pre wrap="">The problem:
Missing primary key column in postgresql table imported into Quantum GIS.
Details:
43,000 object database created using Windows XP 32 bit, postgresql 8.4, postgis 1.4, Quantum GIS 1.5.
Daily backups using pgadmin.
Several db restores were performed on the XP system for various reasons (one time was to recover from a lightning strike). Restored data was good and project continued with no problems.
Recently upgraded to Windows 7 64 bit to be current and take advantage of the increased memory available.
Installed the same software as above.
The data in postgresql seems ok and can be manipulated normally - copied, pasted, deleted.
Importing a table into Qgis 1.5 or 1.6 results in layer with the primary key column missing. The data can't be manipulated completely. The table can be added to but deletions can't be performed. The primary key is gid, integer.
Corrective actions thus far:
Reloaded software many times giving great attention to the details of installation. Examined the data in pgadmin for anomalies. Nothing apparent. All seems correct. Posted to Quantum GIS mailing list. Nothing there.
Expected resolution:
Barring solution from mailing list suggestions, reinstall on Windows XP 32 bit and continue with memory limitations as before. (Extra memory desired to make very large format high-resolution prints).
_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
</pre>
</blockquote>
<pre wrap="">
_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
</pre>
</blockquote>
<br>
</body>
</html>