Re: C function question

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
Cc: General Postgres Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: C function question
Date: 2009-02-03 20:53:17
Message-ID: 20090203205317.GC14767@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-02-03 21:03:41 Re: C function question
Previous Message Grzegorz Jaśkiewicz 2009-02-03 20:46:06 Re: C function question