Re: C Trigger issue

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Rod Taylor <rod(dot)taylor(at)inquent(dot)com>
Cc: Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: C Trigger issue
Date: 2001-02-13 19:07:05
Message-ID: Pine.BSF.4.21.0102131104230.90043-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


IIRC, trigger functions don't take parameters, they're
func() returns opaque. The arguments given in create trigger
are passed in a different way. That's why the error message
is saying dbuser_account() is missing.

On Tue, 13 Feb 2001, Rod Taylor wrote:

> Sorry, Postgres 7.1 beta4
> --
> Rod Taylor
>
> There are always four sides to every story: your side, their side, the
> truth, and what really happened.
> ----- Original Message -----
> From: "Rod Taylor" <rod(dot)taylor(at)inquent(dot)com>
> To: "Hackers List" <pgsql-hackers(at)postgresql(dot)org>
> Sent: Tuesday, February 13, 2001 10:35 AM
> Subject: [HACKERS] C Trigger issue
>
>
> > Create function, attempt to create trigger fails, yet function
> > obviously exists. I can't seem to typecast the trigger parameters.
> > \df even misses the function.
> >
> >
> >
> > temp=# CREATE FUNCTION dbuser_account(varchar(40), varchar(40),
> > varchar(40))
> >
> > temp-# RETURNS OPAQUE
> >
> > temp-# AS
> >
> '/usr/home/rbt/temp/postgresql-7.1beta4/contrib/user_account/user_acco
> > unt.so'
> >
> > temp-# language 'C';
> >
> > CREATE
> >
> > temp=#
> >
> > temp=# \df dbuser_account
> >
> > List of functions
> >
> > Result | Function | Arguments
> >
> > --------+----------+-----------
> >
> > (0 rows)
> >
> > temp=#
> >
> > temp=# select dbuser_account('test', 'test', 'test');
> >
> > ERROR: dbuser_account: not fired by trigger manager
> >
> > temp=#
> >
> > temp=#
> >
> > temp=# CREATE TRIGGER dbuser_account_trg
> >
> > temp-# AFTER INSERT
> >
> > temp-# OR DELETE
> >
> > temp-# OR UPDATE
> >
> > temp-# ON users
> >
> > temp-# FOR EACH row
> >
> > temp-# EXECUTE PROCEDURE dbuser_account('val1', 'val2', 'val3');
> >
> > ERROR: CreateTrigger: function dbuser_account() does not exist
> >
> > temp=#
> >
> > temp=# DROP FUNCTION dbuser_account(varchar(40), varchar(40),
> > varchar(40));
> >
> > DROP
> >
> > --
> > Rod Taylor
> >
> > There are always four sides to every story: your side, their side,
> the
> > truth, and what really happened.
> >
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Lamar Owen 2001-02-13 19:09:44 Re: locale support
Previous Message Peter Eisentraut 2001-02-13 18:23:14 Re: locale support