Subject Re: Constraints and indexes automagically renamed
Author lysander_fb
--- In firebird-support@yahoogroups.com, Svein Erling Tysvær
<svein.erling.tysvaer@k...> wrote:

Hello Svein,

thanks for jumping in. Maybe someone will find an explanation.
I am using Firebird 1.51. This happens with classic and with superserver.

I am setting the names of the constraints and indexes with the help of
my admin-tool (IB Expert). They are persistent at least over several
days. I also checked for the dates of the last restores, and found
that at least on 1 database it is sooooo long ago, that it could not
possibly be the reason for this behaviour.

There seems to be some kind of trend, though.
This phenomenon happens more often with more older tables (old =
created earlier). And that also means that not ALL of the names are
suddenly changed, but only those on some tables.

I'm a bit clueless on this.

ciao,
André


> Hello André,
> first of all, I do not know the answer to your question, but thought
> that two days without any answer (unless I overlooked something) would
> make it likely that this thread would never get answered.
>
> Questions: What version of Firebird are you using and how do you set
> the names that disappear?
>
> I think that in the early days of Firebird, you could not specify a
> name upon creation and had to modify system tables to change the
> names. A restore would recreate rather than restore these system
> tables and names were gone (backup should never change names, only
> restore).
>
> However, version 1.5 appear to have the possibility of assigning names
> to constraints, and hence these names should (in my mind) persist
> beyond a restore. Though I do not know whether this applies to all
> databases or only new databases (e.g. it may matter if the databases
> have been ported from an older version or if they are defined with
> Dialect 1).
>
> HTMOJITT (*),
> Set
>
> (*) -Hope This Makes Others Jump Into This Thread
>
> --- In firebird-support@yahoogroups.com, "lysander_fb" wrote:
> > Hello all,
> >
> > I have some kind of phenomenon and cannot find anything in my
> > documentations, please forgive me if I have overlooked it or if this
> > is otherwise something obvious and SHOULD be known to me.
> >
> > Here is what troubles me a bit:
> > I try to give meaningful names to everything in a database, and have
> > my own nomenclatura-system. This applies not only to field-names,
> > but of course also to index-names and constraints.
> >
> > Now, somehow, after some time, my identifiers get exchanged.
> > Constraint "PI_3044A" (for the first primary key in schema 3044)
> > would suddenly become "INTEG_28" and the corresponding index will be
> > renamed from "IxP_3044A" to something like "RDB$Primary_12".
> >
> > Right now I do suspect it happens with backing up and restoring the
> > database, but couldn't nail it down just now.
> >
> > What's going on and how can I prevent this?
> >
> > Unfortunately I am still using some older programs which demand an
> > index-name to function properly.