Re: pgpl-problem, what's wrong with my loop?

From: Kovacs Zoltan Sandor <tip(at)pc10(dot)radnoti-szeged(dot)sulinet(dot)hu>
To: Bruno Boettcher <bboett(at)erm1(dot)u-strasbg(dot)fr>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: pgpl-problem, what's wrong with my loop?
Date: 2000-11-20 17:06:52
Message-ID: Pine.LNX.4.05.10011201735490.6284-100000@pc10.radnoti-szeged.sulinet.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> FOR arow IN SELECT currency,amount FROM journal WHERE col=sumup LOOP
My opinion is the problem that you cannot give a column name as a
parameter. But I'm not sure. This never worked for me. The thing here
happens that you get all rows if and only if $1=$2 (as strings) and if
they are not equal, the WHERE clause will stand for constant false. This
second case may be the fact for you.

You should write different codes for the different col parameters in my
opinion. Or you might write a C function which can send arbitrary SQL
queries to the backend.

Regards, Zoltan

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Kovacs Zoltan Sandor 2000-11-20 17:40:53 Re: pgpl-problem, what's wrong with my loop?
Previous Message Tom Lane 2000-11-20 16:37:40 Re: pgpl-problem, what's wrong with my loop?