Re: [GENERAL] File access problem access(), stat()

2005-12-12 Thread vishal saberwal
hi, It was a stupid error on my part. I was declaring the function to return varchar when i was actually returning integer. Also, i looked at varchar.c which was a great help. It had a function that shows how to convert varchar to cstring. Thanks tom, vishOn 12/12/05, vishal saberwal <[EMAIL PRO

Re: [GENERAL] File access problem access(), stat()

2005-12-12 Thread vishal saberwal
i am sorry for misleading subject line ... thanks for your tip. Perhaps fmgr has more in it that i need to understand and study so as to convert text/varchar to char* . thanks, vishOn 12/12/05, Tom Lane <[EMAIL PROTECTED]> wrote: vishal saberwal <[EMAIL PROTECTED]> writes:> xy_db=# create or r

Re: [GENERAL] File access problem access(), stat()

2005-12-12 Thread Tom Lane
vishal saberwal <[EMAIL PROTECTED]> writes: > xy_db=# create or replace function file_check(varchar) returns varchar as > xy_db-# '/root/resource_test.so','file_check' language 'c'; > CREATE FUNCTION > k2_db=# select file_check('/ResourceFS/IconFS/Alarm/My.gif'); > server closed the connection unex

[GENERAL] File access problem access(), stat()

2005-12-12 Thread vishal saberwal
hi all, I have read through the fmgr's readme but havent been able to solve my problem with accessing the file. I gave the permissions: [EMAIL PROTECTED] /]# chmod 777-r /ResourceFS"  and have made sure the file i am trying to access does exist. I am not sure where i am going wrong. /* gcc -Wall