[postgis-users] How to implement a GUID

Milo van der Linden mlinden at zeelandnet.nl
Tue Jul 24 03:49:24 PDT 2007


Hello list!

I have been thinking my head off trying to figure it out and
documentation won't help me.

Yesterday I recieved the tip to use a GUID as a database wide unique
key. Well, I think it is the only option I have.

I import a shape file into a temp table.
>From this temp table is then insert the content into 2 other tables: 
final_attributes and final_geom

Final_attributes should contain all the attribute fields plus a column
to connect it to final_geom
Final_geom should contain a column to connect to Final_attributes plus
the_geom.

Because Final_attributes is a table that also connects to other
geom_tables; it needs a id that is unique over 3 or even more tables.

If I can generate GUIDs with php, Is that a good option?
Is there a way to use the geometry column to generate some sort of
unique ID? I would also like to check if the geometry is unique within
it's final_geom table!

What datatype should I use to store the GUID?

I cannot figure it out... please lend me a hand
-- 


	

Milo van der Linden
mlinden at zeelandnet.nl <mailto:mlinden at zeelandnet.nl>
milovanderlinden at gmail.com <mailto:milovanderlinden at gmail.com>
milo at 3dsite.nl <mailto:milo at 3dsite.nl>
http://www.3dsite.nl

	  	

De informatie in dit bericht reflecteerd mijn persoonlijke mening en
niet die van een bedrijf of instantie. Aan de informatie kunnen geen
rechten worden ontleend. Indien dit bericht onderdeel is van een forum,
mailing-list of community dan gelden automatisch de bijbehorende
voorwaarden.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070724/3541d3ef/attachment.html>


More information about the postgis-users mailing list