quote_literal - Mailing list pgsql-general

From tbazadaykin
Subject quote_literal
Date
Msg-id 603201294994799@web17.yandex.ru
Whole thread Raw
Responses Re: quote_literal
List 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;

pgsql-general by date:

Previous
From: Håvard Wahl Kongsgård
Date:
Subject: Re: Performance on multiple OR conditions inside ()
Next
From: Pavel Stehule
Date:
Subject: Re: quote_literal