From: proghome@silesky.com
To: pgsql-sql@postgresql.org
Subject: Error message with a SQL function
Date: 8 Aug 2003 07:13:28 -0700
Message-ID: <85898f7e.0308080613.6cfb3e7c@posting.google.com> (raw)
Hi
I try to create the following SQL function:
CREATE FUNCTION update_affiliate(int,double precision,double
precision) RETURNS void AS ' UPDATE affiliate SET balance=balance +
$2, balance_in_points=balance_in_points + ( $2 / $3 ) WHERE id = $1; '
LANGUAGE 'sql';
but when I submit this query directly with PostgreSQL, I have the
following error message:
PostgreSQL said: ERROR: Unable to locate type oid 325664 in catalog
I think the problem comes from the first parameter ($1) but I don't
understand because affiliate.id is indeed the primary key of the table
affiliate.
Has anybody an idea ?
Thanks
Krystoffff
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: proghome@silesky.com
Subject: Re: Error message with a SQL function
In-Reply-To: <85898f7e.0308080613.6cfb3e7c@posting.google.com>
* 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