[postgis-users] Help CONSTRAINTS and others questions

Alessio Degioannini a.degioannini at proterstudio.com
Sat Dec 6 04:32:26 PST 2014


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".

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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20141206/3340c383/attachment.html>


More information about the postgis-users mailing list