Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
c74dc128
Commit
c74dc128
authored
23 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Update some obsolete examples.
parent
bbb7b6f6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/tutorial/syscat.source
+7
-10
7 additions, 10 deletions
src/tutorial/syscat.source
with
7 additions
and
10 deletions
src/tutorial/syscat.source
+
7
−
10
View file @
c74dc128
...
@@ -4,9 +4,10 @@
...
@@ -4,9 +4,10 @@
-- sample queries to the system catalogs
-- 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 @@
...
@@ -16,7 +17,7 @@
--
--
SELECT usename, datname
SELECT usename, datname
FROM pg_user, pg_database
FROM pg_user, pg_database
WHERE usesysid =
int2in(int4out(
datdba
))
WHERE usesysid = datdba
ORDER BY usename, datname;
ORDER BY usename, datname;
--
--
...
@@ -24,14 +25,13 @@ SELECT usename, datname
...
@@ -24,14 +25,13 @@ SELECT usename, datname
--
--
SELECT relname
SELECT relname
FROM pg_class
FROM pg_class
WHERE relkind = 'r' -- not indices
WHERE relkind = 'r' -- not indices
, views, etc
and relname !~ '^pg_' -- not catalogs
and relname !~ '^pg_' -- not catalogs
and relname !~ '^Inv' -- not large objects
ORDER BY relname;
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)
-- of several attributes)
--
--
SELECT bc.relname AS class_name,
SELECT bc.relname AS class_name,
...
@@ -57,7 +57,6 @@ SELECT c.relname, a.attname, t.typname
...
@@ -57,7 +57,6 @@ SELECT c.relname, a.attname, t.typname
FROM pg_class c, pg_attribute a, pg_type t
FROM pg_class c, pg_attribute a, pg_type t
WHERE c.relkind = 'r' -- no indices
WHERE c.relkind = 'r' -- no indices
and c.relname !~ '^pg_' -- no catalogs
and c.relname !~ '^pg_' -- no catalogs
and c.relname !~ '^Inv' -- no large objects
and a.attnum > 0 -- no system att's
and a.attnum > 0 -- no system att's
and a.attrelid = c.oid
and a.attrelid = c.oid
and a.atttypid = t.oid
and a.atttypid = t.oid
...
@@ -69,7 +68,7 @@ SELECT c.relname, a.attname, t.typname
...
@@ -69,7 +68,7 @@ SELECT c.relname, a.attname, t.typname
--
--
SELECT u.usename, t.typname
SELECT u.usename, t.typname
FROM pg_type t, pg_user u
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.typrelid = '0'::oid -- no complex types
and t.typelem = '0'::oid -- no arrays
and t.typelem = '0'::oid -- no arrays
and u.usename <> 'postgres'
and u.usename <> 'postgres'
...
@@ -147,5 +146,3 @@ SELECT am.amname, opc.opcname, opr.oprname
...
@@ -147,5 +146,3 @@ SELECT am.amname, opc.opcname, opr.oprname
and amop.amopclaid = opc.oid
and amop.amopclaid = opc.oid
and amop.amopopr = opr.oid
and amop.amopopr = opr.oid
ORDER BY amname, opcname, oprname;
ORDER BY amname, opcname, oprname;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment