Re: Version 1 Calling convention

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

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*??

On 8/30/06, Martijn van Oosterhout <kleptog(at)svana(dot)org> wrote:
>
> On Wed, Aug 30, 2006 at 05:38:34AM -0400, Jasbinder Bali wrote:
> > PG_FUNCTION_INFO_V1 (test);
> >
> <snip>
>
> > char *raw_rawemail1 = PG_GETARG_CHAR_P(1); //line 6 (warning
> > thrown for this line)
>
> <snip>
>
> > Was trying to test the code given in the postgres manual.
> > The only diff being that i changed the data type from text* to char* and
> it
> > gives me a warning like:
> >
> > "initialization makes pointer from integer without a cast" at line 6 as
> > commented above.
> >
> > Can any1 point why?
>
> Sure, there's no such function PG_GETARG_CHAR_P(). You should set your
> compiler to warn about stuff like this.
>
> 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.
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>
> iD8DBQFE9WGjIB7bNG8LQkwRAkp8AKCRGJemB/SCqk9R6Spd1Jf6k0rodwCePN4J
> HuRH44T7Nx8MDIyLEMFoVvQ=
> =8jHd
> -----END PGP SIGNATURE-----
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-08-30 10:09:55 Re: Version 1 Calling convention
Previous Message Martijn van Oosterhout 2006-08-30 10:00:03 Re: Version 1 Calling convention

Browse pgsql-novice by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-08-30 10:09:55 Re: Version 1 Calling convention
Previous Message Martijn van Oosterhout 2006-08-30 10:00:03 Re: Version 1 Calling convention