Re: File access problem access(), stat()

Поиск
Список
Период
Сортировка
От vishal saberwal
Тема Re: File access problem access(), stat()
Дата
Msg-id 3e74dc250512121618t7b5e4dra881c26eb376c18c@mail.gmail.com
обсуждение исходный текст
Ответ на Re: File access problem access(), stat()  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: File access problem access(), stat()  (vishal saberwal <vishalsaberwal@gmail.com>)
Список pgsql-general
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,
vish

On 12/12/05, Tom Lane <tgl@sss.pgh.pa.us> wrote:
vishal saberwal <vishalsaberwal@gmail.com> 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 unexpectedly

This is not a file permissions problem ... more likely, your C function
is wrong and is dumping core.  Getting out your debugger would be a good
response.

>         char    *filecmd = (char*) PG_GETARG_VARCHAR_P(0);

However, I can point you in the right direction: you can't just cast a
varchar * to char *, they are not remotely the same thing.

                        regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Performance woes
Следующее
От: vishal saberwal
Дата:
Сообщение: Re: File access problem access(), stat()