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

From: "surabhi(dot)ahuja" <surabhi(dot)ahuja(at)iiitb(dot)ac(dot)in>
To: "Richard Huxton" <dev(at)archonet(dot)com>
Cc: "Tino Wildenhain" <tino(at)wildenhain(dot)de>, "Stephan Szabo" <sszabo(at)megazone(dot)bigpanda(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: a stored procedure ..with integer as the parameter
Date: 2005-10-27 09:53:49
Message-ID: 967CFC4343BF2A4DAFACD026D33DC85118EC85@jal.iiitb.ac.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

________________________________

From: Richard Huxton [mailto:dev(at)archonet(dot)com]
Sent: Wed 10/26/2005 12:40 PM
To: surabhi.ahuja
Cc: Tino Wildenhain; Stephan Szabo; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] a stored procedure ..with integer as the parameter

***********************
Your mail has been scanned by InterScan VirusWall.
***********-***********

surabhi.ahuja wrote:
> what do u suggest i do then in that case?
> i mean how should i make a query - i mean how do i make a command?

You should always provide well-defined escaping to all data coming from
a non-trusted source (i.e. outside your application) and preferably to
all data in any case.

If you are using "C" then libpq offers functions to escape strings.
Almost all other languages offer something similar.

In general, I never use "raw" functions to build my queries, I have
wrapper functions that ensure all queries are well-formed.

What language are you using, and what framework?

--
Richard Huxton
Archonet Ltd

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2005-10-27 10:25:18 Re: a stored procedure ..with integer as the parameter
Previous Message Alex Stapleton 2005-10-27 09:51:03 Re: Why database is corrupted after re-booting