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