[Info-ingres] Can a rule work with a global temporary session table-

Roy Hann specially at processed.almost.meat
Wed Jun 13 09:14:40 UTC 2018


nksvg1 at gmail.com wrote:

> I want whenever an ABF application is called to get the terminal of the
> user and it's Linux users and inset those values in a session table.since
> the session is persistent I want whenever an insert happens in a specific
> table to capture the values inserted but also get the user ID values
> from the session table and all together pass them to a stored procedure
> summoned by the rule.something like
> 
> Create rule X after insert on table A
> (
> last_year=new.last_year,
> xtable=session.mysessiontable)
> 
> Create procedure XX as (
> last_year ingresdate not null,
> xtable set of (…..)
> )
> Declare …..
> 
> The rule accepts just a table though so it becomes 
> Create rule X after insert on table A
> (
> xtable=session.mysessiontable)
> 
> Which upon running from isql I got a sigsev!!
> 
> So I don't waste anymore resources to the wrong direction is what
> I'm trying to possible to start with?  Just to make clear I need the
> session table scheme because I want to reuse the table definition as
> per user/session

I really am not sure I understand what you need to accomplish but
perhaps this view will work in place of a session temporary table:

create view mysessiontable as
select dbmsinfo('initial_user') as initial_user,
       dbmsinfo('session_user') as session_user,
       dbmsinfo('system_user') as system_user,
       dbmsinfo('terminal') as terminal;

Roy






More information about the Info-ingres mailing list