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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: vishal saberwal <vishalsaberwal(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: File access problem access(), stat()
Date: 2005-12-12 23:47:15
Message-ID: 2905.1134431235@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

vishal saberwal <vishalsaberwal(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Benjamin Smith 2005-12-12 23:57:20 Re: Performance woes
Previous Message vishal saberwal 2005-12-12 23:34:21 File access problem access(), stat()