Re: BUG #3673: Untrusted perl language: ERROR: could not open relation 1663/16384/1259: No such file or directory

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: BUG #3673: Untrusted perl language: ERROR: could not open relation 1663/16384/1259: No such file or directory
Дата
Msg-id 470F7803.9040207@enterprisedb.com
обсуждение исходный текст
Ответ на BUG #3673: Untrusted perl language: ERROR: could not open relation 1663/16384/1259: No such file or directory  ("Timur Luchkin" <timur.luchkin@ctxm.com>)
Список pgsql-bugs
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

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

Предыдущее
От: "Timur Luchkin"
Дата:
Сообщение: BUG #3673: Untrusted perl language: ERROR: could not open relation 1663/16384/1259: No such file or directory
Следующее
От: Tom Lane
Дата:
Сообщение: Re: expression_tree_walker() and primitive node types