On 12/06/2014 02:32 PM, Alessio Degioannini wrote:
Hi,
I'm a postgis/postgres newbie and I I would like to get some help on the topics that I'm going to describe.

I have imported into the database the shapefile "survey" of points (trees). The spatial table "survey" contains five columns:
- "Gid" (created during import and primary key, integer)
- "Id"
- "Code"
- "Old number"
- "Geom" (it also created during import).

The database includes several tables ("Species", "Defects", "Disease" and others) related to the main table "VTA".
Now I would like to know why, unlike what happened to the other tables, I can not connect with "ADD CONSTRAINT" column "code" (integer, not null, unique) of the table "VTA" to the corresponding column "code" (also integer, not null) the spatial table "survey".


Maybe you already have some values in the code column of VTA which do not exist in the code column of the survey table? You can not create a constraint when existing data already violate the constraint.

Another question: when I'm editing a field (for example "species name" in the column "species" of table "VTA", related to the table "Species", would that "species name" could be completed on the basis of the records in the table "Species". How can I do this?
Thanks in advance.

Alessio





This mail was received via Mail-SeCure System.


_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
This mail was received via Mail-SeCure System.



_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Reply via email to