Help for this page

Select Code to Download


  1. or download this
    -- Create the extension
    CREATE EXTENSION plperlu;
    ...
                
        return undef; # We are done here
    $$ LANGUAGE plperlu;
    
  2. or download this
    ER_DEV_DB=# SELECT * FROM bottlesofbeer(3);
     poemrowid | verserowid |                     verseline               
    +      
    ...
     7 bottles of beer on the wall
    (8 rows)
    
  3. or download this
    -- Create a perl trigger function in database schema "pos"
    CREATE OR REPLACE FUNCTION pos.customersinserttrigger() RETURNS trigge
    +r AS $$
    ...
    CREATE TRIGGER insertupdate_customers_trigger
        BEFORE INSERT OR UPDATE ON pos.customers
        FOR EACH ROW EXECUTE FUNCTION pos.customersinserttrigger();