[fdo-internals] PostGIS ticket 106 question

Robert Fortin robert.fortin at autodesk.com
Wed Feb 20 11:44:50 EST 2008


Oups!  Error...

Correction: So as soon as there is data you ***can't*** delete the table...

-----Original Message-----
From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Robert Fortin
Sent: Wednesday, February 20, 2008 11:42 AM
To: FDO Internals Mail List
Subject: RE: [fdo-internals] PostGIS ticket 106 question

At first I thought that it was up to the provider to decide in what circumstance a class (table) could be deleted.
Well, not really...

The documentation is not always clear and detailed but in this case the FDO spec for ApplySchema is pretty clear (extract from http://fdo.osgeo.org/files/fdo/docs/FDO_API/index.htm FdoIApplySchema Class Reference)

If schema changes include deletion of classes or the schema itself, then those classes (or the schema, if it is marked as deleted) must not contain any instance data. If they do, an exception will be thrown.

So as soon as there is data you can delete the table.  You must empty the table before you can delete it.

RF

-----Original Message-----
From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Mateusz Loskot
Sent: Wednesday, February 20, 2008 11:22 AM
To: FDO Internals Mail List
Subject: Re: [fdo-internals] PostGIS ticket 106 question

Bruno Scott wrote:
> As we are about to fix that one
>     http://trac.osgeo.org/fdo/ticket/106
> Just want to check with you guys because there is a debate on that one
>
> http://www.nabble.com/Defects-in-PostGIS-provider-to12280094s18162.html#a12295194
>
> For my point of view, as PostGIS allow dropping table with the SQL "Drop
> table" it's safe to do so.

Bruno,

It should be safe at least in current version of PostGIS provider,
I mean where a feature class mapping to physical table is simple
one-to-one relation, but if in future there is more complex mapping
available then simple DROP TABLE may break data consistency.

Cheers
--
Mateusz Loskot
http://mateusz.loskot.net
_______________________________________________
fdo-internals mailing list
fdo-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-internals
_______________________________________________
fdo-internals mailing list
fdo-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-internals


More information about the fdo-internals mailing list