Re: [SQL] Functions for arrays !!!!

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [SQL] Functions for arrays !!!!
Дата
Msg-id 18888.926174958@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Functions for arrays !!!!  (Carlos Peralta Ramirez <cperalta@hera.inf.ucv.cl>)
Список pgsql-sql
Carlos Peralta Ramirez <cperalta@hera.inf.ucv.cl> writes:
> I create the function in PostgreSQL ->
> dbtest=>create function tester(_int4,int4) returns bool as
> '$path/tester.so' language 'c';
> CREATE

> But when try to use it, ->
> dbtest=>select tester('{1,2,3,4}',3);
> ERROR:  stat failed on file tester.so

> I don�t know what�s happens !!!!!

Looks like Postgres couldn't find the .so file to load it.
(The error message is sadly incomplete --- maybe I'll look to see
if it can be improved.)

When you wrote '$path/tester.so' above, were you being literal or
did you mean to indicate that you filled in an appropriate path?
All the examples you might see of that notation in Postgres are
in shell scripts where a variable like $path will get expanded;
if you typed it in by hand then you have to supply the complete
path by hand.  Look at the entry for the tester function in the
pg_proc table to see what pathname the system has recorded...

            regards, tom lane

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

Предыдущее
От: Carlos Peralta Ramirez
Дата:
Сообщение: Functions for arrays !!!!
Следующее
От: Henrik Steffen
Дата:
Сообщение: TRANSLATE()