Re: C function question - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: C function question
Date
Msg-id 20090203205317.GC14767@alvh.no-ip.org
Whole thread Raw
In response to Re: C function question  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
Responses Re: C function question  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Grzegorz Jaśkiewicz wrote:
> >  char  c = PG_GETARG_CHAR(1);
>
> for whatever reason, taht doesn't return the real char that was passed in.

Yeah ... try DatumGetBpCharP instead.  PG_GETARG_CHAR is for type "char"
with quotes, which is a completely different thing.

--
Alvaro Herrera       Valdivia, Chile   ICBM: S 39º 49' 18.1", W 73º 13' 56.4"
"The problem with the facetime model is not just that it's demoralizing, but
that the people pretending to work interrupt the ones actually working."
                                                           (Paul Graham)

pgsql-general by date:

Previous
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: C function question
Next
From: Tom Lane
Date:
Subject: Re: C function question