Re: Postgres plpgsql

Поиск
Список
Период
Сортировка
От John DeSoi
Тема Re: Postgres plpgsql
Дата
Msg-id 58AB3A92-A12C-11D9-A2E3-000A95B03262@pgedit.com
обсуждение исходный текст
Ответ на Re: Postgres plpgsql  (Shaun Clements <ShaunC@relyant.co.za>)
Список pgsql-general
On Mar 30, 2005, at 9:34 AM, Shaun Clements wrote:

> PERFORM distinct COLUMN1 FROM TABLE where COLUMN1 = ''''||
> quote_literal(VARIABLE1)'' ||'' AND COLUMN2 =
> ''''||quote_literal(VARIABLE2)||'''';

The first one you posted looked correct. This line above seems to have
problems. I think you want this:


PERFORM distinct COLUMN1 FROM TABLE where COLUMN1 = '''' ||
quote_literal(VARIABLE1) '''' || '' AND COLUMN2 = '' || '''' ||
quote_literal(VARIABLE2) || '''';


Generally PERFORM is used for side effects only. I don't see why you
would use PERFORM unless this line will change the database somehow.

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


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

Предыдущее
От: Carlos Roberto Chamorro Mostac
Дата:
Сообщение: Ayuda con procesamiento en Postgres !!!!
Следующее
От: Sean Davis
Дата:
Сообщение: Re: plperl doesn't release memory