quote_literal

From: tbazadaykin <tbazadaykin(at)yandex(dot)ru>
To: pgsql-general(at)postgresql(dot)org
Subject: quote_literal
Date: 2011-01-14 08:46:39
Message-ID: 603201294994799@web17.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

CREATE OR REPLACE FUNCTION "scheme"."function" (var varchar) RETURNS varchar AS
DECLARE
res varchar;
BEGIN
/* Which is correct? This: */
SELECT col1 FROM table WHERE col2=var INTO res;
/*Or this:*/
SELECT col1 FROM table WHERE col2=quote_literal(var) INTO res;
RETURN res;
END;

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2011-01-14 08:48:47 Re: quote_literal
Previous Message Håvard Wahl Kongsgård 2011-01-14 08:00:39 Re: Performance on multiple OR conditions inside ()