Re: a stored procedure ..with integer as the parameter - Mailing list pgsql-general

From Richard Huxton
Subject Re: a stored procedure ..with integer as the parameter
Date
Msg-id 4360AB0E.7040004@archonet.com
Whole thread Raw
In response to Re: a stored procedure ..with integer as the parameter  ("surabhi.ahuja" <surabhi.ahuja@iiitb.ac.in>)
List 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 by date:

Previous
From: Zlatko Matić
Date:
Subject: creating users in groups, in 8.1
Next
From: Uzo Madujibeya
Date:
Subject: Problem with SSL and postgreSQL 8.0.4