Re: Postgres plpgsql - Mailing list pgsql-general

From John DeSoi
Subject Re: Postgres plpgsql
Date
Msg-id 58AB3A92-A12C-11D9-A2E3-000A95B03262@pgedit.com
Whole thread Raw
In response to Re: Postgres plpgsql  (Shaun Clements <ShaunC@relyant.co.za>)
List 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 by date:

Previous
From: Carlos Roberto Chamorro Mostac
Date:
Subject: Ayuda con procesamiento en Postgres !!!!
Next
From: Sean Davis
Date:
Subject: Re: plperl doesn't release memory