403Webshell
Server IP : 172.67.134.114  /  Your IP : 162.159.115.41
Web Server : Apache/2.4.37
System : Linux almalinux.duckdns.org 4.18.0-553.111.1.el8_10.x86_64 #1 SMP Sun Mar 8 20:06:07 EDT 2026 x86_64
User : ricodeal ( 1046)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/doc/postgresql-docs/html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/doc/postgresql-docs/html/pltcl-event-trigger.html
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>43.7. Event Trigger Procedures in PL/Tcl</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="[email protected]" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="pltcl-trigger.html" title="43.6. Trigger Procedures in PL/Tcl" /><link rel="next" href="pltcl-error-handling.html" title="43.8. Error Handling in PL/Tcl" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">43.7. Event Trigger Procedures in PL/Tcl</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="pltcl-trigger.html" title="43.6. Trigger Procedures in PL/Tcl">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="pltcl.html" title="Chapter 43. PL/Tcl - Tcl Procedural Language">Up</a></td><th width="60%" align="center">Chapter 43. PL/Tcl - Tcl Procedural Language</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 10.23 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="pltcl-error-handling.html" title="43.8. Error Handling in PL/Tcl">Next</a></td></tr></table><hr></hr></div><div class="sect1" id="PLTCL-EVENT-TRIGGER"><div class="titlepage"><div><div><h2 class="title" style="clear: both">43.7. Event Trigger Procedures in PL/Tcl</h2></div></div></div><a id="id-1.8.9.11.2" class="indexterm"></a><p>     Event trigger procedures can be written in PL/Tcl.
     <span class="productname">PostgreSQL</span> requires that a procedure that is
     to be called as an event trigger must be declared as a function with no
     arguments and a return type of <code class="literal">event_trigger</code>.
    </p><p>     The information from the trigger manager is passed to the procedure body
     in the following variables:

     </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="varname">$TG_event</code></span></dt><dd><p>         The name of the event the trigger is fired for.
        </p></dd><dt><span class="term"><code class="varname">$TG_tag</code></span></dt><dd><p>         The command tag for which the trigger is fired.
        </p></dd></dl></div><p>
    </p><p>     The return value of the trigger procedure is ignored.
    </p><p>     Here's a little example event trigger procedure that simply raises
     a <code class="literal">NOTICE</code> message each time a supported command is
     executed:

</p><pre class="programlisting">CREATE OR REPLACE FUNCTION tclsnitch() RETURNS event_trigger AS $$
  elog NOTICE "tclsnitch: $TG_event $TG_tag"
$$ LANGUAGE pltcl;

CREATE EVENT TRIGGER tcl_a_snitch ON ddl_command_start EXECUTE PROCEDURE tclsnitch();</pre><p>
    </p></div><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navfooter"><hr></hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pltcl-trigger.html" title="43.6. Trigger Procedures in PL/Tcl">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pltcl.html" title="Chapter 43. PL/Tcl - Tcl Procedural Language">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="pltcl-error-handling.html" title="43.8. Error Handling in PL/Tcl">Next</a></td></tr><tr><td width="40%" align="left" valign="top">43.6. Trigger Procedures in PL/Tcl </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 10.23 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 43.8. Error Handling in PL/Tcl</td></tr></table></div></body></html>

Youez - 2016 - github.com/yon3zu
LinuXploit