From: Johann Robette <jrobette@onyme.com>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: RE : Record unassigned yet
Date: Fri, 1 Oct 2004 16:51:14 +0200
Message-ID: <006a01c4a7c6$1c6f0ea0$a5010a0a@Johann> (raw)
In-Reply-To: <9449.1096642025@sss.pgh.pa.us>
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@sss.pgh.pa.us]
Envoyé : vendredi 1 octobre 2004 16:47
À : Johann Robette
Cc : pgsql-hackers@postgresql.org
Objet : Re: [HACKERS] Record unassigned yet
"Johann Robette" <jrobette@onyme.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: jrobette@onyme.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
Subject: Re: Record unassigned yet
In-Reply-To: <006a01c4a7c6$1c6f0ea0$a5010a0a@Johann>
References: <9449.1096642025@sss.pgh.pa.us> <006a01c4a7c6$1c6f0ea0$a5010a0a@Johann>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox