Re: psql , stored procedure, triggers and errors - Mailing list pgsql-general

From Tom Lane
Subject Re: psql , stored procedure, triggers and errors
Date
Msg-id 15187.991750374@sss.pgh.pa.us
Whole thread Raw
In response to psql , stored procedure, triggers and errors  (Penguin <Mail@dempos.com>)
List pgsql-general
Penguin <Mail@dempos.com> writes:
> I have added support of procedural language 'plpgsql' in
> postgres system table pg_language. Now when I try to insert a record
> in the emp table :

> insert into emp(empname, salary) values( 'test', 1000 );

> from psql I get the following error :

> psql:rec.sql:1:ERROR:frmgr_info:function 0:cache lookup failed

I copied-and-pasted your example, and it works fine for me on 7.0.*:

play=> insert into emp(empname, salary) values( 'test', 1000 );
INSERT 4576610 1
play=> insert into emp(empname, salary) values( 'test', -1);
ERROR:  test cannot have a negative salary

I suspect you messed up the installation of 'plpgsql' somehow.
Did you use the createlang script for that, or do it by hand?

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: return value of a version-1 C function (Solved)
Next
From: Tony Grant
Date:
Subject: XML question