Re: passing text value with single quote to stored procedure

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: passing text value with single quote to stored procedure
Дата
Msg-id AA0ED26E-D8C4-4F9D-88DD-C81384394AA3@gmail.com
обсуждение исходный текст
Ответ на passing text value with single quote to stored procedure  (Prabhjot Sheena <prabhjot.sheena@rivalwatch.com>)
Список pgsql-general
On Jul 13, 2013, at 24:05, Prabhjot Sheena <prabhjot.sheena@rivalwatch.com> wrote:

> when this value is passed to the function
>
> select load_stage_start_v1('QA_SUMMER'2013_(EU/US)');
>
> This gives an error. Is there a way to fix this issue.

Your issue has nothing to do with stored procedures. You need to escape the string properly for SQL.

select load_stage_start_v1('QA_SUMMER''2013_(EU/US)');


Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.



В списке pgsql-general по дате отправления:

Предыдущее
От: "shankar.kotamarthy@gmail.com"
Дата:
Сообщение: Re: pg_upgrade could not create catalog dump while upgrading from 9.0 to 9.2
Следующее
От: Dmitriy Igrishin
Дата:
Сообщение: Re: [HACKERS] Frontend/backend protocol improvements proposal (request).