| От | Joe Conway |
|---|---|
| Тема | Re: Escaping in C-language functions |
| Дата | |
| Msg-id | 3CA34145.5080203@joeconway.com обсуждение исходный текст |
| Ответ на | Escaping in C-language functions (Andreas Scherbaum <adsmail@htl.de>) |
| Список | pgsql-general |
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? > > > Best regards > 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. Hope this helps, Joe
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера