From 2160c9177d03c3989ca7fb9fa093adec0f3a116f Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 14 Jan 2003 23:19:34 +0000 Subject: Add sql_features table to information schema. Generate the features list in the documentation from that same data. --- src/backend/catalog/Makefile | 5 +- src/backend/catalog/information_schema.sql | 38 ++- src/backend/catalog/sql_feature_packages.txt | 82 ++++++ src/backend/catalog/sql_features.txt | 360 +++++++++++++++++++++++++++ src/bin/initdb/initdb.sh | 8 +- 5 files changed, 483 insertions(+), 10 deletions(-) create mode 100644 src/backend/catalog/sql_feature_packages.txt create mode 100644 src/backend/catalog/sql_features.txt (limited to 'src') diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile index 32570ed128a..383775d8476 100644 --- a/src/backend/catalog/Makefile +++ b/src/backend/catalog/Makefile @@ -2,7 +2,7 @@ # # Makefile for backend/catalog # -# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.44 2003/01/13 20:37:18 tgl Exp $ +# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.45 2003/01/14 23:19:34 petere Exp $ # #------------------------------------------------------------------------- @@ -46,13 +46,14 @@ install-data: $(BKIFILES) installdirs $(INSTALL_DATA) postgres.bki $(DESTDIR)$(datadir)/postgres.bki $(INSTALL_DATA) postgres.description $(DESTDIR)$(datadir)/postgres.description $(INSTALL_DATA) $(srcdir)/information_schema.sql $(DESTDIR)$(datadir)/information_schema.sql + $(INSTALL_DATA) $(srcdir)/sql_features.txt $(DESTDIR)$(datadir)/sql_features.txt installdirs: $(mkinstalldirs) $(DESTDIR)$(datadir) .PHONY: uninstall-data uninstall-data: - rm -f $(addprefix $(DESTDIR)$(datadir)/, $(BKIFILES) information_schema.sql) + rm -f $(addprefix $(DESTDIR)$(datadir)/, $(BKIFILES) information_schema.sql sql_features.txt) clean: diff --git a/src/backend/catalog/information_schema.sql b/src/backend/catalog/information_schema.sql index 58e26ea48a3..ba4702df858 100644 --- a/src/backend/catalog/information_schema.sql +++ b/src/backend/catalog/information_schema.sql @@ -4,7 +4,7 @@ * * Copyright 2002, PostgreSQL Global Development Group * - * $Id: information_schema.sql,v 1.1 2002/12/14 00:24:24 petere Exp $ + * $Id: information_schema.sql,v 1.2 2003/01/14 23:19:34 petere Exp $ */ @@ -312,15 +312,12 @@ CREATE TABLE sql_features ( feature_name character_data, sub_feature_id character_data, sub_feature_name character_data, - feature_subfeature_package_code character_data, is_supported character_data, is_verified_by character_data, comments character_data -); +) WITHOUT OIDS; --- FIXME: Fill this in using the information in User's Guide Appendix --- C, and then figure out a way to generate the documentation from this --- table. +-- Will be filled with external data by initdb. GRANT SELECT ON sql_features TO PUBLIC; @@ -338,7 +335,7 @@ CREATE TABLE sql_languages ( sql_language_implementation character_data, sql_language_binding_style character_data, sql_language_programming_language character_data -); +) WITHOUT OIDS; 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'); @@ -346,6 +343,33 @@ INSERT INTO sql_languages VALUES ('ISO 9075', '1999', 'CORE', NULL, NULL, 'EMBED GRANT SELECT ON sql_languages TO PUBLIC; +/* + * 20.50 + * SQL_PACKAGES table + */ + +CREATE TABLE sql_packages ( + feature_id character_data, + feature_name character_data, + is_supported character_data, + is_verified_by character_data, + comments character_data +) WITHOUT OIDS; + +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 ('PKG009', 'SQL/MM support', 'NO', NULL, ''); + +GRANT SELECT ON sql_packages TO PUBLIC; + + /* * 20.53 * TABLE_CONSTRAINTS view diff --git a/src/backend/catalog/sql_feature_packages.txt b/src/backend/catalog/sql_feature_packages.txt new file mode 100644 index 00000000000..b2e403cc113 --- /dev/null +++ b/src/backend/catalog/sql_feature_packages.txt @@ -0,0 +1,82 @@ +B011 Core +B012 Core +B013 Core +B014 Core +B015 Core +B016 Core +B017 Core +E011 Core +E021 Core +E031 Core +E051 Core +E061 Core +E071 Core +E081 Core +E091 Core +E101 Core +E111 Core +E121 Core +E131 Core +E141 Core +E151 Core +E152 Core +E153 Core +E161 Core +E171 Core +E182 Core +F021 Core +F031 Core +F041 Core +F051 Core +F052 Enhanced datetime facilities +F081 Core +F131 Core +F191 Enhanced integrity management +F201 Core +F221 Core +F261 Core +F302 OLAP facilities +F304 OLAP facilities +F311 Core +F401 OLAP facilities +F411 Enhanced datetime facilities +F471 Core +F481 Core +F491 Enhanced integrity management +F501 Core +F521 Enhanced integrity management +F555 Enhanced datetime facilities +F591 OLAP facilities +F641 OLAP facilities +F671 Enhanced integrity management +F701 Enhanced integrity management +F812 Core +S011 Core +S023 Basic object support +S023 SQL/MM support +S024 Enhanced object support +S024 SQL/MM support +S041 Basic object support +S043 Enhanced object support +S051 Basic object support +S071 Enhanced object support +S081 Enhanced object support +S091 SQL/MM support +S092 SQL/MM support +S111 Enhanced object support +S151 Basic object support +S161 Enhanced object support +S211 Enhanced object support +S211 SQL/MM support +S231 Enhanced object support +S241 Enhanced object support +T041 Basic object support +T191 Enhanced integrity management +T201 Enhanced integrity management +T211 Enhanced integrity management +T211 Active database +T212 Enhanced integrity management +T321 Core +T322 PSM +T322 SQL/MM support +T431 OLAP facilities diff --git a/src/backend/catalog/sql_features.txt b/src/backend/catalog/sql_features.txt new file mode 100644 index 00000000000..e3231be377c --- /dev/null +++ b/src/backend/catalog/sql_features.txt @@ -0,0 +1,360 @@ +B011 Embedded Ada NO +B012 Embedded C YES +B013 Embedded COBOL NO +B014 Embedded Fortran NO +B015 Embedded MUMPS NO +B016 Embedded Pascal NO +B017 Embedded PL/I NO +B021 Direct SQL YES +B031 Basic dynamic SQL NO +B032 Extended dynamic SQL NO +B032 Extended dynamic SQL 01 statement NO +B041 Extensions to embedded SQL exception declarations NO +B051 Enhanced execution rights NO +E011 Numeric data types YES +E011 Numeric data types 01 INTEGER and SMALLINT data types YES +E011 Numeric data types 02 REAL, DOUBLE PRECISON, and FLOAT data types YES +E011 Numeric data types 03 DECIMAL and NUMERIC data types YES +E011 Numeric data types 04 Arithmetic operators YES +E011 Numeric data types 05 Numeric comparison YES +E011 Numeric data types 06 Implicit casting among the numeric data types YES +E021 Character data types YES +E021 Character data types 01 CHARACTER data type YES +E021 Character data types 02 CHARACTER VARYING data type YES +E021 Character data types 03 Character literals YES +E021 Character data types 04 CHARACTER_LENGTH function YES +E021 Character data types 05 OCTET_LENGTH function YES +E021 Character data types 06 SUBSTRING function YES +E021 Character data types 07 Character concatenation YES +E021 Character data types 08 UPPER and LOWER functions YES +E021 Character data types 09 TRIM function YES +E021 Character data types 10 Implicit casting among the character data types YES +E021 Character data types 11 POSITION function YES +E021 Character data types 12 Character comparison YES +E031 Identifiers YES +E031 Identifiers 01 Delimited identifiers YES +E031 Identifiers 02 Lower case identifiers YES +E031 Identifiers 03 Trailing underscore YES +E051 Basic query specification YES +E051 Basic query specification 01 SELECT DISTINCT YES +E051 Basic query specification 02 GROUP BY clause YES +E051 Basic query specification 04 GROUP BY can contain columns not in