Re: Version 1 Calling convention - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Version 1 Calling convention
Date
Msg-id 20060830100955.GK13929@svana.org
Whole thread Raw
In response to Re: Version 1 Calling convention  ("Jasbinder Bali" <jsbali@gmail.com>)
List pgsql-general
On Wed, Aug 30, 2006 at 06:05:18AM -0400, Jasbinder Bali wrote:
> Does that mean if I am passing a char value to the version 1 function from a
> function in the database then in the version 1 function it needs to be
> treated as text*??

It depends on what type you're passing:

char    -> PG_GETARG_CHAR     => char
cstring -> PG_GETARG_CSTRING  => char*
text    -> PG_GETARG_TEXT_P   => text*

What type is it in SQL terms? That tells you what type you use at the C
level.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: "Jasbinder Bali"
Date:
Subject: Re: Version 1 Calling convention
Next
From: Pantelis Natsiavas
Date:
Subject: Encoding problem