Skip site navigation (1) Skip section navigation (2)

Re: Bug in CREATE FUNCTION with character type

From: Pavel Golub <pavel(at)microolap(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug in CREATE FUNCTION with character type
Date: 2010-04-15 07:43:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Hello, Tom.

You wrote:

TL> Pavel Golub <pavel(at)microolap(dot)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? :)

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

TL>                         regards, tom lane

My fault. Yes, of course, it's -1

With best wishes,
 Pavel                          mailto:pavel(at)gf(dot)microolap(dot)com

In response to

pgsql-bugs by date

Next:From: Scott MeadDate: 2010-04-15 12:51:25
Subject: Re: BUG #5423: problems installing postgresql-8.4 deleted folder / .s.PGSQL.lock not initiate the connecti
Previous:From: Martin von GagernDate: 2010-04-15 06:38:05
Subject: Re: build error: strlcat/strlcpy used from heimdal

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group