Column information

From: Igor Korot <ikorot01(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Column information
Date: 2017-05-04 03:18:33
Message-ID: CA+FnnTy-cyQwPZ3q0GJWJr=YKrZaEAQiikHXW1qafjrEJv23+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi, ALL,
One more question if I may.

[code]
draft=# SELECT * FROM information_schema.columns WHERE table_name =
'leagues' AND ordinal_position = 8;
table_catalog | table_schema | table_name | column_name |
ordinal_position | column_default | is_nullable | data_type |
character_maximum_length | character_octet_length | numeric_precision
| numeric_precision_radix | numeric_scale | datetime_precision |
interval_type | interval_precision | character_set_catalog |
character_set_schema | character_set_name | collation_catalog |
collation_schema | collation_name | domain_catalog | domain_schema |
domain_name | udt_catalog | udt_schema | udt_name | scope_catalog |
scope_schema | scope_name | maximum_cardinality | dtd_identifier |
is_self_referencing | is_identity | identity_generation |
identity_start | identity_increment | identity_maximum |
identity_minimum | identity_cycle | is_generated |
generation_expression | is_updatable
---------------+--------------+------------+--------------+------------------+----------------+-------------+-----------+--------------------------+------------------------+-------------------+-------------------------+---------------+--------------------+---------------+--------------------+-----------------------+----------------------+--------------------+-------------------+------------------+----------------+----------------+---------------+-------------+-------------+------------+----------+---------------+--------------+------------+---------------------+----------------+---------------------+-------------+---------------------+----------------+--------------------+------------------+------------------+----------------+--------------+-----------------------+--------------
draft | public | leagues | benchplayers |
8 | | YES | integer |
| | 32 |
2 | 0 | | |
| | |
| | | |
| | | draft | pg_catalog | int4
| | | |
| 8 | NO | NO |
| | | |
| | NEVER | | YES
(1 row)

[/code]

In this query result field 'numeric_precision' is set to 32 and
'numeric_precision_radix' is set to 2.

According to the documentation 'numeric_precision_radix' field should
indicate what radix the value of 'numeric_precision' is stored.

However, even though the radix is 2, the actual value is 32, which is
not a radix 2.

Could someone please shed some light?

Thank you.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jacob Scott 2017-05-04 04:08:37 Re: Generalized pg_stat_statements?
Previous Message James Sewell 2017-05-04 02:28:07 Re: Generalized pg_stat_statements?