| From: | Andreas Scherbaum <adsmail(at)htl(dot)de> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Escaping in C-language functions |
| Date: | 2002-03-28 16:17:28 |
| Message-ID: | 3CA34218.E0FF08E5@htl.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Joe Conway wrote:
>
> Andreas Scherbaum wrote:
> > Hello,
> >
> > i have a C-language function and need to escape some strings returned
> > from SPI_getvalue to insert into another query string.
> > Is there a proper way to do the escaping or should i use
> > my own functions for that?
> > Or i'm totally wrong and there's a better way to get the values
> > from a row and insert it into another table?
> If you are using 7.2, see section 1.3.2. (Escaping strings for inclusion
> in SQL queries) at:
> http://www.us.postgresql.org/users-lounge/docs/7.2/postgres/libpq-exec.html
>
> If you are using < 7.2, you'll have to create your own function. See
> fe-exec.c in current sources for the 7.2 function.
I'm inside a C-language function (on the server side), not inside a
application written in C.
Best regards
--
Andreas 'ads' Scherbaum
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephan Szabo | 2002-03-28 16:23:21 | Re: pg_dump fails |
| Previous Message | Joe Conway | 2002-03-28 16:13:57 | Re: Escaping in C-language functions |