Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> Grzegorz Jakiewicz wrote:
>> 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.
Or maybe the C code does just what he wants, and the problem is that he
needs to declare the function correctly at the SQL level (ie, with
second argument "char" not char(1)).
regards, tom lane