Re: serious issues with TG_OP - Mailing list pgsql-admin

From Dan Langille
Subject Re: serious issues with TG_OP
Date
Msg-id 3D666B43.22102.7088AB99@localhost
Whole thread Raw
In response to serious issues with TG_OP  (Michael Zouroudis <mzouroudis@idealcorp.com>)
List pgsql-admin
On 23 Aug 2002 at 0:41, Michael Zouroudis wrote:

> CREATE FUNCTION pearl() RETURNS OPAQUE AS '
>
> DECLARE
>
>   t test%ROWTYPE;
>   o one%ROWTYPE;
>   x    text;
>   y    text;
>   z    text;
>   a    text;
>   xx   text;
>   yy   text;
>   zz   text;
>   aa   text;
>
> BEGIN
>
>
>   x  := new.fake;
>   y  := new.below;
>   z  := new.above;
>   a  := new.behind;

Your problem is in the above lines.  My bet: NEW will not exist upon
deletes.

> psql:script:9: NOTICE:  INSERT xx is equal to  ddd
> INSERT 215042 1
> psql:script:13: NOTICE:  UPDATE xx is equal to  hello
> UPDATE 1
> psql:script:17: NOTICE:  Error occurred while executing PL/pgSQL function pearl
> psql:script:17: NOTICE:  line 21 at assignment
> psql:script:17: ERROR:  record new is unassigned yet
> -------------------------------------------------------------------------------
>
> the function is printing out a value for x (hello), but not deleting it.
> i am lost on how to correctly assign a value for the delete.

Do you know now?
--
Dan Langille
I'm looking for a computer job:
http://www.freebsddiary.org/dan_langille.php


pgsql-admin by date:

Previous
From: Michael Zouroudis
Date:
Subject: serious issues with TG_OP
Next
From: Bhuvan A
Date:
Subject: Re: Preserving datatypes in dblink.