| From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
|---|---|
| To: | tbazadaykin <tbazadaykin(at)yandex(dot)ru> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: quote_literal |
| Date: | 2011-01-14 08:48:47 |
| Message-ID: | AANLkTinAK4MVU2ijLC9TiDFEDapeR5iUiFsNgb+S+Xa4@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hello
this is correct SELECT col1 FROM table WHERE col2=var INTO res;
Regards
Pavel Stehule
2011/1/14 tbazadaykin <tbazadaykin(at)yandex(dot)ru>:
> CREATE OR REPLACE FUNCTION "scheme"."function" (var varchar) RETURNS varchar AS
> DECLARE
> res varchar;
> BEGIN
> /* Which is correct? This: */
>
> /*Or this:*/
> SELECT col1 FROM table WHERE col2=quote_literal(var) INTO res;
> RETURN res;
> END;
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Luis Fernando Lopez Aguilar | 2011-01-14 14:04:20 | Re: [pgsql-es-ayuda] Oferta de Entrenamientos en el marco del Cuarto PGDay Latinoamericano. |
| Previous Message | tbazadaykin | 2011-01-14 08:46:39 | quote_literal |