Thread: Trigger function languages

Trigger function languages

From
Bruce Momjian
Date:
From the CREATE TRIGGER, it seems to say that only C functions are
supported by triggers.  I see in the plpgsql manuals that it supports
triggers too.

What function languages do triggers support?  C, plpgsql, pltcl, SQL?

--  Bruce Momjian                        |  http://www.op.net/~candle pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: Trigger function languages

From
ts
Date:
>>>>> "B" == Bruce Momjian <pgman@candle.pha.pa.us> writes:

B> What function languages do triggers support?  C, plpgsql, pltcl, SQL?
You can add plruby.
Ruby is the interpreted scripting language for quick and easy
object-oriented programming. It has many features to process text files and
to do system management tasks (as in Perl). It is simple, straight-forward,
extensible, and portable.
http://www.ruby-lang.org/en/
plruby can be found at 
 http://www.ruby-lang.org/en/raa-list.rhtml?name=PL%2FRuby


Guy Decoux


Re: Trigger function languages

From
Hannu Krosing
Date:
ts wrote:
> 
> >>>>> "B" == Bruce Momjian <pgman@candle.pha.pa.us> writes:
> 
> B> What function languages do triggers support?  C, plpgsql, pltcl, SQL?
> 
>  You can add plruby.

How safe is plruby ?

Does it allow access to file system and other possibly unsafe resources ?

------------
Hannu


Re: Trigger function languages

From
ts
Date:
>>>>> "H" == Hannu Krosing <hannu@tm.ee> writes:

H> How safe is plruby ?
I'll say that ruby is more safe than perl.
Ruby define 4 security levels :

/* safe-level:  0 - strings from streams/environment/ARGV are tainted (default)  1 - no dangerous operation by tainted
string 2 - process/file operations prohibited  3 - all genetated strings are tainted  4 - no global (non-tainted)
variablemodification/no direct output
 
*/
You have a more complete description at :
 http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/2689

plruby, by default, is compiled with $SAFE >= 4

Guy Decoux



Re: Trigger function languages

From
Alex Perel
Date:
On Wed, 17 May 2000, Bruce Momjian wrote:

Any languages you can write stored procs in.

> >From the CREATE TRIGGER, it seems to say that only C functions are
> supported by triggers.  I see in the plpgsql manuals that it supports
> triggers too.
> 
> What function languages do triggers support?  C, plpgsql, pltcl, SQL?
> 
> 

--      Alex G. Perel  -=-  AP5081
veers@disturbed.net  -=-  veers@webhosting.com              play  -=-  work                       
Disturbed Networks - Powered exclusively by FreeBSD
== The Power to Serve -=- http://www.freebsd.org/