Re: create trigger

From: Sandeep Joshi <sjoshi(at)Zambeel(dot)com>
To: "Robert B(dot) Easter" <reaster(at)comptechnews(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: create trigger
Date: 2000-12-15 00:08:20
Message-ID: 3A3960F4.256FCE83@zambeel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Robert,
Thanks. If you have any simple PL/pgSQL trigger that will also help.
Indirectly.

Sandeep

> Trigger functions, no matter what language, have be RETURNS OPAQUE.
>
> Here is an example (in the PostgreSQL docs):
> http://www.comptechnews.com/~reaster/postgres/triggers20290.htm
>
> Sorry I can't help more as I've never actually used C triggers, just PL/pgSQL
> ones.
>
> On Thursday 14 December 2000 18:04, Sandeep Joshi wrote:
> > I am trying to use "triggers". I get an error after "create trigger".
> > Does anybody know why?
> >
> > create function insert_into_db2 RETURNS int AS
> > '/work/posgresql/lib/libpq.so' language 'C';
> >
> > create trigger trial before insert or update on db1user for each row
> > execute procedure insert_into_db2();
> >
> > ERROR: CreateTrigger: function insert_into_db2() must return OPAQUE
> >
> > Does anybody know why?
> >
> > Also, if a function is enforced to return OPAQUE then what is the
> > "RETURNS" clause?
> >
> >
> > One more question,
> > If a trigger does not succeed then I want to ABORT transaction, is
> > it possible? how?
> >
> >
> > - Sandeep
>
> --
> -------- Robert B. Easter reaster(at)comptechnews(dot)com ---------
> - CompTechNews Message Board http://www.comptechnews.com/ -
> - CompTechServ Tech Services http://www.comptechserv.com/ -
> ---------- http://www.comptechnews.com/~reaster/ ------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sandeep Joshi 2000-12-15 00:27:45 Re: create trigger (can't compile example, problem with include files)
Previous Message Robert B. Easter 2000-12-14 23:54:39 Re: create trigger