Re: Calling stored procedures.

From: Jochem van Dieten <jochemd(at)oli(dot)tudelft(dot)nl>
To: John Trambakoulos <jtram98(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Calling stored procedures.
Date: 2001-08-20 16:32:44
Message-ID: 3B813BAC.70405@oli.tudelft.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

John Trambakoulos wrote:

>
> Error Number: -2147467259
> Error Description: Error while executing the query;
> ERROR: fmgr_info: function 19264: cache lookup failed
>
> I did some research and found that this error message occurs when a stored
> procedure refers to another function that has been dropped from the database
> and that to avoid this error you must drop all objects referring to this
> stored procedure and recreate them. The problem is that I get this error
> message for NEWLY created procedures? Any ideas about this? I don't know
> what this OID 19264 is referring to.

I believe this is because you have an undeclared variable ret. Try to
declare it like below.

create function validate_user(varchar, varchar)
RETURNS integer AS '
DECLARE ret INTEGER;
BEGIN
SELECT count(*) INTO ret
FROM users
WHERE userid = $1 and passwd = $2;
RETURN ret;
END;
'
LANGUAGE 'plpgsql';

Jochem

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mitch Vincent 2001-08-20 16:34:15 Re: Querry optimisation in Postgres SQL
Previous Message Mitch Vincent 2001-08-20 16:06:16 Re: COUNT(*) very slow on table with primary key