RE : Record unassigned yet

From: "Johann Robette" <jrobette(at)onyme(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: RE : Record unassigned yet
Date: 2004-10-01 14:51:14
Message-ID: 006a01c4a7c6$1c6f0ea0$a5010a0a@Johann
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

Thanks for your answer.
In fact, I had a syntax error in my function.
Sorry about that!

-----Message d'origine-----
De : Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Envoyé : vendredi 1 octobre 2004 16:47
À : Johann Robette
Cc : pgsql-hackers(at)postgresql(dot)org
Objet : Re: [HACKERS] Record unassigned yet

"Johann Robette" <jrobette(at)onyme(dot)com> writes:
> I've created a function with a FOR loop.

> DECLARE
> Current RECORD;
> BEGIN
> FOR current IN SELECT * FROM employees LOOP
> Tmp := current.id;
> END LOOP;
> ...

> When I call the function, I get the error :
> ERROR: record " current " is unassigned yet

> Any idea?

What you showed us looks fine, therefore the problem is in something you
didn't show us.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Browne 2004-10-01 14:51:59 Re: AIX and V8 beta 3
Previous Message Tom Lane 2004-10-01 14:47:05 Re: Record unassigned yet

Browse pgsql-jdbc by date

  From Date Subject
Next Message tgutierrez 2004-10-04 22:48:31 error - driver -- postgresql 7.4.2 --Suse 9.0
Previous Message Tom Lane 2004-10-01 14:47:05 Re: Record unassigned yet