Opened 14 years ago

Closed 13 years ago

#106 closed defect (fixed)

PostGIS provider cannot delete a feature class

Reported by: cwilbur Owned by: mloskot
Priority: major Milestone: 3.4.0
Component: PostGIS Provider Version: 3.2.0
Severity: 3 Keywords:
Cc: jbirch External ID:


Using an FdoFeatureSchema pSchema from the connection's schema collection, the following code should drop the feature class table (and the associated feature id sequence, if any):

// remove the class from the schema
FdoPtr<FdoClassCollection> pClassColl = pSchema->GetClasses();
FdoPtr<FdoClassDefinition> pClass =
if ( pClass )

        // Create the ApplySchema command
        FdoPtr<FdoIApplySchema> pApplySchemaCmd = dynamic_cast<FdoIApplySchema*>(
                m_connection->CreateCommand(FdoCommandType_ApplySchema) );

        // Set the schema and execute the apply schema command

Whether the table needs to be empty seems to be under some debate currently. Regardless, the PostGIS provider does not possess this functionality at all.

Attachments (1)

DropTableDraft.patch (11.5 KB) - added by cwilbur 14 years ago.
Draft attempt at fix

Download all attachments as: .zip

Change History (7)

Changed 14 years ago by cwilbur

Attachment: DropTableDraft.patch added

Draft attempt at fix

comment:1 Changed 14 years ago by cwilbur

The DropTableDraft? patch is only to provoke discussion - it is definitely not ready to be submitted. I may be pulled away from work on the provider shortly and I wanted to make sure the work I had done so far was captured in case anyone else wanted to tackle this one before I get back to it.

comment:2 Changed 14 years ago by jbirch

Cc: jbirch added

comment:3 Changed 13 years ago by gregboone


comment:4 Changed 13 years ago by mloskot

See also big patch submitted for review as #318

comment:5 Changed 13 years ago by mloskot

Patch has been applied to the trunk (r3904). I'm closing it as fixed. Please, reopen if something is still not working well.

comment:6 Changed 13 years ago by mloskot

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.