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

Поиск
Список
Период
Сортировка
От Kovacs Zoltan Sandor
Тема Re: pgpl-problem, what's wrong with my loop?
Дата
Msg-id Pine.LNX.4.05.10011201735490.6284-100000@pc10.radnoti-szeged.sulinet.hu
обсуждение исходный текст
Ответ на pgpl-problem, what's wrong with my loop?  (Bruno Boettcher <bboett@erm1.u-strasbg.fr>)
Ответы Re: pgpl-problem, what's wrong with my loop?  (Bruno Boettcher <bboett@erm1.u-strasbg.fr>)
Список 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




В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgpl-problem, what's wrong with my loop?
Следующее
От: Bruno Boettcher
Дата:
Сообщение: Re: pgpl-problem, what's wrong with my loop?