Passing character data to C function

Поиск
Список
Период
Сортировка
От Philip Compton
Тема Passing character data to C function
Дата
Msg-id 200210031343.29843.pcompton@mcs.vuw.ac.nz
обсуждение исходный текст
Ответы Re: Passing character data to C function  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-bugs
After days of researching this problem all I find is that knowbody has done=
=20
this successfully and documented it for me to find. I cannot determine if i=
t=20
is a bug or my incorrect development structure to blame.

I would like to pass character data from postgreSQL 7.1.3 user function int=
o a=20
C program.

This is my setup:

CREATE FUNCTION pc_fn(char(50), char(50), char(255)) RETURNS Boolean=20
AS '/u/students/pcompton/comp442/ass4/pc_fn.so' LANGUAGE 'C';=20

//C function prototype
int pc_fn(char* a1,char* a2,char* a3){...}
or
int pc_fn(char a1[50],char a2[50],char a3[255]){...}

fails to work. The function _is_ called and I can _log output_ as it execut=
es,=20
but no character data shows up in the arguments.

Thank you.
Phil Compton

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

Предыдущее
От: Nic Ferrier
Дата:
Сообщение: 7.3B2 initdb fails
Следующее
От: "Josh Berkus"
Дата:
Сообщение: Bug in Function-Transactions?