Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-21 Thread Adriano dos Santos Fernandes
On 21/03/2014 13:18, Leyne, Sean wrote: > >> Sub-objects (parameters, columns, constraints) and attributes (say, routine >> source) are not tracked directly. >> >> You should read system tables and compare (in before and after triggers). > How? > > Yes I can create a trigger, but I can't read the b

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-21 Thread Dimitry Sibiryakov
21.03.2014 17:18, Leyne, Sean wrote: > So, you can't see what sub-objects have changed. Which is the limitation I > am trying to highlight. You always can add feature request to tracker: BEFORE CREATE/DROP/ALTER FIELD triggers and NEW/OLD contexts in them for accessing changed field's prope

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-21 Thread Jim Starkey
On 3/21/2014 12:18 PM, Leyne, Sean wrote: > >> Sub-objects (parameters, columns, constraints) and attributes (say, routine >> source) are not tracked directly. >> >> You should read system tables and compare (in before and after triggers). > How? > > Yes I can create a trigger, but I can't read the

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-21 Thread Leyne, Sean
> Sub-objects (parameters, columns, constraints) and attributes (say, routine > source) are not tracked directly. > > You should read system tables and compare (in before and after triggers). How? Yes I can create a trigger, but I can't read the before/after views of the system table from a t

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-21 Thread Adriano dos Santos Fernandes
On 21/03/2014 13:03, Leyne, Sean wrote: > So, I can find out which object (Trigger, Procedure, View and Table) has > changed, great! > > How do I find out column/field has changed for ALTER TABLE ADD ? > > (I didn't find anyway based on the link that Carlos cited) > > Sub-objects (parameters,

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-21 Thread Leyne, Sean
> -Original Message- > From: Claudio Valderrama C. [mailto:cva...@usa.net] > Sent: Thursday, March 20, 2014 9:19 PM > To: 'For discussion among Firebird Developers' > Subject: Re: [Firebird-devel] RFC: stop fiddling with sys tables > > > -Original

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-21 Thread Leyne, Sean
Carlos, > LS> OK, but since DDL Triggers don't yet exist -- what should be supported in > the meantime? > > DDL triggers are already available at FB 3: > http://tracker.firebirdsql.org/browse/CORE-2310 Thanks for the link, help a lot. Sean

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-20 Thread Claudio Valderrama C.
> -Original Message- > From: Thomas Beckmann [mailto:thomas.beckm...@assfinet.de] > Sent: Viernes, 21 de Marzo de 2014 2:26 > > Hm, I'm using read access to system tables quite a bit, We are speaking about stopping DIRECT WRITES to sys tables. READS will be allowed as always. People can

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-20 Thread Thomas Beckmann
Hm, I'm using read access to system tables quite a bit, particularly to create some triggers or automatically build some statements (find all fields and field types of a table) or checking dependencies between tables - if there will be appropriate ways to still do this, it's fine with me - though I

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-20 Thread Dmitry Yemanov
21.03.2014 01:38, Claudio Valderrama C. wrote: > - Linking user tables to sys tables (FK) should be forbidden (I didn't try, > but if it works, it shouldn't). Sys tables don't have PK/UK constraints (only unique indices), so FKs cannot be created. > - User code should not fiddle with sys genera

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-20 Thread Claudio Valderrama C.
> -Original Message- > From: Adriano dos Santos Fernandes [mailto:adrian...@gmail.com] > Sent: Jueves, 20 de Marzo de 2014 21:34 > > On 20-03-2014 18:38, Claudio Valderrama C. wrote: > > - Using ATT_gbak_attachment is a security risk, but I don't > know how to > > solve it. I think this

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-20 Thread Adriano dos Santos Fernandes
On 20-03-2014 18:38, Claudio Valderrama C. wrote: > - Using ATT_gbak_attachment is a security risk, but I don't know how to > solve it. I think this should be replaced by a role, BACKUP_OPERATOR and of > course, this role is checked against the active user, not a program saying > "I'm gbak". Anybod

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-20 Thread Claudio Valderrama C.
> -Original Message- > From: Leyne, Sean [mailto:s...@broadviewsoftware.com] > Sent: Jueves, 20 de Marzo de 2014 18:05 > > > - Creating user objects with RDB$ prefix should be > forbidden (at least until > > we implement schemas). > > Why? > > RDB$System_Flag already exists in RDB$Rela

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-20 Thread Carlos H. Cantu
LS> OK, but since DDL Triggers don't yet exist -- what should be supported in the meantime? DDL triggers are already available at FB 3: http://tracker.firebirdsql.org/browse/CORE-2310 []s Carlos http://www.firebirdnews.org FireBase - http://www.FireBase.com.br -

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-20 Thread Claudio Valderrama C.
> -Original Message- > From: Leyne, Sean [mailto:s...@broadviewsoftware.com] > Sent: Jueves, 20 de Marzo de 2014 18:46 > > >That's what DDL triggers are for. They can write change > > log to a user table, > > no need to touch system ones. > > OK, but since DDL Triggers don't yet exi

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-20 Thread Jim Starkey
User updateable system tables seemed like a good way to build a access language neutral database engine for Rdb/ELN and Interbase. The Rdb/VMS guys never warmed to the concept, and developed an MBLR (metadata BLR) mechanism. It wasn't a big hit, either, and I eventually created DYN for many o

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-20 Thread Leyne, Sean
> 20.03.2014 23:05, Leyne, Sean wrote: > > I think you missed: > > > > - Can/should user create additional columns in System tables? (ie. > > Create_datetime, Change_datetime -- for a simple schema change > > tracking function) > > > > - Can/should user create their own triggers on System tables?

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-20 Thread Dimitry Sibiryakov
20.03.2014 23:05, Leyne, Sean wrote: > I think you missed: > > - Can/should user create additional columns in System tables? (ie. > Create_datetime, Change_datetime -- for a simple schema change tracking > function) > > - Can/should user create their own triggers on System tables? (i.e. to detec

Re: [Firebird-devel] RFC: stop fiddling with sys tables

2014-03-20 Thread Leyne, Sean
> - Creating user objects with RDB$ prefix should be forbidden (at least until > we implement schemas). Why? RDB$System_Flag already exists in RDB$Relations, which identify true system defined objects, why is it necessary to prevent the use of the prefix by a user? I think you missed: - Can/

[Firebird-devel] RFC: stop fiddling with sys tables

2014-03-20 Thread Claudio Valderrama C.
This is my own view, but it comes from a conversation with Dmitry: - Rights on sys tables should be forbidden. If you want to grant/revoke specific actions, use DDL. No ACLs on sys tables. - If there are things that can't be accomplished with our regular methods, we create more DDL. We should teac