dbTalk Databases Forums  

constraint trigger bound to session

comp.databases.postgresql comp.databases.postgresql


Discuss constraint trigger bound to session in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Thomas Guettler
 
Posts: n/a

Default constraint trigger bound to session - 10-09-2008 , 08:26 AM






Hi,

is it possible to create a constraint trigger which works
only on the current session?

I just used a constraint trigger to debug triggers which insert into
a history table.

The bug was found fast. But this can only be done if none else
accesses the db.

If you could bind a constraint trigger to a session, this could
be done in a live db, too.

Thomas

--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de

Reply With Quote
  #2  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: constraint trigger bound to session - 10-09-2008 , 08:39 AM






begin Thomas Guettler schrieb:
Quote:
Hi,

is it possible to create a constraint trigger which works
only on the current session?

I just used a constraint trigger to debug triggers which insert into
a history table.

The bug was found fast. But this can only be done if none else
accesses the db.

If you could bind a constraint trigger to a session, this could
be done in a live db, too.
You can do that per transaction. Disable the trigger, start a new tx,
enable the trigger. Hope that helps...


end
Andreas
--
Andreas Kretschmer
Linux - weil ich es mir wert bin!
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net


Reply With Quote
  #3  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: constraint trigger bound to session - 10-09-2008 , 08:39 AM



begin Thomas Guettler schrieb:
Quote:
Hi,

is it possible to create a constraint trigger which works
only on the current session?

I just used a constraint trigger to debug triggers which insert into
a history table.

The bug was found fast. But this can only be done if none else
accesses the db.

If you could bind a constraint trigger to a session, this could
be done in a live db, too.
You can do that per transaction. Disable the trigger, start a new tx,
enable the trigger. Hope that helps...


end
Andreas
--
Andreas Kretschmer
Linux - weil ich es mir wert bin!
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net


Reply With Quote
  #4  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: constraint trigger bound to session - 10-09-2008 , 08:39 AM



begin Thomas Guettler schrieb:
Quote:
Hi,

is it possible to create a constraint trigger which works
only on the current session?

I just used a constraint trigger to debug triggers which insert into
a history table.

The bug was found fast. But this can only be done if none else
accesses the db.

If you could bind a constraint trigger to a session, this could
be done in a live db, too.
You can do that per transaction. Disable the trigger, start a new tx,
enable the trigger. Hope that helps...


end
Andreas
--
Andreas Kretschmer
Linux - weil ich es mir wert bin!
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net


Reply With Quote
  #5  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: constraint trigger bound to session - 10-09-2008 , 08:39 AM



begin Thomas Guettler schrieb:
Quote:
Hi,

is it possible to create a constraint trigger which works
only on the current session?

I just used a constraint trigger to debug triggers which insert into
a history table.

The bug was found fast. But this can only be done if none else
accesses the db.

If you could bind a constraint trigger to a session, this could
be done in a live db, too.
You can do that per transaction. Disable the trigger, start a new tx,
enable the trigger. Hope that helps...


end
Andreas
--
Andreas Kretschmer
Linux - weil ich es mir wert bin!
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net


Reply With Quote
  #6  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: constraint trigger bound to session - 10-09-2008 , 08:39 AM



begin Thomas Guettler schrieb:
Quote:
Hi,

is it possible to create a constraint trigger which works
only on the current session?

I just used a constraint trigger to debug triggers which insert into
a history table.

The bug was found fast. But this can only be done if none else
accesses the db.

If you could bind a constraint trigger to a session, this could
be done in a live db, too.
You can do that per transaction. Disable the trigger, start a new tx,
enable the trigger. Hope that helps...


end
Andreas
--
Andreas Kretschmer
Linux - weil ich es mir wert bin!
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net


Reply With Quote
  #7  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: constraint trigger bound to session - 10-09-2008 , 08:39 AM



begin Thomas Guettler schrieb:
Quote:
Hi,

is it possible to create a constraint trigger which works
only on the current session?

I just used a constraint trigger to debug triggers which insert into
a history table.

The bug was found fast. But this can only be done if none else
accesses the db.

If you could bind a constraint trigger to a session, this could
be done in a live db, too.
You can do that per transaction. Disable the trigger, start a new tx,
enable the trigger. Hope that helps...


end
Andreas
--
Andreas Kretschmer
Linux - weil ich es mir wert bin!
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net


Reply With Quote
  #8  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: constraint trigger bound to session - 10-09-2008 , 08:39 AM



begin Thomas Guettler schrieb:
Quote:
Hi,

is it possible to create a constraint trigger which works
only on the current session?

I just used a constraint trigger to debug triggers which insert into
a history table.

The bug was found fast. But this can only be done if none else
accesses the db.

If you could bind a constraint trigger to a session, this could
be done in a live db, too.
You can do that per transaction. Disable the trigger, start a new tx,
enable the trigger. Hope that helps...


end
Andreas
--
Andreas Kretschmer
Linux - weil ich es mir wert bin!
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net


Reply With Quote
  #9  
Old   
Andreas Kretschmer
 
Posts: n/a

Default Re: constraint trigger bound to session - 10-09-2008 , 08:39 AM



begin Thomas Guettler schrieb:
Quote:
Hi,

is it possible to create a constraint trigger which works
only on the current session?

I just used a constraint trigger to debug triggers which insert into
a history table.

The bug was found fast. But this can only be done if none else
accesses the db.

If you could bind a constraint trigger to a session, this could
be done in a live db, too.
You can do that per transaction. Disable the trigger, start a new tx,
enable the trigger. Hope that helps...


end
Andreas
--
Andreas Kretschmer
Linux - weil ich es mir wert bin!
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.