mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Add sql_features table to information schema. Generate the features list
in the documentation from that same data.
This commit is contained in:
@ -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)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
<!-- $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;
|
||||
|
54
doc/src/sgml/mk_feature_tables.pl
Normal file
54
doc/src/sgml/mk_feature_tables.pl
Normal file
@ -0,0 +1,54 @@
|
||||
# /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/</</g;
|
||||
$subfeature_name =~ s/>/>/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;
|
Reference in New Issue
Block a user