[postgis-users] Interoperability : SERIAL or Explicit Sequence

Greg Williamson gwilliamson39 at yahoo.com
Fri Oct 23 03:34:46 PDT 2009


Fabrice --

I can't speak to Oracle directly, but Informix supports a SERIAL type (different mechanics under the hood but IIRC the port from Informix to postgres didn't have any issues with DDL declaring a SERIAL type. I'd go with that, personally, although BIGINT sequence might be needed if you anticipate enough rows to make it worth while.

When you dump the DDL for your database you'll see that something like "my_gid SERIAL PRIMARY KEY" gets broken out into the explicit sequence, but it all works out to the same thing. 

I think MapServer handles SERIALs ok -- been a while since I worked with it though. ESRI doesn't work and play well with others, and I can't speak to the other applications.

HTH,

Greg W.





________________________________
From: F T <oukile at gmail.com>
To: postgis-users at postgis.refractions.net
Sent: Fri, October 23, 2009 12:03:07 AM
Subject: [postgis-users] Interoperability : SERIAL or Explicit Sequence

Hello, 

I would like to design a Postgresql / Postgis database that would be the most interoperable as possible.
The spatial tables could be used by (Select, Insert, Update, Delete)  :
- a Web GIS (Mapserver, geoserver, ...)
- commercial clients (Geoconcept, Mapinfo, FME, ESRI)
- Opensource clients (QGIS, GvSIG, ...).
Great dream Isn't it? ...

I know that some of these "soft" need to  a numeric unique key (Mapserver for example don't deal with character keys...).
I know OID are depreciated.

I think is would be a good idea to add a unique numeric key to all my tables.
What is the best way to do that?

   - Add a SERIAL field (but it is PostgreSQL spécific?).
   - Add a numeric field explicitely managed by an associated sequence (it does the same but seems more opened?).

So SERIAL or EXPLICIT SEQUENCE?

Thanks for your responses

Fabrice

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20091023/af97ff00/attachment.html>


More information about the postgis-users mailing list