Re: Version 1 Calling convention

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Jasbinder Bali <jsbali(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org
Subject: Re: Version 1 Calling convention
Date: 2006-08-30 10:09:55
Message-ID: 20060830100955.GK13929@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pantelis Natsiavas 2006-08-30 10:29:35 Encoding problem
Previous Message Jasbinder Bali 2006-08-30 10:05:18 Re: Version 1 Calling convention

Browse pgsql-novice by date

  From Date Subject
Next Message roy simkes 2006-08-31 13:05:10 moving content of a table to another table
Previous Message Jasbinder Bali 2006-08-30 10:05:18 Re: Version 1 Calling convention