Re: Quote_literal()
| От | Tom Lane |
|---|---|
| Тема | Re: Quote_literal() |
| Дата | |
| Msg-id | 1728.1133389678@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Quote_literal() ("James M Doherty" <jim@jdoherty.net>) |
| Ответы |
Re: Quote_literal()
|
| Список | pgsql-sql |
"James M Doherty" <jim@jdoherty.net> writes:
> declare
> SQL text;
> NSQL text;
> SQL := ''10/3/2009'';
> NSQL := quote_literal(SQL);
> The result is '10/3/2009 with no closing quote.
Works for me:
regression=# create function foo() returns text as '
regression'# declare SQL text;
regression'# NSQL text;
regression'# begin
regression'# SQL := ''10/3/2009'';
regression'# NSQL := quote_literal(SQL);
regression'# return NSQL;
regression'# end' language plpgsql;
CREATE FUNCTION
regression=# select foo(); foo
-------------'10/3/2009'
(1 row)
Again, I suggest giving a *complete* example, because you are obviously
not looking in the right place for your problem.
regards, tom lane
В списке pgsql-sql по дате отправления: