Subject Re: Drop procedure
Author Alexander V.Nevsky
--- In firebird-support@yahoogroups.com, Martin <moirae@c...> wrote:
> Hi,
> I wrote SP for testing. There's a select with specified plan in it:
> PLAN (MASTER INDEX (MASTER_PTYPE, RDB$FOREIGN30))
>
> I droped FK RDB$FOREIGN30 in table MASTER, but forgot to modify
> PLAN before. Now I can't modify or drop this procedure. I always get:
>
> "This operation is not defined for system tables.
> unsuccessful metadata update.
> ERASE RDB$PROCEDURE_PARAMETERS failed.
> invalid request BLR at offset 1045.
> there is no index RDB$FOREIGN30 for table MASTER."
>
> or when dropping
>
> "Invalid token.
> invalid request BLR at offset 1045.
> there is no index RDB$FOREIGN30 for table MASTER."
>
> Is it possible (and safe) to drop it directly in RDB$PROCEDURES? Or
> how can I drop it now? Recreating of FK is unsuccessful.

Martin, I have no at home nor FB neither docs, so can't be sure in exact column name for BLR, but general idea is:

Update RDB$PROCEDURES Set RDB$PROCEDURE_BLR=''
Where RDB$PROCEDURE_NAME='THIS_PROCEDURE'

and then Drop Procedure THIS_PROCEDURE.

Best regards,
Alexander.