Commit 3315020a authored by Peter Eisentraut's avatar Peter Eisentraut

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.
parent 75726307
...@@ -488,8 +488,13 @@ ...@@ -488,8 +488,13 @@
<row> <row>
<entry><literal>interval_precision</literal></entry> <entry><literal>interval_precision</literal></entry>
<entry><type>character_data</type></entry> <entry><type>cardinal_number</type></entry>
<entry>Not yet implemented</entry> <entry>
Applies to a feature not available
in <productname>PostgreSQL</productname>
(see <literal>datetime_precision</literal> for the fractional
seconds precision of interval type attributes)
</entry>
</row> </row>
<row> <row>
...@@ -1343,8 +1348,13 @@ ...@@ -1343,8 +1348,13 @@
<row> <row>
<entry><literal>interval_precision</literal></entry> <entry><literal>interval_precision</literal></entry>
<entry><type>character_data</type></entry> <entry><type>cardinal_number</type></entry>
<entry>Not yet implemented</entry> <entry>
Applies to a feature not available
in <productname>PostgreSQL</productname>
(see <literal>datetime_precision</literal> for the fractional
seconds precision of interval type columns)
</entry>
</row> </row>
<row> <row>
...@@ -2139,8 +2149,13 @@ ...@@ -2139,8 +2149,13 @@
<row> <row>
<entry><literal>interval_precision</literal></entry> <entry><literal>interval_precision</literal></entry>
<entry><type>character_data</type></entry> <entry><type>cardinal_number</type></entry>
<entry>Not yet implemented</entry> <entry>
Applies to a feature not available
in <productname>PostgreSQL</productname>
(see <literal>datetime_precision</literal> for the fractional
seconds precision of interval type domains)
</entry>
</row> </row>
<row> <row>
...@@ -2400,7 +2415,7 @@ ORDER BY c.ordinal_position; ...@@ -2400,7 +2415,7 @@ ORDER BY c.ordinal_position;
<row> <row>
<entry><literal>interval_precision</literal></entry> <entry><literal>interval_precision</literal></entry>
<entry><type>character_data</type></entry> <entry><type>cardinal_number</type></entry>
<entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</></entry> <entry>Always null, since this information is not applied to array element data types in <productname>PostgreSQL</></entry>
</row> </row>
...@@ -3150,7 +3165,7 @@ ORDER BY c.ordinal_position; ...@@ -3150,7 +3165,7 @@ ORDER BY c.ordinal_position;
<row> <row>
<entry><literal>interval_precision</literal></entry> <entry><literal>interval_precision</literal></entry>
<entry><type>character_data</type></entry> <entry><type>cardinal_number</type></entry>
<entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</></entry> <entry>Always null, since this information is not applied to parameter data types in <productname>PostgreSQL</></entry>
</row> </row>
...@@ -4037,7 +4052,7 @@ ORDER BY c.ordinal_position; ...@@ -4037,7 +4052,7 @@ ORDER BY c.ordinal_position;
<row> <row>
<entry><literal>interval_precision</literal></entry> <entry><literal>interval_precision</literal></entry>
<entry><type>character_data</type></entry> <entry><type>cardinal_number</type></entry>
<entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</></entry> <entry>Always null, since this information is not applied to return data types in <productname>PostgreSQL</></entry>
</row> </row>
...@@ -4369,7 +4384,7 @@ ORDER BY c.ordinal_position; ...@@ -4369,7 +4384,7 @@ ORDER BY c.ordinal_position;
<row> <row>
<entry><literal>result_cast_interval_precision</literal></entry> <entry><literal>result_cast_interval_precision</literal></entry>
<entry><type>character_data</type></entry> <entry><type>cardinal_number</type></entry>
<entry>Applies to a feature not available in <productname>PostgreSQL</></entry> <entry>Applies to a feature not available in <productname>PostgreSQL</></entry>
</row> </row>
...@@ -6008,7 +6023,7 @@ ORDER BY c.ordinal_position; ...@@ -6008,7 +6023,7 @@ ORDER BY c.ordinal_position;
<row> <row>
<entry><literal>interval_precision</literal></entry> <entry><literal>interval_precision</literal></entry>
<entry><type>character_data</type></entry> <entry><type>cardinal_number</type></entry>
<entry>Applies to a feature not available in <productname>PostgreSQL</></entry> <entry>Applies to a feature not available in <productname>PostgreSQL</></entry>
</row> </row>
......
...@@ -322,7 +322,7 @@ CREATE VIEW attributes AS ...@@ -322,7 +322,7 @@ CREATE VIEW attributes AS
AS datetime_precision, AS datetime_precision,
CAST(null AS character_data) AS interval_type, -- FIXME CAST(null AS character_data) AS interval_type, -- FIXME
CAST(null AS character_data) AS interval_precision, -- FIXME CAST(null AS cardinal_number) AS interval_precision,
CAST(current_database() AS sql_identifier) AS attribute_udt_catalog, CAST(current_database() AS sql_identifier) AS attribute_udt_catalog,
CAST(nt.nspname AS sql_identifier) AS attribute_udt_schema, CAST(nt.nspname AS sql_identifier) AS attribute_udt_schema,
...@@ -671,7 +671,7 @@ CREATE VIEW columns AS ...@@ -671,7 +671,7 @@ CREATE VIEW columns AS
AS datetime_precision, AS datetime_precision,
CAST(null AS character_data) AS interval_type, -- FIXME CAST(null AS character_data) AS interval_type, -- FIXME
CAST(null AS character_data) AS interval_precision, -- FIXME CAST(null AS cardinal_number) AS interval_precision,
CAST(null AS sql_identifier) AS character_set_catalog, CAST(null AS sql_identifier) AS character_set_catalog,
CAST(null AS sql_identifier) AS character_set_schema, CAST(null AS sql_identifier) AS character_set_schema,
...@@ -937,7 +937,7 @@ CREATE VIEW domains AS ...@@ -937,7 +937,7 @@ CREATE VIEW domains AS
AS datetime_precision, AS datetime_precision,
CAST(null AS character_data) AS interval_type, -- FIXME CAST(null AS character_data) AS interval_type, -- FIXME
CAST(null AS character_data) AS interval_precision, -- FIXME CAST(null AS cardinal_number) AS interval_precision,
CAST(t.typdefault AS character_data) AS domain_default, CAST(t.typdefault AS character_data) AS domain_default,
...@@ -1085,7 +1085,7 @@ CREATE VIEW parameters AS ...@@ -1085,7 +1085,7 @@ CREATE VIEW parameters AS
CAST(null AS cardinal_number) AS numeric_scale, CAST(null AS cardinal_number) AS numeric_scale,
CAST(null AS cardinal_number) AS datetime_precision, CAST(null AS cardinal_number) AS datetime_precision,
CAST(null AS character_data) AS interval_type, CAST(null AS character_data) AS interval_type,
CAST(null AS character_data) AS interval_precision, CAST(null AS cardinal_number) AS interval_precision,
CAST(current_database() AS sql_identifier) AS udt_catalog, CAST(current_database() AS sql_identifier) AS udt_catalog,
CAST(nt.nspname AS sql_identifier) AS udt_schema, CAST(nt.nspname AS sql_identifier) AS udt_schema,
CAST(t.typname AS sql_identifier) AS udt_name, CAST(t.typname AS sql_identifier) AS udt_name,
...@@ -1353,7 +1353,7 @@ CREATE VIEW routines AS ...@@ -1353,7 +1353,7 @@ CREATE VIEW routines AS
CAST(null AS cardinal_number) AS numeric_scale, CAST(null AS cardinal_number) AS numeric_scale,
CAST(null AS cardinal_number) AS datetime_precision, CAST(null AS cardinal_number) AS datetime_precision,
CAST(null AS character_data) AS interval_type, CAST(null AS character_data) AS interval_type,
CAST(null AS character_data) AS interval_precision, CAST(null AS cardinal_number) AS interval_precision,
CAST(current_database() AS sql_identifier) AS type_udt_catalog, CAST(current_database() AS sql_identifier) AS type_udt_catalog,
CAST(nt.nspname AS sql_identifier) AS type_udt_schema, CAST(nt.nspname AS sql_identifier) AS type_udt_schema,
CAST(t.typname AS sql_identifier) AS type_udt_name, CAST(t.typname AS sql_identifier) AS type_udt_name,
...@@ -1407,7 +1407,7 @@ CREATE VIEW routines AS ...@@ -1407,7 +1407,7 @@ CREATE VIEW routines AS
CAST(null AS cardinal_number) AS result_cast_numeric_scale, CAST(null AS cardinal_number) AS result_cast_numeric_scale,
CAST(null AS cardinal_number) AS result_cast_datetime_precision, CAST(null AS cardinal_number) AS result_cast_datetime_precision,
CAST(null AS character_data) AS result_cast_interval_type, CAST(null AS character_data) AS result_cast_interval_type,
CAST(null AS character_data) AS result_cast_interval_precision, CAST(null AS cardinal_number) AS result_cast_interval_precision,
CAST(null AS sql_identifier) AS result_cast_type_udt_catalog, CAST(null AS sql_identifier) AS result_cast_type_udt_catalog,
CAST(null AS sql_identifier) AS result_cast_type_udt_schema, CAST(null AS sql_identifier) AS result_cast_type_udt_schema,
CAST(null AS sql_identifier) AS result_cast_type_udt_name, CAST(null AS sql_identifier) AS result_cast_type_udt_name,
...@@ -2212,7 +2212,7 @@ CREATE VIEW user_defined_types AS ...@@ -2212,7 +2212,7 @@ CREATE VIEW user_defined_types AS
CAST(null AS cardinal_number) AS numeric_scale, CAST(null AS cardinal_number) AS numeric_scale,
CAST(null AS cardinal_number) AS datetime_precision, CAST(null AS cardinal_number) AS datetime_precision,
CAST(null AS character_data) AS interval_type, CAST(null AS character_data) AS interval_type,
CAST(null AS character_data) AS interval_precision, CAST(null AS cardinal_number) AS interval_precision,
CAST(null AS sql_identifier) AS source_dtd_identifier, CAST(null AS sql_identifier) AS source_dtd_identifier,
CAST(null AS sql_identifier) AS ref_dtd_identifier CAST(null AS sql_identifier) AS ref_dtd_identifier
...@@ -2448,7 +2448,7 @@ CREATE VIEW element_types AS ...@@ -2448,7 +2448,7 @@ CREATE VIEW element_types AS
CAST(null AS cardinal_number) AS numeric_scale, CAST(null AS cardinal_number) AS numeric_scale,
CAST(null AS cardinal_number) AS datetime_precision, CAST(null AS cardinal_number) AS datetime_precision,
CAST(null AS character_data) AS interval_type, CAST(null AS character_data) AS interval_type,
CAST(null AS character_data) AS interval_precision, CAST(null AS cardinal_number) AS interval_precision,
CAST(null AS character_data) AS domain_default, -- XXX maybe a bug in the standard CAST(null AS character_data) AS domain_default, -- XXX maybe a bug in the standard
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment