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