pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pierre Padovani <pierre@desertmoon.com>
To: pgsql-sql@postgresql.org
Subject: Triggers and SQL functions
Date: Thu, 28 May 1998 20:36:36 -0400
Message-ID: <l03130302b193b2e73867@[24.128.86.181]> (raw)

Can or will postgresql support trigger calls to sql defined functions?

When attempting this I get....

create function effect_of_add_prod(bpchar) returns boolean
 as
 'update developer
  set developer_tot_prod = developer_tot_prod + 1
  where exists (select developer_id
  from developer
  where developer_id = $1);
  select true as ignore_this;'
 language 'sql';
CREATE

 create trigger add_product after insert
 on product for each row
 execute procedure effect_of_add_prod(product_developer);
ERROR:  CreateTrigger: function effect_of_add_prod () does not exist

Searching through documentation reveals only mention of calls to C
functions...is there no way to call SQL functions?

-=pierre





view thread (3+ messages)  latest in thread

Message-ID: <l03130302b193b2e73867@[24.128.86.181]>
Permalink:  ../l03130302b193b2e73867@%5B24.128.86.181%5D/
Also on:    postgresql.org/message-id/l03130302b193b2e73867@[24.128.86.181]

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: pierre@desertmoon.com
  Subject: Re: Triggers and SQL functions
  In-Reply-To: <l03130302b193b2e73867@[24.128.86.181]>
  References: <l03130302b193b2e73867@[24.128.86.181]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox