pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Philippe Lefèvre <ph.l@libertysurf.fr>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: Function xxxx() does no exist
Date: Thu, 13 Apr 2000 18:39:10 -0400
Message-ID: <12552.955665550@sss.pgh.pa.us> (raw)
In-Reply-To: <38F62DAE.3B8BBBE0@libertysurf.fr>
References: <38F62DAE.3B8BBBE0@libertysurf.fr>

Philippe =?iso-8859-1?Q?Lef=E8vre?= <ph.l@libertysurf.fr> writes:
> So I created:
>   CREATE FUNCTION chk_itheme_proc(int4) RETURNS int4
>     AS 'SELECT COUNT(i_theme) FROM tbl_theme
>     WHERE i_theme = $1;'
>     LANGUAGE 'sql';

> and I created a trigger:
>  CREATE TRIGGER chk_itheme_trig BEFORE INSERT OR UPDATE ON tbl_article
>     FOR EACH ROW EXECUTE PROCEDURE chk_itheme_proc ('theme');

> but I get the message:
>      ERROR:  CreateTrigger: function chk_itheme_proc() does not exist

Poorly worded error message, I'd say.  You have a function
chk_itheme_proc(int4), but the trigger as you show it requires a
function with a signature of chk_itheme_proc(text) or something close
to it.  Those are different functions.

The error message ought to print out the expected parameter types to
remind you about that...

			regards, tom lane



view thread (3+ messages)  latest in thread

Message-ID: <12552.955665550@sss.pgh.pa.us>
Permalink:  ../12552.955665550@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12552.955665550@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, ph.l@libertysurf.fr
  Subject: Re: Function xxxx() does no exist
  In-Reply-To: <12552.955665550@sss.pgh.pa.us>
  References: <38F62DAE.3B8BBBE0@libertysurf.fr> <12552.955665550@sss.pgh.pa.us>

* 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