Thread: varchar in c extension function

varchar in c extension function

From
Kjetil Haaland
Date:
Hello

Is there any way to take a varchar as an input to a c function? I want to take
a varchar and a cstring as inputs to a function and then use them as cstrings
in my c program.

Does anyone know how to do this?

-Kjetil

Re: varchar in c extension function

From
Terry Lee Tucker
Date:
If I understand your question correctly, all of this type of work is described
under "Server Programming", in "C Language Functions". I'm looking at the
documentation for release 7.3. Attached is a C function that is called by
several of my triggers which interfaces with a third party mileage program
API.

Hope this helps...

On Friday 05 November 2004 07:00 am, Kjetil Haaland saith:
> Hello
>
> Is there any way to take a varchar as an input to a c function? I want to
> take a varchar and a cstring as inputs to a function and then use them as
> cstrings in my c program.
>
> Does anyone know how to do this?
>
> -Kjetil
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

--
Quote: 52
"Honesty does not require posturing. In fact, the two things are incom-
 patible. Nor does objectivity require neutrality.... Objectivity refers
 to an honest seeking of the truth, whatever that truth may turn out to
 be and regardless of what its implications might be. Neutrality refers
 to a preconceived 'balance,' which subordinates the truth to this pre-
 conception.... The truth is where you find it -- and you don't find it
 with a preconceived 'balance' expressed in mealy mouth words."

 --Thomas Sowell

 Work: 1-336-372-6812
 Cell: 1-336-363-4719
email: terry@esc1.com

Attachment

Re: varchar in c extension function

From
Kjetil Haaland
Date:
On Friday 05 November 2004 13:13, Terry Lee Tucker wrote:
> If I understand your question correctly, all of this type of work is
> described under "Server Programming", in "C Language Functions". I'm
> looking at the documentation for release 7.3. Attached is a C function that
> is called by several of my triggers which interfaces with a third party
> mileage program API.
>
> Hope this helps...
>

Thanks a lot for the help! Now it works.

-Kjetil