Re: BUG #13601: bit as quoted column in output

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Vicky Soni - Quipment India <vicky(dot)soni(at)quipment(dot)nl>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13601: bit as quoted column in output
Date: 2015-09-23 07:16:09
Message-ID: CAEepm=1KrsRDhJOmnwKPkOmEf6ufjHQ3XE5dvKHe6PiZeQ7R_w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Sep 23, 2015 at 6:35 PM, Vicky Soni - Quipment India
<vicky(dot)soni(at)quipment(dot)nl> wrote:
> Hi Thomas,
>
> In this case, we are not able to retrieve correct datatype of returning function when calling from Application. In our case it is DOTNET and we use NPGSQL.
>
> Is this a bug? Can we expect fix for this or should we live with same?

I don't know anything about npgsql or C# sorry, but I assume that it
has the same information available to it. I did notice from a very
quick look at that project's source[1] (if I am looking at the right
thing, which is not a given) that they treat bit(1) specially: they
use a C# bool for bit(1), but they use a BitArray class for any other
size of bit array. At a guess, that might include values in a column
that contains bit strings of size 1 that was described as having type
bit with typmod -1, which means you'd get BitArray of size one
sometimes and bool other times, depending on whether Postgres happens
to provide typmod info. Could that explain what you are seeing?

Otherwise, I would try raising an issue with a minimal reproduction
and description of the expected and actual behaviour over at the
npgsql project and see what they say.

[1] https://github.com/npgsql/npgsql/blob/develop/src/Npgsql/TypeHandlers/BitStringHandler.cs

--
Thomas Munro
http://www.enterprisedb.com

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andreas Hauser 2015-09-23 08:04:35 Re: BUG #13633: ERROR: invalid memory alloc request size
Previous Message Haribabu Kommi 2015-09-23 06:43:18 Re: Memory leak with PL/Python trigger