Thread: pg data type bool is the boolean ,but in the documents there is no description about " bool is equal to boolean”
pg data type bool is the boolean ,but in the documents there is no description about " bool is equal to boolean”
From
"yanliang lei"
Date:
postgres=# create table test_1(c1 bool,c2 int);
CREATE TABLE
postgres=# \d+ test_1;
Table "public.test_1"
Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description
--------+---------+-----------+----------+---------+---------+-------------+--------------+-------------
c1 | boolean | | | | plain | | |
c2 | integer | | | | plain | | |
Access method: heap
postgres=#
in the create table statement ,there is bool data type,
in the \d+ test_1, there is boolean data type,
PostgreSQL use format_type function to convert bool to boolean.
in other words, bool datatype is equal to boolean datatype,
but the documents(https://www.postgresql.org/docs/15/datatype-boolean.html ) there is no description about " bool dataype is equal to boolean datatype ”
Re: pg data type bool is the boolean ,but in the documents there is no description about " bool is equal to boolean”
From
Erik Wienhold
Date:
> On 04/06/2023 17:04 CEST yanliang lei <msdnchina@163.com> wrote: > > bool datatype is equal to boolean datatyp, but the documents > (https://www.postgresql.org/docs/15/datatype-boolean.html) there is no > description about " bool dataype is equal to boolean datatype ” The type aliases are listed in table 8.1: https://www.postgresql.org/docs/15/datatype.html#DATATYPE-TABLE -- Erik