return varchar from C function - Mailing list pgsql-hackers

From scotty@linuxtime.it
Subject return varchar from C function
Date
Msg-id 1171821368468.scotty@linuxtime.it
Whole thread Raw
Responses Re: return varchar from C function  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
Hi, 
just for fun, I wrote a little postgresql contrib,
who has a C function called myfun inside it.
The function myfun returns a value , now I return
a cstring type value, and it works fine if 
I run from psql shell:

select value from myfun(paramteres);

but I can't do an insert like:

insert (charfield) select value from myfun(paramteres); 

becuse I have an error, exactly casting error.

I want that myfun returns a char,varchar, or text type.

Where I can find more documentation about differences between
cstring,char,text etc...? 

Regards,
Enrico
 


pgsql-hackers by date:

Previous
From: "Guillaume Smet"
Date:
Subject: Re: [PATCHES] WIP patch - INSERT-able log statements
Next
From: Gregory Stark
Date:
Subject: Short varlena header bit-packing options