Maybe a plpgsql bug?

From: Lehel Gyuro <lehel(at)bin(dot)hu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Maybe a plpgsql bug?
Date: 2001-04-10 07:31:32
Message-ID: 47179976.20010410093132@bin.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I've tried to write a plpgsql function, and noticed the following
problem : (7.1RC2 rpm from postgresql.org)

When issuing a comand like:
DECLARE
rowvar tablaname%ROWTYPE
BEGIN
FOR rowvar IN SELECT FROM tablename t WHERE t.xxx=yyy AND t.zzz=qqq
LOOP
.....
END LOOP;

or just simply issuing a query like

DECLARE
rownum int4:=0;
BEGIN
SELECT count (*)::int4 INTO rownum FROM tablename t WHERE t.xxx=yyy
AND t.zzz=qqq;

only the t.zzz=qqq is realized in the returned rows, the t.xxx=yyy is
skipped, but when executing the query with execute everything is fine.
Is this an undocumented bug? I've noticed that the same query
structure is avoided in the documentation, you use simple queryes with
only one filtering condition... :(

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaruwan Laongmal 2001-04-10 08:14:32 problem with copy command
Previous Message Doug McNaught 2001-04-10 06:14:23 Re: [HACKERS] JDBC and Perl compiling problems w/ postgresql-7.1rc4