Re: Cast INTEGER to BIT confusion

From: Erik Wienhold <ewie(at)ewie(dot)name>
To: rob stone <floriparob(at)tpg(dot)com(dot)au>, "[Quipsy] Markus Karg" <karg(at)quipsy(dot)de>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Cast INTEGER to BIT confusion
Date: 2023-08-17 13:14:16
Message-ID: 515898094.356558.1692278056903@office.mailbox.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On 17/08/2023 14:57 CEST rob stone <floriparob(at)tpg(dot)com(dot)au> wrote:
>
> It works thus:-
>
> postgres 15.4 =# CREATE TABLE T (c BIT);
> CREATE TABLE
> postgres 15.4 =# insert into T values (B'1');
> INSERT 0 1
> postgres 15.4 =# select * from t;
> c
> ---
> 1
> (1 row)
>
> See section 9.6 in the doco.

But Markus wrote that he cannot change the CREATE TABLE and INSERT statement.

--
Erik

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2023-08-17 13:18:14 Re: AW: AW: Cast INTEGER to BIT confusion
Previous Message rob stone 2023-08-17 12:57:15 Re: Cast INTEGER to BIT confusion