[Firebird-devel] External DDL triggers

2012-04-07 Thread Dimitry Sibiryakov
Hello, All. How in external DDL trigger get context variables, such as OBJECT_NAME and SQL_TEXT? -- SY, SD. -- For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monito

Re: [Firebird-devel] External DDL triggers

2012-04-07 Thread Adriano dos Santos Fernandes
On 07-04-2012 12:02, Dimitry Sibiryakov wrote: >Hello, All. > >How in external DDL trigger get context variables, such as OBJECT_NAME and > SQL_TEXT? > >From the "const IRoutineMetadata* metadata" parameter of makeTrigger... But note, triggers wasn't adapted for the new scheme of messa

Re: [Firebird-devel] External DDL triggers

2012-04-07 Thread Dimitry Sibiryakov
07.04.2012 17:23, Adriano dos Santos Fernandes wrote: > From the "const IRoutineMetadata* metadata" parameter of makeTrigger... Could you be a little more specific?.. I don't see in IRoutineMetadata anything like getContextVariable(). -- SY, SD.

Re: [Firebird-devel] External DDL triggers

2012-04-07 Thread Adriano dos Santos Fernandes
On 07-04-2012 12:29, Dimitry Sibiryakov wrote: > 07.04.2012 17:23, Adriano dos Santos Fernandes wrote: >> From the "const IRoutineMetadata* metadata" parameter of makeTrigger... > >Could you be a little more specific?.. I don't see in IRoutineMetadata > anything like > getContextVariable().

[Firebird-devel] [FB-Tracker] Created: (CORE-3809) can`t stop fbguard and fb_smp_server during it performs rollback

2012-04-07 Thread Pavel Zotov (JIRA)
can`t stop fbguard and fb_smp_server during it performs rollback Key: CORE-3809 URL: http://tracker.firebirdsql.org/browse/CORE-3809 Project: Firebird Core Issue Type: Bug

[Firebird-devel] [FB-Tracker] Created: (CORE-3810) isql: zero divide + coredump when use "-pag 0" command switch & set heading on inside .sql script

2012-04-07 Thread Pavel Zotov (JIRA)
isql: zero divide + coredump when use "-pag 0" command switch & set heading on inside .sql script -- Key: CORE-3810 URL: http://tracker.firebirdsql.org/browse/CORE-38

Re: [Firebird-devel] External DDL triggers

2012-04-07 Thread Dmitry Yemanov
07.04.2012 19:45, Adriano dos Santos Fernandes wrote: > It really don't expose all the engine internals. > > You can get it running SQL on this method. Perhaps it would be a better idea to write a SQL trigger calling the external procedure and passing the required context through. Dmitry

Re: [Firebird-devel] External DDL triggers

2012-04-07 Thread Dimitry Sibiryakov
07.04.2012 21:12, Dmitry Yemanov wrote: > Perhaps it would be a better idea to write a SQL trigger calling the > external procedure and passing the required context through. It is loosing whole point of external triggers. The same way an ordinary triggers can call UDFs. -- SY, SD. -

Re: [Firebird-devel] External DDL triggers

2012-04-07 Thread Adriano dos Santos Fernandes
On 07-04-2012 16:14, Dimitry Sibiryakov wrote: > 07.04.2012 21:12, Dmitry Yemanov wrote: >> Perhaps it would be a better idea to write a SQL trigger calling the >> external procedure and passing the required context through. > >It is loosing whole point of external triggers. The same way an or

Re: [Firebird-devel] External DDL triggers

2012-04-07 Thread Dimitry Sibiryakov
07.04.2012 22:44, Adriano dos Santos Fernandes wrote: > You can have a single external trigger able to read all table columns. > > In the context you're probably using it (replication), that's much > better. You don't need to write (generate / regenerate) specific > triggers for each table. For

Re: [Firebird-devel] External DDL triggers

2012-04-07 Thread Dimitry Sibiryakov
07.04.2012 22:44, Adriano dos Santos Fernandes wrote: > You can have a single external trigger able to read all table columns. And, BTW, no: I can't read BLOBs and arrays with current interface. -- SY, SD. -- For

Re: [Firebird-devel] External DDL triggers

2012-04-07 Thread Adriano dos Santos Fernandes
On 07-04-2012 18:03, Dimitry Sibiryakov wrote: > 07.04.2012 22:44, Adriano dos Santos Fernandes wrote: >> You can have a single external trigger able to read all table columns. > >And, BTW, no: I can't read BLOBs and arrays with current interface. > Why not? You must be able to receive the

Re: [Firebird-devel] External DDL triggers

2012-04-07 Thread Dimitry Sibiryakov
07.04.2012 23:09, Adriano dos Santos Fernandes wrote: > Why not? > > You must be able to receive the blob id in the C++ code, and calling > blob functions using the current transaction get its contents. Yep, I see BLOB function in IAttachment, but where are array functions? -- SY, SD. ---

Re: [Firebird-devel] External DDL triggers

2012-04-07 Thread Adriano dos Santos Fernandes
On 07-04-2012 18:15, Dimitry Sibiryakov wrote: > 07.04.2012 23:09, Adriano dos Santos Fernandes wrote: >> Why not? >> >> You must be able to receive the blob id in the C++ code, and calling >> blob functions using the current transaction get its contents. > >Yep, I see BLOB function in IAttach

Re: [Firebird-devel] External DDL triggers

2012-04-07 Thread Dimitry Sibiryakov
07.04.2012 23:35, Adriano dos Santos Fernandes wrote: >> > Yep, I see BLOB function in IAttachment, but where are array >> > functions? >> > > There too... getSlice, setSlice... What is function to substitute isc_array_lookup_bounds()? -- SY, SD.

Re: [Firebird-devel] External DDL triggers

2012-04-07 Thread Adriano dos Santos Fernandes
On 07-04-2012 18:39, Dimitry Sibiryakov wrote: > 07.04.2012 23:35, Adriano dos Santos Fernandes wrote: Yep, I see BLOB function in IAttachment, but where are array functions? >> There too... getSlice, setSlice... > >What is function to substitute isc_array_lookup_bounds()?

Re: [Firebird-devel] External DDL triggers

2012-04-07 Thread Adriano dos Santos Fernandes
On 07-04-2012 18:50, Adriano dos Santos Fernandes wrote: > On 07-04-2012 18:39, Dimitry Sibiryakov wrote: >> 07.04.2012 23:35, Adriano dos Santos Fernandes wrote: > Yep, I see BLOB function in IAttachment, but where are array > functions? > >>> There too... getSlice, setSlice... >

Re: [Firebird-devel] External DDL triggers

2012-04-07 Thread Dimitry Sibiryakov
07.04.2012 23:50, Adriano dos Santos Fernandes wrote: > This function is a client-function that does its works running other > functions. > > This function is not part of the provider API, and currently don't work > with new API objects. So, how can I get information about array dimensions and

Re: [Firebird-devel] External DDL triggers

2012-04-07 Thread Adriano dos Santos Fernandes
On 07-04-2012 18:54, Dimitry Sibiryakov wrote: > 07.04.2012 23:50, Adriano dos Santos Fernandes wrote: >> This function is a client-function that does its works running other >> functions. >> >> This function is not part of the provider API, and currently don't work >> with new API objects. > >

Re: [Firebird-devel] External DDL triggers

2012-04-07 Thread Dimitry Sibiryakov
08.04.2012 0:00, Adriano dos Santos Fernandes wrote: > 2) Use fb_get_database_handle and fb_get_transaction_handle to retrieve > the legacy handles and use them with the ibase function. isc_gen_sdl() is not documented. -- SY, SD. ---