Re: serious issues with TG_OP

From: "Dan Langille" <dan(at)langille(dot)org>
To: Michael Zouroudis <mzouroudis(at)idealcorp(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: serious issues with TG_OP
Date: 2002-08-23 21:05:07
Message-ID: 3D666B43.22102.7088AB99@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Mark Worsdall 2002-08-23 22:43:20 Re: libpq.so.1: cannot open shared object file
Previous Message Theodore A. Jencks 2002-08-23 19:21:59 PL/PgSQL Documentation.