Re: [GENERAL] PL/PGSQL

From: Jens Felber <jfe(at)gek-online(dot)de>
To: Yury Don <yura(at)vpcit(dot)ru>, pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] PL/PGSQL
Date: 1999-08-23 11:13:34
Message-ID: 3.0.6.32.19990823131334.0091fc10@62.156.187.1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 16:15 23.08.99 +0600, you wrote:
>Hi Jens.
>
>First of all "select ... into ..." creates a new table and you can't use
>existing table after "into".
>And second - syntax errors in your function.
>So, you must do something like:
>
>create function insert_history () returns opaque as '
>declare
> rec record;
>begin
> for select x into rec from test1 where free=\'t\' loop
> insert into history (field1, field2, ... )
> values (rec.field1, rec.field2, ...);
> end loop;
>end;
>' language 'plpgsql';

Hi Yury, Hi Herouth

thanks for your answers but the error-message exist further:

ERROR: fmgr_info: function xxxxx : cache lookup failure
(xxxx is the function oid)

At the Postgres Error-Log-File ist nothing more to be seen then that.
I believe, the problem exists outside of the implementation of creating
functions
and triggers.
But I dont know, how I can kill the error - mistake, failure configuration?
(however)

by Jens

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Wim Kerkhoff 1999-08-23 11:45:37 psql dumping
Previous Message Yury Don 1999-08-23 10:15:59 Re: [GENERAL] PL/PGSQL