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
c74dc128
Commit
c74dc128
authored
Jun 13, 2001
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update some obsolete examples.
parent
bbb7b6f6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
src/tutorial/syscat.source
src/tutorial/syscat.source
+7
-10
No files found.
src/tutorial/syscat.source
View file @
c74dc128
...
...
@@ -4,9 +4,10 @@
-- sample queries to the system catalogs
--
--
-- Copyright (c) 1994, Regents of the University of California
-- Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
-- Portions Copyright (c) 1994, Regents of the University of California
--
-- $Id: syscat.source,v 1.
3 1998/03/20 04:12:25 momjian
Exp $
-- $Id: syscat.source,v 1.
4 2001/06/13 19:31:56 tgl
Exp $
--
---------------------------------------------------------------------------
...
...
@@ -16,7 +17,7 @@
--
SELECT usename, datname
FROM pg_user, pg_database
WHERE usesysid =
int2in(int4out(datdba))
WHERE usesysid =
datdba
ORDER BY usename, datname;
--
...
...
@@ -24,14 +25,13 @@ SELECT usename, datname
--
SELECT relname
FROM pg_class
WHERE relkind = 'r' -- not indices
WHERE relkind = 'r' -- not indices
, views, etc
and relname !~ '^pg_' -- not catalogs
and relname !~ '^Inv' -- not large objects
ORDER BY relname;
--
-- lists all simple indic
i
es (ie. those that are not defined over a function
-- lists all simple indices (ie. those that are not defined over a function
-- of several attributes)
--
SELECT bc.relname AS class_name,
...
...
@@ -57,7 +57,6 @@ SELECT c.relname, a.attname, t.typname
FROM pg_class c, pg_attribute a, pg_type t
WHERE c.relkind = 'r' -- no indices
and c.relname !~ '^pg_' -- no catalogs
and c.relname !~ '^Inv' -- no large objects
and a.attnum > 0 -- no system att's
and a.attrelid = c.oid
and a.atttypid = t.oid
...
...
@@ -69,7 +68,7 @@ SELECT c.relname, a.attname, t.typname
--
SELECT u.usename, t.typname
FROM pg_type t, pg_user u
WHERE u.usesysid =
int2in(int4out(t.typowner))
WHERE u.usesysid =
t.typowner
and t.typrelid = '0'::oid -- no complex types
and t.typelem = '0'::oid -- no arrays
and u.usename <> 'postgres'
...
...
@@ -147,5 +146,3 @@ SELECT am.amname, opc.opcname, opr.oprname
and amop.amopclaid = opc.oid
and amop.amopopr = opr.oid
ORDER BY amname, opcname, oprname;
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