Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
1b42ad7e
Commit
1b42ad7e
authored
Dec 14, 2002
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial version of the SQL information schema
parent
2d8d6662
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
616 additions
and
92 deletions
+616
-92
doc/src/sgml/features.sgml
doc/src/sgml/features.sgml
+73
-73
doc/src/sgml/release.sgml
doc/src/sgml/release.sgml
+2
-1
src/backend/Makefile
src/backend/Makefile
+3
-3
src/backend/catalog/Makefile
src/backend/catalog/Makefile
+7
-6
src/backend/catalog/information_schema.sql
src/backend/catalog/information_schema.sql
+516
-0
src/bin/initdb/initdb.sh
src/bin/initdb/initdb.sh
+5
-1
src/test/regress/expected/rules.out
src/test/regress/expected/rules.out
+1
-1
src/test/regress/expected/type_sanity.out
src/test/regress/expected/type_sanity.out
+1
-1
src/test/regress/input/create_function_2.source
src/test/regress/input/create_function_2.source
+3
-2
src/test/regress/output/create_function_2.source
src/test/regress/output/create_function_2.source
+3
-2
src/test/regress/sql/rules.sql
src/test/regress/sql/rules.sql
+1
-1
src/test/regress/sql/type_sanity.sql
src/test/regress/sql/type_sanity.sql
+1
-1
No files found.
doc/src/sgml/features.sgml
View file @
1b42ad7e
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.1
1 2002/12/06 05:07:12 momjian
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.1
2 2002/12/14 00:24:23 petere
Exp $
-->
<appendix id="features">
...
...
@@ -655,6 +655,48 @@ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.11 2002/12/06 05:07:12 mo
<entry>SQL comments using leading double minus</entry>
<entry></entry>
</row>
<row>
<entry>F021</entry>
<entry>Core</entry>
<entry>Basic information schema</entry>
<entry></entry>
</row>
<row>
<entry>F021-01</entry>
<entry>Core</entry>
<entry>COLUMNS view</entry>
<entry></entry>
</row>
<row>
<entry>F021-02</entry>
<entry>Core</entry>
<entry>TABLES view</entry>
<entry></entry>
</row>
<row>
<entry>F021-03</entry>
<entry>Core</entry>
<entry>VIEWS view</entry>
<entry></entry>
</row>
<row>
<entry>F021-04</entry>
<entry>Core</entry>
<entry>TABLE_CONSTRAINTS view</entry>
<entry></entry>
</row>
<row>
<entry>F021-05</entry>
<entry>Core</entry>
<entry>REFERENTIAL_CONSTRAINTS view</entry>
<entry></entry>
</row>
<row>
<entry>F021-06</entry>
<entry>Core</entry>
<entry>CHECK_CONSTRAINTS view</entry>
<entry></entry>
</row>
<row>
<entry>F031</entry>
<entry>Core</entry>
...
...
@@ -905,6 +947,30 @@ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.11 2002/12/06 05:07:12 mo
<entry>INSERT statement: DEFAULT VALUES clause</entry>
<entry></entry>
</row>
<row>
<entry>F231</entry>
<entry></entry>
<entry>Privilege Tables</entry>
<entry></entry>
</row>
<row>
<entry>F231-01</entry>
<entry></entry>
<entry>TABLE_PRIVILEGES view</entry>
<entry></entry>
</row>
<row>
<entry>F231-02</entry>
<entry></entry>
<entry>COLUMN_PRIVILEGES view</entry>
<entry></entry>
</row>
<row>
<entry>F231-03</entry>
<entry></entry>
<entry>USAGE_PRIVILEGES view</entry>
<entry></entry>
</row>
<row>
<entry>F251</entry>
<entry></entry>
...
...
@@ -1133,6 +1199,12 @@ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.11 2002/12/06 05:07:12 mo
<entry>Constraint management</entry>
<entry></entry>
</row>
<row>
<entry>F501-03</entry>
<entry>Core</entry>
<entry>SQL_LANGUAGES view</entry>
<entry></entry>
</row>
<row>
<entry>F511</entry>
<entry></entry>
...
...
@@ -1557,48 +1629,6 @@ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.11 2002/12/06 05:07:12 mo
<entry>Module language</entry>
<entry></entry>
</row>
<row>
<entry>F021</entry>
<entry>Core</entry>
<entry>Basic information schema</entry>
<entry></entry>
</row>
<row>
<entry>F021-01</entry>
<entry>Core</entry>
<entry>COLUMNS view</entry>
<entry></entry>
</row>
<row>
<entry>F021-02</entry>
<entry>Core</entry>
<entry>TABLES view</entry>
<entry></entry>
</row>
<row>
<entry>F021-03</entry>
<entry>Core</entry>
<entry>VIEWS view</entry>
<entry></entry>
</row>
<row>
<entry>F021-04</entry>
<entry>Core</entry>
<entry>TABLE_CONSTRAINTS view</entry>
<entry></entry>
</row>
<row>
<entry>F021-05</entry>
<entry>Core</entry>
<entry>REFERENTIAL_CONSTRAINTS view</entry>
<entry></entry>
</row>
<row>
<entry>F021-06</entry>
<entry>Core</entry>
<entry>CHECK_CONSTRAINTS view</entry>
<entry></entry>
</row>
<row>
<entry>F031-19</entry>
<entry>Core</entry>
...
...
@@ -1667,30 +1697,6 @@ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.11 2002/12/06 05:07:12 mo
<entry>SET TRANSACTION statement: DIAGNOSTICS SIZE clause</entry>
<entry></entry>
</row>
<row>
<entry>F231</entry>
<entry></entry>
<entry>Privilege Tables</entry>
<entry></entry>
</row>
<row>
<entry>F231-01</entry>
<entry></entry>
<entry>TABLE_PRIVILEGES view</entry>
<entry></entry>
</row>
<row>
<entry>F231-02</entry>
<entry></entry>
<entry>COLUMN_PRIVILEGES view</entry>
<entry></entry>
</row>
<row>
<entry>F231-03</entry>
<entry></entry>
<entry>USAGE_PRIVILEGES view</entry>
<entry></entry>
</row>
<row>
<entry>F291</entry>
<entry></entry>
...
...
@@ -1769,12 +1775,6 @@ $Header: /cvsroot/pgsql/doc/src/sgml/features.sgml,v 2.11 2002/12/06 05:07:12 mo
<entry>SQL_SIZING view</entry>
<entry></entry>
</row>
<row>
<entry>F501-03</entry>
<entry>Core</entry>
<entry>SQL_LANGUAGES view</entry>
<entry></entry>
</row>
<row>
<entry>F502</entry>
<entry></entry>
...
...
doc/src/sgml/release.sgml
View file @
1b42ad7e
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.1
69 2002/12/12 20:35:07 tgl
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.1
70 2002/12/14 00:24:23 petere
Exp $
-->
<appendix id="release">
...
...
@@ -24,6 +24,7 @@ CDATA means the content is "SGML-free", so you can write without
worries about funny characters.
-->
<literallayout><![CDATA[
Information schema
Domains now support CHECK constraints
]]></literallayout>
...
...
src/backend/Makefile
View file @
1b42ad7e
...
...
@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.8
8 2002/10/09 16:21:54 momjian
Exp $
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.8
9 2002/12/14 00:24:23 petere
Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -131,7 +131,7 @@ ifeq ($(MAKE_DLL), true)
$(INSTALL_DATA)
libpostgres.a
$(DESTDIR)$(libdir)
/libpostgres.a
endif
endif
$(MAKE)
-C
catalog install-
bki
$(MAKE)
-C
catalog install-
data
$(INSTALL_DATA)
$(srcdir)
/libpq/pg_hba.conf.sample
$(DESTDIR)$(datadir)
/pg_hba.conf.sample
$(INSTALL_DATA)
$(srcdir)
/libpq/pg_ident.conf.sample
$(DESTDIR)$(datadir)
/pg_ident.conf.sample
$(INSTALL_DATA)
$(srcdir)
/utils/misc/postgresql.conf.sample
$(DESTDIR)$(datadir)
/postgresql.conf.sample
...
...
@@ -170,7 +170,7 @@ ifeq ($(MAKE_DLL), true)
rm
-f
$(DESTDIR)$(libdir)
/libpostgres.a
endif
endif
$(MAKE)
-C
catalog uninstall-
bki
$(MAKE)
-C
catalog uninstall-
data
rm
-f
$(DESTDIR)$(datadir)
/pg_hba.conf.sample
\
$(DESTDIR)$(datadir)
/pg_ident.conf.sample
\
$(DESTDIR)$(datadir)
/postgresql.conf.sample
...
...
src/backend/catalog/Makefile
View file @
1b42ad7e
...
...
@@ -2,7 +2,7 @@
#
# Makefile for backend/catalog
#
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.4
2 2002/07/18 23:11:27
petere Exp $
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.4
3 2002/12/14 00:24:24
petere Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -41,17 +41,18 @@ postgres.bki postgres.description: genbki.sh $(POSTGRES_BKI_SRCS) \
$(top_srcdir)/src/include/postgres_ext.h $(top_builddir)/src/include/pg_config.h
CPP
=
'
$(CPP)
'
AWK
=
'
$(AWK)
'
$(SHELL)
$<
$(BKIOPTS)
-o
postgres
$(pg_includes)
$(POSTGRES_BKI_SRCS)
--set-version
=
$(VERSION)
.PHONY
:
install-
bki
install-
bki
:
$(BKIFILES) installdirs
.PHONY
:
install-
data
install-
data
:
$(BKIFILES) installdirs
$(INSTALL_DATA)
postgres.bki
$(DESTDIR)$(datadir)
/postgres.bki
$(INSTALL_DATA)
postgres.description
$(DESTDIR)$(datadir)
/postgres.description
$(INSTALL_DATA)
information_schema.sql
$(DESTDIR)$(datadir)
/information_schema.sql
installdirs
:
$(mkinstalldirs)
$(DESTDIR)$(datadir)
.PHONY
:
uninstall-
bki
uninstall-
bki
:
rm
-f
$(
addprefix
$(DESTDIR)$(datadir)
/,
$(BKIFILES)
)
.PHONY
:
uninstall-
data
uninstall-
data
:
rm
-f
$(
addprefix
$(DESTDIR)$(datadir)
/,
$(BKIFILES)
information_schema.sql
)
clean
:
...
...
src/backend/catalog/information_schema.sql
0 → 100644
View file @
1b42ad7e
This diff is collapsed.
Click to expand it.
src/bin/initdb/initdb.sh
View file @
1b42ad7e
...
...
@@ -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.17
7 2002/11/25 21:41:46 momjian
Exp $
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.17
8 2002/12/14 00:24:24 petere
Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -1042,6 +1042,10 @@ EOF
|
"
$PGPATH
"
/postgres
$PGSQL_OPT
template1
>
/dev/null
||
exit_nicely
echo
"ok"
$ECHO_N
"creating information schema... "
$ECHO_C
"
$PGPATH
"
/postgres
$PGSQL_OPT
-N
template1
>
/dev/null <
"
$datadir
"
/information_schema.sql
||
exit_nicely
echo
"ok"
$ECHO_N
"vacuuming database template1... "
$ECHO_C
"
$PGPATH
"
/postgres
$PGSQL_OPT
template1
>
/dev/null
<<
EOF
...
...
src/test/regress/expected/rules.out
View file @
1b42ad7e
...
...
@@ -1266,7 +1266,7 @@ drop table cchild;
--
-- Check that ruleutils are working
--
SELECT viewname, definition FROM pg_views ORDER BY viewname;
SELECT viewname, definition FROM pg_views
WHERE schemaname <> 'information_schema'
ORDER BY viewname;
viewname | definition
--------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
iexit | SELECT ih.name, ih.thepath, interpt_pp(ih.thepath, r.thepath) AS exit FROM ihighway ih, ramp r WHERE (ih.thepath ## r.thepath);
...
...
src/test/regress/expected/type_sanity.out
View file @
1b42ad7e
...
...
@@ -59,7 +59,7 @@ WHERE (p1.typtype = 'c' AND p1.typrelid = 0) OR
-- NOTE: as of 7.3, this check finds SET, smgr, and unknown.
SELECT p1.oid, p1.typname
FROM pg_type as p1
WHERE p1.typtype in ('b'
,'d'
) AND p1.typname NOT LIKE '\\_%' AND NOT EXISTS
WHERE p1.typtype in ('b') AND p1.typname NOT LIKE '\\_%' AND NOT EXISTS
(SELECT 1 FROM pg_type as p2
WHERE p2.typname = ('_' || p1.typname)::name AND
p2.typelem = p1.oid);
...
...
src/test/regress/input/create_function_2.source
View file @
1b42ad7e
...
...
@@ -28,8 +28,9 @@ CREATE FUNCTION equipment(hobbies_r)
CREATE FUNCTION user_relns()
RETURNS setof name
AS 'select relname
from pg_class
where relname !~ ''pg_.*'' and
from pg_class c, pg_namespace n
where relnamespace = n.oid and
(nspname !~ ''pg_.*'' and nspname <> ''information_schema'') and
relkind <> ''i'' '
LANGUAGE 'sql';
...
...
src/test/regress/output/create_function_2.source
View file @
1b42ad7e
...
...
@@ -22,8 +22,9 @@ CREATE FUNCTION equipment(hobbies_r)
CREATE FUNCTION user_relns()
RETURNS setof name
AS 'select relname
from pg_class
where relname !~ ''pg_.*'' and
from pg_class c, pg_namespace n
where relnamespace = n.oid and
(nspname !~ ''pg_.*'' and nspname <> ''information_schema'') and
relkind <> ''i'' '
LANGUAGE 'sql';
CREATE FUNCTION pt_in_widget(point, widget)
...
...
src/test/regress/sql/rules.sql
View file @
1b42ad7e
...
...
@@ -763,7 +763,7 @@ drop table cchild;
--
-- Check that ruleutils are working
--
SELECT
viewname
,
definition
FROM
pg_views
ORDER
BY
viewname
;
SELECT
viewname
,
definition
FROM
pg_views
WHERE
schemaname
<>
'information_schema'
ORDER
BY
viewname
;
SELECT
tablename
,
rulename
,
definition
FROM
pg_rules
ORDER
BY
tablename
,
rulename
;
...
...
src/test/regress/sql/type_sanity.sql
View file @
1b42ad7e
...
...
@@ -54,7 +54,7 @@ WHERE (p1.typtype = 'c' AND p1.typrelid = 0) OR
SELECT
p1
.
oid
,
p1
.
typname
FROM
pg_type
as
p1
WHERE
p1
.
typtype
in
(
'b'
,
'd'
)
AND
p1
.
typname
NOT
LIKE
'
\\
_%'
AND
NOT
EXISTS
WHERE
p1
.
typtype
in
(
'b'
)
AND
p1
.
typname
NOT
LIKE
'
\\
_%'
AND
NOT
EXISTS
(
SELECT
1
FROM
pg_type
as
p2
WHERE
p2
.
typname
=
(
'_'
||
p1
.
typname
)::
name
AND
p2
.
typelem
=
p1
.
oid
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment