Subject RE: [IB-Architect] Delete Generator
Author Claudio Valderrama C.
Hope nobody will get annoyed by this generators-related discussion.
Dave, you said
> you can check for blr_generator_name
> before the symbol

Excuse my mangled brain, but when I get the blr from the set_emp_no trigger
in the example employee.gdb, I see
RDB$TRIGGER_BLR:
blr_version4,
blr_begin,
blr_begin,
blr_begin,
blr_assignment,
blr_gen_id, 10, 'E','M','P','_','N','O','_','G','E','N',
blr_literal, blr_long, 0, 1,0,0,0,
blr_field, 1, 6, 'E','M','P','_','N','O',
blr_end,
blr_end,
blr_end,
blr_eoc

So perhaps I can check for blr_gen_id plus the length of the trigger name
(10 in this case) as characters plus the name of the generator. Did you mean
that the word blr_generator_name would appear literally? I cannot search for
'blr_generator_id,10,EMP_NO_GEN'
probably because 10 is kept as chr(10), isn't it?
I was able to locate
chr(10)+'EMP_NO_GEN'
but I couldn't find
'blr_generator_id'+chr(10)+'EMP_NO_GEN'
probably because that instruction is a symbolic constant???

You are right in the sense I can create a generator G with the same name
than a table G. Creating a procedure named G is not allowed but I can create
a trigger named G for table G and an exception named G.

C.
---------
Claudio Valderrama C.
Ingeniero en Informática - Consultor independiente
http://members.tripod.com/cvalde


> -----Original Message-----
> From: David Schnepper [mailto:dschnepper@...]
> Sent: Lunes 17 de Abril de 2000 16:38
> To: 'IB-Architect@egroups.com'
> Subject: RE: [IB-Architect] Delete Generator
>
>
>
> This handles 99% of the cases -- but fails in the perverse cases
> of a table named 'EMP_NO_GEN' (etc.) (you can check for blr_generator_name
> before the symbol -- etc.)
>
> Also, many metadata objects (tables & columns certainly) have two access
> modes
> in BLR -- symbolic and ID. (eg: blr_relation "ANAME" and blr_relation_id
> 203
> both refer to the same relation). Symbolic is the more robust
> way to refer
> to objects, but need to check for both as there are ways the user can
> generate
> blr that uses the _id method. (The _id method is slightly more
> efficient).
>
> I'm not sure if there is blr to refer to generators by both ID and name.
>
> Dave
>
> -----Original Message-----
> From: Claudio Valderrama C. [mailto:cvalde@...]
> Sent: Sunday, April 16, 2000 1:46 AM
> To: IB-Architect@egroups.com
> Subject: RE: [IB-Architect] Delete Generator
>
>
> You are right.
> Actually I can do
>
> delete from rdb$generators
>
> and I got no complain. I didn't commit, of course. The only way
> to scan for
> a generator is looking for it in fields like trigger_blr and
> procedure_blr;
> for example, in employee.gdb:
>
> select rdb$trigger_name
> from rdb$triggers
> where rdb$trigger_blr containing 'EMP_NO_GEN'
>
> gives SET_EMP_NO as the only result.
>
> C.
> ---------
> Claudio Valderrama C.
> Ingeniero en Informática - Consultor independiente
> http://members.tripod.com/cvalde
>
>
> > -----Original Message-----
> > From: David Schnepper [mailto:dschnepper@...]
> > Sent: Lunes 10 de Abril de 2000 12:58
> > To: 'IB-Architect@egroups.com'
> > Subject: RE: [IB-Architect] Delete Generator
> >
> >
> >
> > (A nit) - In ODS 10 (first available in v6.0), a generator is a 64 bit
> > quantity.
> > Still not worth recovering.
> >
> > However, "DROP GENERATOR" is a SQL statement which should be
> supported --
> > a) Currently people do it with DELETE FROM RDB$GENERATORS WHERE
> > RDB$GENERATOR_NAME = 'WHATEVER';
> > b) Which doesn't properly check dependency graph
> > c) And people need to actually "drop generators" when removing
> subsystems,
> > or developing
> > a script to upgrade a production database (or undo an update).
> > d) (and a reason just for grins) - SQL 92 calls for it.
> >
> > Dave
> >
> > -----Original Message-----
> > From: Jim Starkey [mailto:jas@...]
> > Sent: Sunday, April 09, 2000 11:32 AM
> > To: IB-Architect@egroups.com; IB-Architect@egroups.com
> > Subject: RE: [IB-Architect] Insert Speed
> >
> >
> > At 12:16 AM 4/9/00 -0400, Claudio Valderrama C. wrote:
> > >
> > > Some specific points, hope brief to answer:
> > >- When I look at rdb$pages, am I watching at the PIP or at a high level
> > view
> > >of the PIP or they are not related at all?
> > >- About generator pages, can I assume there're no practical
> limits on the
> > >number of generators? When I no longer need one of these, if I
> delete the
> > >appropriate entry in rdb$generators, will the "deleted
> generator" remain
> > >anyway for all the lifetime of the database? Can I get rid of it with a
> > >backup/restore since there's no DROP GENERATOR command? I
> don't expect an
> > >unused generator to hold too much space, so this question is motivated
> > >mainly by curiosity.
> > >
> >
> > The PIP stuff is answered in another post.
> >
> > A generate consumes 32 bits from a disk file. Not worth recovering.
> >
> > Jim Starkey
> >
> > ------------------------------------------------------------------------
> > Win $1000 at eGroups!
> > Click here to find out how:
> > http://click.egroups.com/1/2861/3/_/_/_/955305239/
> > ------------------------------------------------------------------------
> >
> > To unsubscribe from this group, send an email to:
> > IB-Architect-unsubscribe@onelist.com
> >
> >
> >
> >
> > ------------------------------------------------------------------------
> > Special Offer-Earn 300 Points from MyPoints.com for trying @Backup
> > Get automatic protection and access to your important computer files.
> > Install today:
> > http://click.egroups.com/1/2344/3/_/_/_/955386069/
> > ------------------------------------------------------------------------
> >
> > To unsubscribe from this group, send an email to:
> > IB-Architect-unsubscribe@onelist.com
> >
> >
> >
>
>
> ------------------------------------------------------------------------
> Avoid the lines and visit avis.com for quick and easy online
> reservations. Enjoy a compact car nationwide for only $29 a day!
> Click here for more details.
> http://click.egroups.com/1/3011/3/_/830676/_/955875093/
> ------------------------------------------------------------------------
>
> To unsubscribe from this group, send an email to:
> IB-Architect-unsubscribe@onelist.com
>
>
>
> ------------------------------------------------------------------------
> High rates giving you headaches? The 0% APR Introductory Rate from
> Capital One. 9.9% Fixed thereafter!
> http://click.egroups.com/1/3010/3/_/830676/_/956003840/
> ------------------------------------------------------------------------
>
> To unsubscribe from this group, send an email to:
> IB-Architect-unsubscribe@onelist.com
>
>
>