Skip to content

Commit 3315020

Browse files
committed
Fix and clarify information schema interval_precision fields
The fields were previously wrongly typed as character_data; change to cardinal_number. Update the documentation and the implementation to show more clearly that this applies to a feature not available in PostgreSQL, rather than just not yet being implemented in the information schema.
1 parent 7572630 commit 3315020

File tree

2 files changed

+34
-19
lines changed

2 files changed

+34
-19
lines changed

doc/src/sgml/information_schema.sgml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,13 @@
488488

489489
<row>
490490
<entry><literal>interval_precision</literal></entry>
491-
<entry><type>character_data</type></entry>
492-
<entry>Not yet implemented</entry>
491+
<entry><type>cardinal_number</type></entry>
492+
<entry>
493+
Applies to a feature not available
494+
in <productname>PostgreSQL</productname>
495+
(see <literal>datetime_precision</literal> for the fractional
496+
seconds precision of interval type attributes)
497+
</entry>
493498
</row>
494499

495500
<row>
@@ -1343,8 +1348,13 @@
13431348

13441349
<row>
13451350
<entry><literal>interval_precision</literal></entry>
1346-
<entry><type>character_data</type></entry>
1347-
<entry>Not yet implemented</entry>
1351+
<entry><type>cardinal_number</type></entry>
1352+
<entry>
1353+
Applies to a feature not available
1354+
in <productname>PostgreSQL</productname>
1355+
(see <literal>datetime_precision</literal> for the fractional
1356+
seconds precision of interval type columns)
1357+
</entry>
13481358
</row>
13491359

13501360
<row>
@@ -2139,8 +2149,13 @@
21392149

21402150
<row>
21412151
<entry><literal>interval_precision</literal></entry>
2142-
<entry><type>character_data</type></entry>
2143-
<entry>Not yet implemented</entry>
2152+
<entry><type>cardinal_number</type></entry>
2153+
<entry>
2154+
Applies to a feature not available
2155+
in <productname>PostgreSQL</productname>
2156+
(see <literal>datetime_precision</literal> for the fractional
2157+
seconds precision of interval type domains)
2158+
</entry>
21442159
</row>
21452160

21462161
<row>
@@ -2400,7 +2415,7 @@ ORDER BY c.ordinal_position;
24002415

24012416
<row>
24022417
<entry><literal>interval_precision</literal></entry>
2403-
<entry><type>character_data</type></entry>
2418+
<entry><type>cardinal_number</type></entry>
24042419
<entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</></entry>
24052420
</row>
24062421

@@ -3150,7 +3165,7 @@ ORDER BY c.ordinal_position;
31503165

31513166
<row>
31523167
<entry><literal>interval_precision</literal></entry>
3153-
<entry><type>character_data</type></entry>
3168+
<entry><type>cardinal_number</type></entry>
31543169
<entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</></entry>
31553170
</row>
31563171

@@ -4037,7 +4052,7 @@ ORDER BY c.ordinal_position;
40374052

40384053
<row>
40394054
<entry><literal>interval_precision</literal></entry>
4040-
<entry><type>character_data</type></entry>
4055+
<entry><type>cardinal_number</type></entry>
40414056
<entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</></entry>
40424057
</row>
40434058

@@ -4369,7 +4384,7 @@ ORDER BY c.ordinal_position;
43694384

43704385
<row>
43714386
<entry><literal>result_cast_interval_precision</literal></entry>
4372-
<entry><type>character_data</type></entry>
4387+
<entry><type>cardinal_number</type></entry>
43734388
<entry>Applies to a feature not available in <productname>PostgreSQL</></entry>
43744389
</row>
43754390

@@ -6008,7 +6023,7 @@ ORDER BY c.ordinal_position;
60086023

60096024
<row>
60106025
<entry><literal>interval_precision</literal></entry>
6011-
<entry><type>character_data</type></entry>
6026+
<entry><type>cardinal_number</type></entry>
60126027
<entry>Applies to a feature not available in <productname>PostgreSQL</></entry>
60136028
</row>
60146029

src/backend/catalog/information_schema.sql

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ CREATE VIEW attributes AS
322322
AS datetime_precision,
323323

324324
CAST(null AS character_data) AS interval_type, -- FIXME
325-
CAST(null AS character_data) AS interval_precision, -- FIXME
325+
CAST(null AS cardinal_number) AS interval_precision,
326326

