ODP: [firebird-support] Missing system triggers for foreign key constraints
Hi Really 2.5.2? It is from November 06, 2012. You miss few years or bugfixing and improvement. Current version of 2.5 serises is 2.5.9. Regards, Karol Bieniaszewski
[firebird-support] Missing system triggers for foreign key constraints
Greetins all, I'm dealing with a customer database (FB 2.5.2), which seems to be missing several system triggers for foreign key constraints. He has been receiving the ISC ERROR CODE:335544466 with the message -- violation of FOREIGN KEY constraint "XXX" on table "YYY" Foreign key references are present for the record -- when trying to delete some records. The same operation is working fine on the database I'm shipping with the application. When doing some research, I've found a similar post and the reason seemed to be missing system triggers for foreign key constraints. I've used the suggested statement (slightly modified as it was not about a check contraint in my case) for a check select trim(cc.rdb$constraint_name), trim(cc.rdb$trigger_name), rc.rdb$relation_name, trg.rdb$trigger_source from rdb$relation_constraints rc join rdb$check_constraints cc on rc.rdb$constraint_name = cc.rdb$constraint_name join rdb$triggers trg on cc.rdb$trigger_name = trg.rdb$trigger_name where rc.rdb$relation_name = 'table_with_constraint' and indeed received no results on the "broken" database, while getting 2 entries on the original database. A further look into RDB$TRIGGERS using "select * from rdb$triggers order by RDB$RELATION_NAME" shows me, that there are 1220 entries in the original database and only 196 in the customer database. The number of entries with rdb$system_flag = 0 is the same in both databases, so my own trigger seems to be fine. When I drop the foreign key contraint in question and add it again, the error when deleting the records, is gone, and I'm receiving 2 entries from the joint query above (was none before) and also the number from RDB$TRIGGERS gets up by 2 to 198, so it looks that for some foreign key constraints the system triggers are missing, right? What would be the best was to find out which ones are missing and to re-create them or to drop and re-add the foreign key constraints, which seems to create system triggers automatically. Ideally a script that would fix, what's missing, and ignore what it's there as it should. Best regards, Patrick
Re: [firebird-support] Python Firebird library fdb for web development
There is a dedicated mailing list for Firebird and Python: firebird-pyton. You might want to ask your question there. You can subscribe by sending an email to firebird-python-subscr...@yahoogroups.com. Mark On 2019-08-06 15:25, Aldo Caruso aldo.car...@argencasas.com [firebird-support] wrote: > Hi, > > I'm currently using Firebird 3.0 for a web development using PHP 7.2 > with Apache 2.4 on Ubuntu 18.04 > > I'm evaluating a new development with Python 3.6 using a > microframework like Bottle or Flash. > > I've been using fdb Python package ( python-fdb 1.6 ) for Python > scripts ( not for web development ) successfully. > > One of the key functions of PHP library for Firebird is the > possibility to open a persistent connection ( function ibase_pconnect > [1] ), which allows keeping it open when the script ends, so that it > can > be reused in the future in case another script or the same one needs to > open a connection with the same parameters (i.e. same database, user, > role, etc. ). This creates a connection pool that is useful for > increasing the script response time. > > I wonder whether this can be done with fdb package. > > Thanks in advance for any clarification. > > Aldo Caruso > > [1] https://www.php.net/manual/en/function.ibase-pconnect.php
[firebird-support] Python Firebird library fdb for web development
Hi, I'm currently using Firebird 3.0 for a web development using PHP 7.2 with Apache 2.4 on Ubuntu 18.04 I'm evaluating a new development with Python 3.6 using a microframework like Bottle or Flash. I've been using fdb Python package ( python-fdb 1.6 ) for Python scripts ( not for web development ) successfully. One of the key functions of PHP library for Firebird is the possibility to open a persistent connection ( function ibase_pconnect [1] ), which allows keeping it open when the script ends, so that it can be reused in the future in case another script or the same one needs to open a connection with the same parameters (i.e. same database, user, role, etc. ). This creates a connection pool that is useful for increasing the script response time. I wonder whether this can be done with fdb package. Thanks in advance for any clarification. Aldo Caruso [1] https://www.php.net/manual/en/function.ibase-pconnect.php ++ Visit http://www.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there. Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ ++ Yahoo Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo Groups is subject to: https://info.yahoo.com/legal/us/yahoo/utos/terms/
RE: [firebird-support] 3.x - Check if DB exist using alias
Agreed. But he can write a UDF in Delphi and define it in special 'Info.fdb' which is available all the time and requires no security. Since Firebird is running this UDF, it has all the permissions. From: firebird-support@yahoogroups.com Sent: Monday, August 5, 2019 11:25 AM To: firebird-support@yahoogroups.com Subject: Re: [firebird-support] 3.x - Check if DB exist using alias On 2019-08-05 15:58, 'Zoran' zoran...@gmail.com [firebird-support] wrote: > What Dimitry said, or you can try this: > > > > > > function _GetAliasDBFName(alias): string; > > var > > sl: TStringList; > > begin > > result := ''; > > sl := TStringList.Create; > > try > > sl.LoadFromFile('C:\Program > Files\Firebird\Firebird_3_0\databases.conf'); > > result := sl.Values[alias]; > > finally > > sl.Free; > > end; > > end; > > > > Simply call _ GetAliasDBFName and pass your alias name as a param. > Problem might arise if FB team chooses to change name of database.conf > file, or re-allocate it. That doesn't work remote, nor will it work if the user running this doesn't have read access to databases.conf. Mark [Non-text portions of this message have been removed]
Re: {Disarmed} [firebird-support] Re: 2.5.9 - LOCALTIME
> Database dialect is 1 and changing the column name and the connected > code is not an option either at the moment, unfortunately. It might be an option to modify code and compile for your own. It might be sufficient to modify parse.y by replacing "LOCALTIME" by some different Name that does not hurt e.g. "FBLOCALTIME". Elmar