Skip site navigation (1) Skip section navigation (2)

Passing character data to C function

From: Philip Compton <pcompton(at)mcs(dot)vuw(dot)ac(dot)nz>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Passing character data to C function
Date: 2002-10-03 01:43:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
After days of researching this problem all I find is that knowbody has done 
this successfully and documented it for me to find. I cannot determine if it 
is a bug or my incorrect development structure to blame.

I would like to pass character data from postgreSQL 7.1.3 user function into a 
C program.

This is my setup:

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

//C function prototype
int pc_fn(char* a1,char* a2,char* a3){...}
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 executes, 
but no character data shows up in the arguments.

Thank you.
Phil Compton


pgsql-bugs by date

Next:From: Ruslan A DautkhanovDate: 2002-10-03 10:38:00
Subject: 7.2.1: Can't create prcedural language PLPERL
Previous:From: Nic FerrierDate: 2002-10-02 22:26:46
Subject: 7.3B2 initdb fails

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group