Re: Attribute a value to a record

From: Florent THOMAS <mailinglist(at)tdeo(dot)fr>
To: postgesql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Attribute a value to a record
Date: 2010-02-03 00:15:50
Message-ID: 1265156150.19341.46.camel@Dell_Inspiron
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hy

I made an additionnal test
FOR ventilation_local IN (SELECT * FROM XXX) LOOP
IF (mytest) THEN
RAISE NOTICE 'ventilation %', ventilation_local;
ventilation_local.myfield:=10;
RAISE NOTICE 'ventilation %', ventilation_local;
END IF;
END LOOP;

the first notice and the second one are different.
Unfortunately, when I get out from the LOOP, the result doesn't seems to
be updated in the table

Best regards

Le mercredi 03 février 2010 à 00:28 +0100, Florent THOMAS a écrit :

> Hello,
>
> I'm currently running on pg8.4 and I have a trigger with a loop :
>
> FOR ventilation_local IN (SELECT * FROM XXX) LOOP
> IF (mytest) THEN
> ventilation_local.myfield:=mynewvalue;
> END IF;
> END LOOP;
>
> my problem is that the record doen't accept the new value.
> I've chek before the value that is not null.
> Is it a fonctionnality accepted in pg8.4 on record type?
>
> Best regards

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Reece Hart 2010-02-03 00:17:24 Re: pg_dump issues
Previous Message Clemens Schwaighofer 2010-02-02 23:55:42 Re: Problem with partition tables and schemas