Re: Bug in CREATE FUNCTION with character type - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Bug in CREATE FUNCTION with character type
Date
Msg-id 15638.1271282841@sss.pgh.pa.us
Whole thread Raw
In response to Bug in CREATE FUNCTION with character type  (Pavel Golub <pavel@microolap.com>)
Responses Re: Bug in CREATE FUNCTION with character type  (Pavel Golub <pavel@microolap.com>)
List pgsql-bugs
Pavel Golub <pavel@microolap.com> writes:
> Example:

> CREATE OR REPLACE FUNCTION test_char_function()
>   RETURNS TABLE(id int, salesourcecode character) AS
> $BODY$
> VALUES (1, 'one'), (2, 'two'), (3, 'three');
> $BODY$
>   LANGUAGE 'sql'

> pqfmod function from libpq library for salesourcecode column returns
> 0, which is wrong. Who can ever imagine bpchar of length 0? :)

I get -1 (indicating unspecified), which is what I'd expect.  You
sure about the zero?

            regards, tom lane

pgsql-bugs by date:

Previous
From: John Regehr
Date:
Subject: Re: BUG #5416: int4inc() is wrong
Next
From: Tom Lane
Date:
Subject: Re: Bug in CREATE FUNCTION with character type (CONFIRMED BUG)