8

I need to test whether various types of database objects exist in a given database, and I don't know how to formulate these tests in Firebird SQL. Each test has the form "Does object of type X with name Y exist?". For example, I need to test whether a table with a given name exists. The object types I need to test are:

  • Table
  • View
  • Domain
  • Trigger
  • Procedure
  • Exception
  • Generate
  • UDF
  • Role

One can find how to query for a given table on the Internet, but the other types are more difficult to find ...

Paul Lalonde
  • 5,020
  • 2
  • 32
  • 35

3 Answers3

11

I think a lot of what you are asking can be found at this forum post. If you want to dive a little deeper, this site seems to have a graphical representation of the tables.

Knobloch
  • 463
  • 1
  • 6
  • 14
2

It seems like you need to query against the system tables to reliably get that information. Here's a tutorial that looks like it can help:

http://www.alberton.info/firebird_sql_meta_info.html

Adam Bellaire
  • 108,003
  • 19
  • 148
  • 163
0

Every year, Martijn Tonies made a session in Firebird Conference

so find in timetable in 2005 http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=fb_conf_timetable_2005

in 2006 http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=fb_conf_timetable_2006

there is also for 2007 and 2008

http://www.firebirdconference.net/index.php?option=com_content&view=article&id=3&Itemid=3

but I don't know where to download papers

Hugues Van Landeghem
  • 6,755
  • 3
  • 34
  • 59