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
---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
You were right, it was because of the return void But I think in the documentation, I read somewhere that this kind of return was allowed ... I must have mistaken ...
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?
If you would like to report an abuse of our service, such as a spam message, please . Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .