Commit 2160c917 authored by Peter Eisentraut's avatar Peter Eisentraut

Add sql_features table to information schema. Generate the features list

in the documentation from that same data.
parent 1eddbd81
......@@ -8,7 +8,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.54 2002/11/26 19:22:16 momjian Exp $
# $Header: /cvsroot/pgsql/doc/src/sgml/Makefile,v 1.55 2003/01/14 23:19:34 petere Exp $
#
#----------------------------------------------------------------------------
......@@ -52,7 +52,10 @@ vpath %.sgml ./ref
ALLBOOKS = admin developer programmer reference tutorial user
ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) bookindex.sgml setindex.sgml version.sgml
GENERATED_SGML = bookindex.sgml setindex.sgml version.sgml \
features-supported.sgml features-unsupported.sgml
ALLSGML := $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) $(GENERATED_SGML)
ifdef DOCBOOKSTYLE
CATALOG = -c $(DOCBOOKSTYLE)/catalog
......@@ -125,6 +128,12 @@ version.sgml: $(top_builddir)/src/Makefile.global
echo "<!entity majorversion \"`expr $(VERSION) : '\([0-9][0-9]*\.[0-9][0-9]*\)'`\">"; \
} >$@
features-supported.sgml: $(top_srcdir)/src/backend/catalog/sql_feature_packages.txt $(top_srcdir)/src/backend/catalog/sql_features.txt
$(PERL) $(srcdir)/mk_feature_tables.pl YES $^ > $@
features-unsupported.sgml: $(top_srcdir)/src/backend/catalog/sql_feature_packages.txt $(top_srcdir)/src/backend/catalog/sql_features.txt
$(PERL) $(srcdir)/mk_feature_tables.pl NO $^ > $@
##
## Print
......@@ -218,10 +227,10 @@ regress_README.html: regress.sgml
check: $(addprefix check-, $(ALLBOOKS)) check-postgres
# Quick syntax check without style processing
$(addprefix check-, $(ALLBOOKS)): check-%: %.sgml bookindex.sgml
$(addprefix check-, $(ALLBOOKS)): check-%: %.sgml $(ALLSGML)
$(NSGMLS) $(SGMLINCLUDE) -s book-decl.sgml $<
check-postgres: postgres.sgml setindex.sgml
check-postgres: postgres.sgml $(ALLSGML)
$(NSGMLS) $(SGMLINCLUDE) -s $<
......@@ -237,4 +246,4 @@ clean distclean maintainer-clean:
# print
rm -f *.rtf *.tex-ps *.tex-pdf *.dvi *.aux *.log *.ps *.pdf *.out *.eps *.fot
# index
rm -f HTML.index bookindex.sgml setindex.sgml version.sgml
rm -f HTML.index $(GENERATED_SGML)
This diff is collapsed.
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/filelist.sgml,v 1.25 2002/10/24 17:48:54 petere Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/filelist.sgml,v 1.26 2003/01/14 23:19:34 petere Exp $ -->
<!entity history SYSTEM "history.sgml">
<!entity info SYSTEM "info.sgml">
......@@ -34,6 +34,9 @@
<!entity syntax SYSTEM "syntax.sgml">
<!entity typeconv SYSTEM "typeconv.sgml">
<!entity features-supported SYSTEM "features-supported.sgml">
<!entity features-unsupported SYSTEM "features-unsupported.sgml">
<!-- reference pages -->
<!entity % allfiles SYSTEM "ref/allfiles.sgml">
%allfiles;
......
# /usr/bin/perl -w
my $yesno = $ARGV[0];
open PACK, $ARGV[1] or die;
my %feature_packages;
while (<PACK>) {
chomp;
my ($fid, $pname) = split /\t/;
if ($feature_packages{$fid}) {
$feature_packages{$fid} .= ", $pname";
} else {
$feature_packages{$fid} = $pname;
}
}
close PACK;
open FEAT, $ARGV[2] or die;
print "<tbody>\n";
while (<FEAT>) {
chomp;
my ($feature_id, $feature_name, $subfeature_id, $subfeature_name, $is_supported, $comments) = split /\t/;
$is_supported eq $yesno || next;
$subfeature_name =~ s/</&lt;/g;
$subfeature_name =~ s/>/&gt;/g;
print " <row>\n";
if ($subfeature_id) {
print " <entry>$feature_id-$subfeature_id</entry>\n";
} else {
print " <entry>$feature_id</entry>\n";
}
print " <entry>" . $feature_packages{$feature_id} . "</entry>\n";
if ($subfeature_id) {
print " <entry>$subfeature_name</entry>\n";
} else {
print " <entry>$feature_name</entry>\n";
}
print " <entry>$comments</entry>\n";
print " </row>\n";
}
print "</tbody>\n";
close FEAT;
......@@ -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:
......
......@@ -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
......
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
This diff is collapsed.
......@@ -27,7 +27,7 @@
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.178 2002/12/14 00:24:24 petere Exp $
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.179 2003/01/14 23:19:34 petere Exp $
#
#-------------------------------------------------------------------------
......@@ -1044,6 +1044,12 @@ echo "ok"
$ECHO_N "creating information schema... "$ECHO_C
"$PGPATH"/postgres $PGSQL_OPT -N template1 > /dev/null < "$datadir"/information_schema.sql || exit_nicely
(
echo "COPY information_schema.sql_features (feature_id, feature_name, sub_feature_id, sub_feature_name, is_supported, comments) FROM STDIN;"
cat "$datadir"/sql_features.txt
echo "\."
) \
| "$PGPATH"/postgres $PGSQL_OPT template1 > /dev/null || exit_nicely
echo "ok"
$ECHO_N "vacuuming database template1... "$ECHO_C
......
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