327327
CAST(current_database() AS sql_identifier) AS attribute_udt_catalog,
328328
CAST(nt.nspname AS sql_identifier) AS attribute_udt_schema,
@@ -671,7 +671,7 @@ CREATE VIEW columns AS
671671
AS datetime_precision,
672672

673673
CAST(null AS character_data) AS interval_type, -- FIXME
674-
CAST(null AS character_data) AS interval_precision, -- FIXME
674+
CAST(null AS cardinal_number) AS interval_precision,
675675

676676
CAST(null AS sql_identifier) AS character_set_catalog,
677677
CAST(null AS sql_identifier) AS character_set_schema,
@@ -937,7 +937,7 @@ CREATE VIEW domains AS
937937
AS datetime_precision,
938938

939939
CAST(null AS character_data) AS interval_type, -- FIXME
940-
CAST(null AS character_data) AS interval_precision, -- FIXME
940+
CAST(null AS cardinal_number) AS interval_precision,
941941

942942
CAST(t.typdefault AS character_data) AS domain_default,
943943

@@ -1085,7 +1085,7 @@ CREATE VIEW parameters AS
10851085
CAST(null AS cardinal_number) AS numeric_scale,
10861086
CAST(null AS cardinal_number) AS datetime_precision,
10871087
CAST(null AS character_data) AS interval_type,
1088-
CAST(null AS character_data) AS interval_precision,
1088+
CAST(null AS cardinal_number) AS interval_precision,
10891089
CAST(current_database() AS sql_identifier) AS udt_catalog,
10901090
CAST(nt.nspname AS sql_identifier) AS udt_schema,
10911091
CAST(t.typname AS sql_identifier) AS udt_name,
@@ -1353,7 +1353,7 @@ CREATE VIEW routines AS
13531353
CAST(null AS cardinal_number) AS numeric_scale,
13541354
CAST(null AS cardinal_number) AS datetime_precision,
13551355
CAST(null AS character_data) AS interval_type,
1356-
CAST(null AS character_data) AS interval_precision,
1356+
CAST(null AS cardinal_number) AS interval_precision,
13571357
CAST(current_database() AS sql_identifier) AS type_udt_catalog,
13581358
CAST(nt.nspname AS sql_identifier) AS type_udt_schema,
13591359
CAST(t.typname AS sql_identifier) AS type_udt_name,
@@ -1407,7 +1407,7 @@ CREATE VIEW routines AS
14071407
CAST(null AS cardinal_number) AS result_cast_numeric_scale,
14081408
CAST(null AS cardinal_number) AS result_cast_datetime_precision,
14091409
CAST(null AS character_data) AS result_cast_interval_type,
1410-
CAST(null AS character_data) AS result_cast_interval_precision,
1410+
CAST(null AS cardinal_number) AS result_cast_interval_precision,
14111411
CAST(null AS sql_identifier) AS result_cast_type_udt_catalog,
14121412
CAST(null AS sql_identifier) AS result_cast_type_udt_schema,
14131413
CAST(null AS sql_identifier) AS result_cast_type_udt_name,
@@ -2212,7 +2212,7 @@ CREATE VIEW user_defined_types AS
22122212
CAST(null AS cardinal_number) AS numeric_scale,
22132213
CAST(null AS cardinal_number) AS datetime_precision,
22142214
CAST(null AS character_data) AS interval_type,
2215-
CAST(null AS character_data) AS interval_precision,
2215+
CAST(null AS cardinal_number) AS interval_precision,
22162216
CAST(null AS sql_identifier) AS source_dtd_identifier,
22172217
CAST(null AS sql_identifier) AS ref_dtd_identifier
22182218

@@ -2448,7 +2448,7 @@ CREATE VIEW element_types AS
24482448
CAST(null AS cardinal_number) AS numeric_scale,
24492449
CAST(null AS cardinal_number) AS datetime_precision,
24502450
CAST(null AS character_data) AS interval_type,
2451-
CAST(null AS character_data) AS interval_precision,
2451+
CAST(null AS cardinal_number) AS interval_precision,
24522452

24532453
CAST(null AS character_data) AS domain_default, -- XXX maybe a bug in the standard
24542454

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy