Re: a stored procedure ..with integer as the parameter

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: a stored procedure ..with integer as the parameter
Дата
Msg-id 4360AB0E.7040004@archonet.com
обсуждение исходный текст
Ответ на Re: a stored procedure ..with integer as the parameter  ("surabhi.ahuja" <surabhi.ahuja@iiitb.ac.in>)
Список pgsql-general
surabhi.ahuja wrote:
> My appliaction is in C++
>
> and i am getting char* ..s which i need to insert into the
> table...and for insert i am calling a stored procedure.
>
> But i need to form the call to the stored procedure with the above
> char*s as the argument.

Fine - just make sure you validate your data and format it properly.

If you are expecting an integer and a text field then check that the
first is a valid integer and escape any single quotes in the text-field.
Then you can build your query as you are at the moment.

I'm afraid I don't know much about the libpqxx C++ library, but it must
have facilities to escape quotes etc.

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: Zlatko Matić
Дата:
Сообщение: creating users in groups, in 8.1
Следующее
От: Uzo Madujibeya
Дата:
Сообщение: Problem with SSL and postgreSQL 8.0.4