[postgis-users] oid field
Aaron Koning
aaronkoning at gmail.com
Tue Jun 20 10:05:22 PDT 2006
Ahhh, MapServer doesn't really care what the column is you specify with
USING UNIQUE, in fact Refractions suggest that you don't use oid. Add a new
unique SERIAL column to each table (call it GID) and specifiy that column
instead of oid in your MapFile DATA variable.
Aaron
On 6/20/06, Ezequias Rodrigues da Rocha <ezequias at recife.pe.gov.br> wrote:
>
> No,
>
> The PostGIS driver on OpenJUMP does not takes care of it yet. My problem
> is the Mapserver (a web server thar connects with a PostGIS database).
>
> OpenJUMP can save and retrieve later, but mapserver needs this kind of
> data to exibit a map on the web or on OpenJUMP.
>
> Thank you
>
> Ezequias
>
> Aaron Koning escreveu:
> > Version 8.1 doesn't create the oid field by default. I'm not sure how
> > to generate a system oid field, but you can always do: ALTER TABLE xyz
> > ADD COLUMN oid serial; I'm not sure if this fills in the oid value for
> > each row, or whether you have to do that after the fact.
> >
> > oid is a sort of system field that, when created by default, isn't
> > displayed with "\d". Not sure why.
> >
> > When using JUMP, does a unique id field get created? With shp2pgsql
> > GID is created and thats good enough for unique identification of
> rows...
> >
> > Aaron
> >
> >
> > On 6/20/06, *Ezequias Rodrigues da Rocha* <ezequias at recife.pe.gov.br
> > <mailto:ezequias at recife.pe.gov.br>> wrote:
> >
> > Aaron,
> >
> > When you tell new versions you mean 8.1 ?
> >
> > Another question, why this field does not appears in a "\d" command
> ?
> > and how to generate this field if my application does not
> > generated it ?
> >
> >
> >
> > Regards
> >
> >
> > Aaron Koning escreveu:
> > > 'oid' is a database generated field containing unique values
> > (one for
> > > each row). In previous versions of PostgreSQL it was created by
> > > default, however in newer versions it is not generated by
> > default. The
> > > shp2pgsql loader creates a 'gid' field that also contains unique
> > > values, therefore the need for oid is moot ( i.e. use gid
> > instead of oid).
> > >
> > > Aaron
> > >
> > > On 6/19/06, *Ezequias Rodrigues da Rocha* <
> > ezequias at recife.pe.gov.br <mailto:ezequias at recife.pe.gov.br>
> > > <mailto:ezequias at recife.pe.gov.br
> > <mailto:ezequias at recife.pe.gov.br>>> wrote:
> > >
> > > Could someone tell me what oid field does ?
> > >
> > > I am using JUMP to load data into PostGIS and it is not
> > generating
> > > this
> > > king of column.
> > >
> > > I just think it is a problem is becouse didn't load the
> > > spatial_ref_sys
> > > table yet.
> > >
> > >
> > > Sincerely
> > > Ezequias
> > >
> > > _______________________________________________
> > > postgis-users mailing list
> > > postgis-users at postgis.refractions.net
> > <mailto:postgis-users at postgis.refractions.net>
> > > <mailto:postgis-users at postgis.refractions.net
> > <mailto:postgis-users at postgis.refractions.net>>
> > > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > > <http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> > >
> > >
> > >
> > >
> > > --
> > > +--------------------------------------------
> > > | Aaron Koning
> > > | Information Technologist
> > > | Prince George, BC, Canada.
> > > +--------------------------------------------
> > > | http://datashare.gis.unbc.ca/fist/
> > > | http://datashare.gis.unbc.ca/gctp-js/
> > > +--------------------------------------------
> > >
> >
> ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > postgis-users mailing list
> > > postgis-users at postgis.refractions.net
> > <mailto:postgis-users at postgis.refractions.net>
> > > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > >
> >
> > --
> > Ezequias Rodrigues da Rocha
> > http://ezequiasrocha.blogspot.com
> > msn:ezequias at hotmail.com <mailto:msn:ezequias at hotmail.com>
> > "the worst of democracies is still better than the best of
> > dictatorship"
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > <mailto:postgis-users at postgis.refractions.net>
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> >
> >
> >
> > --
> > +--------------------------------------------
> > | Aaron Koning
> > | Information Technologist
> > | Prince George, BC, Canada.
> > +--------------------------------------------
> > | http://datashare.gis.unbc.ca/fist/
> > | http://datashare.gis.unbc.ca/gctp-js/
> > <http://datashare.gis.unbc.ca/gctp-js/>
> > +--------------------------------------------
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
>
> --
> Ezequias Rodrigues da Rocha
> http://ezequiasrocha.blogspot.com
> msn:ezequias at hotmail.com
> "the worst of democracies is still better than the best of dictatorship"
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
--
+--------------------------------------------
| Aaron Koning
| Information Technologist
| Prince George, BC, Canada.
+--------------------------------------------
| http://datashare.gis.unbc.ca/fist/
| http://datashare.gis.unbc.ca/gctp-js/
+--------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060620/70dfefb7/attachment.html>
More information about the postgis-users
mailing list