[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] Interoperability : SERIAL or Explicit Sequence
From:       Ben Madin <ben () remoteinformation ! com ! au>
Date:       2009-10-23 20:34:46
Message-ID: 0DE9CFC9-708E-49E0-8132-6EA953C51C10 () remoteinformation ! com ! au
[Download RAW message or body]

Fabrrice,

Check the PostgreSQL docs for this, but SERIAL is really just a  
convenience word when declaring a table, not a type. Thye column type  
will be integer.

If you subsequently pg_dump the table, it will dump the type as int  
with the sequence creation commands in the script.

Finally, I believe that you would want (or need) to specify SERIAL  
UNIQUE now to ensure primary key is unique.



-- 

Ben Madin
AusVet Animal Health Services
P.O. Box 5467
Broome   WA   6725
Australia

t : +61 8 9192 5455
f : +61 8 9192 5535
m : 0448 887 220
e : ben@ausvet.com.au

AusVet's website:  http://www.ausvet.com.au

This transmission is for the intended addressee only and is  
confidential information. If you have received this transmission in  
error, please delete it and notify the sender. The contents of this  
email are the opinion of the writer only and are not endorsed by  
AusVet Animal Health Services unless expressly stated otherwise.  
Although AusVet uses virus scanning software we do not accept  
liability for viruses or similar in any attachments.

On 23/10/2009, at 19:03, F T <oukile@gmail.com> wrote:

> 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
>
>
>
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic