I propose this patch to remove the information schema tables SQL_LANGUAGES, which was eliminated in SQL:2008, and SQL_PACKAGES, which was eliminated in SQL:2011. Since they were dropped by the SQL standard, the information in them was no longer updated and therefore no longer useful.
This also removes the feature-package association information in sql_feature_packages.txt, but for the time begin we are keeping the information which features are in the Core package (that is, mandatory SQL features). Maybe at some point someone wants to invent a way to store that that does not involve using the "package" mechanism anymore. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From 304270da9168134df77d59c537268bd6bcaf1a06 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut <pe...@eisentraut.org> Date: Mon, 14 Oct 2019 09:56:38 +0200 Subject: [PATCH] Remove obsolete information schema tables Remove SQL_LANGUAGES, which was eliminated in SQL:2008, and SQL_PACKAGES, which was eliminated in SQL:2011. Since they were dropped by the SQL standard, the information in them was no longer updated and therefore no longer useful. This also removes the feature-package association information in sql_feature_packages.txt, but for the time begin we are keeping the information which features are in the Core package (that is, mandatory SQL features). Maybe at some point someone wants to invent a way to store that that does not involve using the "package" mechanism anymore. --- doc/src/sgml/features.sgml | 9 +- doc/src/sgml/information_schema.sgml | 154 ------------------- src/backend/catalog/information_schema.sql | 50 ------ src/backend/catalog/sql_feature_packages.txt | 29 ---- src/backend/catalog/sql_features.txt | 2 - src/test/regress/expected/sanity_check.out | 2 - 6 files changed, 3 insertions(+), 243 deletions(-) diff --git a/doc/src/sgml/features.sgml b/doc/src/sgml/features.sgml index f767bee46e..2c5a7e5d0c 100644 --- a/doc/src/sgml/features.sgml +++ b/doc/src/sgml/features.sgml @@ -44,10 +44,7 @@ <title>SQL Conformance</title> broad three levels found in <acronym>SQL-92</acronym>. A large subset of these features represents the <quote>Core</quote> features, which every conforming SQL implementation must supply. - The rest of the features are purely optional. Some optional - features are grouped together to form <quote>packages</quote>, which - SQL implementations can claim conformance to, thus claiming - conformance to particular groups of features. + The rest of the features are purely optional. </para> <para> @@ -116,7 +113,7 @@ <title>Supported Features</title> <thead> <row> <entry>Identifier</entry> - <entry>Package</entry> + <entry>Core?</entry> <entry>Description</entry> <entry>Comment</entry> </row> @@ -143,7 +140,7 @@ <title>Unsupported Features</title> <thead> <row> <entry>Identifier</entry> - <entry>Package</entry> + <entry>Core?</entry> <entry>Description</entry> <entry>Comment</entry> </row> diff --git a/doc/src/sgml/information_schema.sgml b/doc/src/sgml/information_schema.sgml index 906fe7819f..7d3be1afdb 100644 --- a/doc/src/sgml/information_schema.sgml +++ b/doc/src/sgml/information_schema.sgml @@ -4963,160 +4963,6 @@ <title><literal>sql_implementation_info</literal> Columns</title> </table> </sect1> - <sect1 id="infoschema-sql-languages"> - <title><literal>sql_languages</literal></title> - - <para> - The table <literal>sql_languages</literal> contains one row for - each SQL language binding that is supported by - <productname>PostgreSQL</productname>. - <productname>PostgreSQL</productname> supports direct SQL and - embedded SQL in C; that is all you will learn from this table. - </para> - - <para> - This table was removed from the SQL standard in SQL:2008, so there - are no entries referring to standards later than SQL:2003. - </para> - - <table> - <title><literal>sql_languages</literal> Columns</title> - - <tgroup cols="3"> - <thead> - <row> - <entry>Name</entry> - <entry>Data Type</entry> - <entry>Description</entry> - </row> - </thead> - - <tbody> - <row> - <entry><literal>sql_language_source</literal></entry> - <entry><type>character_data</type></entry> - <entry> - The name of the source of the language definition; always - <literal>ISO 9075</literal>, that is, the SQL standard - </entry> - </row> - - <row> - <entry><literal>sql_language_year</literal></entry> - <entry><type>character_data</type></entry> - <entry> - The year the standard referenced in - <literal>sql_language_source</literal> was approved. - </entry> - </row> - - <row> - <entry><literal>sql_language_conformance</literal></entry> - <entry><type>character_data</type></entry> - <entry> - The standard conformance level for the language binding. For - ISO 9075:2003 this is always <literal>CORE</literal>. - </entry> - </row> - - <row> - <entry><literal>sql_language_integrity</literal></entry> - <entry><type>character_data</type></entry> - <entry>Always null (This value is relevant to an earlier version of the SQL standard.)</entry> - </row> - - <row> - <entry><literal>sql_language_implementation</literal></entry> - <entry><type>character_data</type></entry> - <entry>Always null</entry> - </row> - - <row> - <entry><literal>sql_language_binding_style</literal></entry> - <entry><type>character_data</type></entry> - <entry> - The language binding style, either <literal>DIRECT</literal> or - <literal>EMBEDDED</literal> - </entry> - </row> - - <row> - <entry><literal>sql_language_programming_language</literal></entry> - <entry><type>character_data</type></entry> - <entry> - The programming language, if the binding style is - <literal>EMBEDDED</literal>, else null. <productname>PostgreSQL</productname> only - supports the language C. - </entry> - </row> - </tbody> - </tgroup> - </table> - </sect1> - - <sect1 id="infoschema-sql-packages"> - <title><literal>sql_packages</literal></title> - - <para> - The table <literal>sql_packages</literal> contains information - about which feature packages defined in the SQL standard are - supported by <productname>PostgreSQL</productname>. Refer to <xref - linkend="features"/> for background information on feature packages. - </para> - - <table> - <title><literal>sql_packages</literal> Columns</title> - - <tgroup cols="3"> - <thead> - <row> - <entry>Name</entry> - <entry>Data Type</entry> - <entry>Description</entry> - </row> - </thead> - - <tbody> - <row> - <entry><literal>feature_id</literal></entry> - <entry><type>character_data</type></entry> - <entry>Identifier string of the package</entry> - </row> - - <row> - <entry><literal>feature_name</literal></entry> - <entry><type>character_data</type></entry> - <entry>Descriptive name of the package</entry> - </row> - - <row> - <entry><literal>is_supported</literal></entry> - <entry><type>yes_or_no</type></entry> - <entry> - <literal>YES</literal> if the package is fully supported by the - current version of <productname>PostgreSQL</productname>, <literal>NO</literal> if not - </entry> - </row> - - <row> - <entry><literal>is_verified_by</literal></entry> - <entry><type>character_data</type></entry> - <entry> - Always null, since the <productname>PostgreSQL</productname> development group does not - perform formal testing of feature conformance - </entry> - </row> - - <row> - <entry><literal>comments</literal></entry> - <entry><type>character_data</type></entry> - <entry>Possibly a comment about the supported status of the package</entry> - </row> - </tbody> - </tgroup> - </table> - </sect1> - <sect1 id="infoschema-sql-parts"> <title><literal>sql_parts</literal></title> diff --git a/src/backend/catalog/information_schema.sql b/src/backend/catalog/information_schema.sql index c42e76ea89..ec11db9f2d 100644 --- a/src/backend/catalog/information_schema.sql +++ b/src/backend/catalog/information_schema.sql @@ -1648,56 +1648,6 @@ CREATE TABLE sql_implementation_info ( GRANT SELECT ON sql_implementation_info TO PUBLIC; -/* - * SQL_LANGUAGES table - * apparently removed in SQL:2008 - */ - -CREATE TABLE sql_languages ( - sql_language_source character_data, - sql_language_year character_data, - sql_language_conformance character_data, - sql_language_integrity character_data, - sql_language_implementation character_data, - sql_language_binding_style character_data, - sql_language_programming_language character_data -); - -INSERT INTO sql_languages VALUES ('ISO 9075', '1999', 'CORE', NULL, NULL, 'DIRECT', NULL); -INSERT INTO sql_languages VALUES ('ISO 9075', '1999', 'CORE', NULL, NULL, 'EMBEDDED', 'C'); -INSERT INTO sql_languages VALUES ('ISO 9075', '2003', 'CORE', NULL, NULL, 'DIRECT', NULL); -INSERT INTO sql_languages VALUES ('ISO 9075', '2003', 'CORE', NULL, NULL, 'EMBEDDED', 'C'); - -GRANT SELECT ON sql_languages TO PUBLIC; - - -/* - * SQL_PACKAGES table - * removed in SQL:2011 - */ - -CREATE TABLE sql_packages ( - feature_id character_data, - feature_name character_data, - is_supported yes_or_no, - is_verified_by character_data, - comments character_data -); - -INSERT INTO sql_packages VALUES ('PKG000', 'Core', 'NO', NULL, ''); -INSERT INTO sql_packages VALUES ('PKG001', 'Enhanced datetime facilities', 'YES', NULL, ''); -INSERT INTO sql_packages VALUES ('PKG002', 'Enhanced integrity management', 'NO', NULL, ''); -INSERT INTO sql_packages VALUES ('PKG003', 'OLAP facilities', 'NO', NULL, ''); -INSERT INTO sql_packages VALUES ('PKG004', 'PSM', 'NO', NULL, 'PL/pgSQL is similar.'); -INSERT INTO sql_packages VALUES ('PKG005', 'CLI', 'NO', NULL, 'ODBC is similar.'); -INSERT INTO sql_packages VALUES ('PKG006', 'Basic object support', 'NO', NULL, ''); -INSERT INTO sql_packages VALUES ('PKG007', 'Enhanced object support', 'NO', NULL, ''); -INSERT INTO sql_packages VALUES ('PKG008', 'Active database', 'NO', NULL, ''); -INSERT INTO sql_packages VALUES ('PKG010', 'OLAP', 'NO', NULL, 'NO'); - -GRANT SELECT ON sql_packages TO PUBLIC; - - /* * 5.59 * SQL_PARTS table diff --git a/src/backend/catalog/sql_feature_packages.txt b/src/backend/catalog/sql_feature_packages.txt index 382e4aea5c..1d87a3e31e 100644 --- a/src/backend/catalog/sql_feature_packages.txt +++ b/src/backend/catalog/sql_feature_packages.txt @@ -22,46 +22,17 @@ F021 Core F031 Core F041 Core F051 Core -F052 Enhanced datetime facilities F081 Core F131 Core F181 Core -F191 Enhanced integrity management F201 Core F221 Core F261 Core F311 Core -F411 Enhanced datetime facilities F471 Core F481 Core -F491 Enhanced integrity management F501 Core -F521 Enhanced integrity management -F555 Enhanced datetime facilities -F671 Enhanced integrity management -F701 Enhanced integrity management F812 Core S011 Core -S023 Basic object support -S024 Enhanced object support -S041 Basic object support -S043 Enhanced object support -S051 Basic object support -S071 Enhanced object support -S081 Enhanced object support -S111 Enhanced object support -S151 Basic object support -S161 Enhanced object support -S211 Enhanced object support -S231 Enhanced object support -T041 Basic object support -T191 Enhanced integrity management -T201 Enhanced integrity management -T211 Active database -T211 Enhanced integrity management -T212 Enhanced integrity management T321 Core -T322 PSM -T431 OLAP -T611 OLAP T631 Core diff --git a/src/backend/catalog/sql_features.txt b/src/backend/catalog/sql_features.txt index 9c68292a54..81b9d8a4f7 100644 --- a/src/backend/catalog/sql_features.txt +++ b/src/backend/catalog/sql_features.txt @@ -285,11 +285,9 @@ F492 Optional table constraint enforcement NO F501 Features and conformance views YES F501 Features and conformance views 01 SQL_FEATURES view YES F501 Features and conformance views 02 SQL_SIZING view YES -F501 Features and conformance views 03 SQL_LANGUAGES view YES F502 Enhanced documentation tables YES F502 Enhanced documentation tables 01 SQL_SIZING_PROFILES view YES F502 Enhanced documentation tables 02 SQL_IMPLEMENTATION_INFO view YES -F502 Enhanced documentation tables 03 SQL_PACKAGES view YES F521 Assertions NO F531 Temporary tables YES F555 Enhanced seconds precision YES diff --git a/src/test/regress/expected/sanity_check.out b/src/test/regress/expected/sanity_check.out index d6e75ffce6..87321d4151 100644 --- a/src/test/regress/expected/sanity_check.out +++ b/src/test/regress/expected/sanity_check.out @@ -177,8 +177,6 @@ shighway|t slow_emp4000|f sql_features|f sql_implementation_info|f -sql_languages|f -sql_packages|f sql_parts|f sql_sizing|f sql_sizing_profiles|f -- 2.23.0