| От | Tom Lane |
|---|---|
| Тема | Re: cant write to file within call handler interface |
| Дата | |
| Msg-id | 17442.1103057411@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | cant write to file within call handler interface (Sibtay Abbas <sibtay_abbas@yahoo.com>) |
| Список | pgsql-hackers |
Sibtay Abbas <sibtay_abbas@yahoo.com> writes:
> i am not able to write to file until the pl call
> handler interface. this is the template which i am
> following
> PG_FUNCTION_INFO_V1(my_call_handler);
> Datum
> my_call_handler(PG_FUNCTION_ARGS)
> {
> ...my code...
> int fd = open("filename",O_WRONLY);
> write(fd,buffer,strlen(buffer) + 1);
Perhaps a little bit of checking for error returns would reveal the
problem. Other theories are (a) you forgot to close the file so no
write occurred; (b) the file was written but not where you think because
the filename is relative to the backend's working directory.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера