-
-
Notifications
You must be signed in to change notification settings - Fork 268
DROP [IF EXISTS] ... [CORE3863] #4203
Copy link
Copy link
Closed
Labels
component: enginefix-version: 6.0 Alpha 1priority: minorqa: done successfullyrlsnotes60: yesAlready added to the Firebird 6.0 release notes. (Do not add this to signal it should be added.)Already added to the Firebird 6.0 release notes. (Do not add this to signal it should be added.)type: new feature
Metadata
Metadata
Assignees
Labels
component: enginefix-version: 6.0 Alpha 1priority: minorqa: done successfullyrlsnotes60: yesAlready added to the Firebird 6.0 release notes. (Do not add this to signal it should be added.)Already added to the Firebird 6.0 release notes. (Do not add this to signal it should be added.)type: new feature
Submitted by: eXandr (i.reg)
Votes: 4
It should be possible to determine not cause an error when deleting an object that does not exist
Something like that:
execute statement 'ALTER TABLE SOME_TABLE DROP [IF EXISTS] SOME_FIELD'; -- no raise error if field SOME_FIELD is not exist
or
execute statement 'DROP INDEX IDX1 [IF EXISTS]'; -- no raise error if index IDX1 is not exist
Workaround for now is:
begin
execute statement 'ALTER TABLE SOME_TABLE DROP SOME_FIELD';
when any do
begin
end
end
But this solution hides any error that is very bad. Another solution is to access the system tables, but it requires more code and can add even more errors.