Timur Luchkin wrote:
> I have stored procedure in "plperlu" language. After the call to it Im
> getting "could not open relation ... No such file or directory" on any next
> operation in psql (the procedure itself works fine). If I'll close the
> console and reopen it again, then everything works fine again (until the
> next call to it).
>
> Perl's SP code:
> ...
> chdir("$base_path");
> ...
Don't do that. Postgres sets the current directory to the data
directory, and uses relative paths to access all the relation files.
Calling chdir will confuse the server.
You could use absolute paths in your plperlu function instead.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com