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
12fc3307
Commit
12fc3307
authored
Nov 16, 1997
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New \dS psql command. initdb cleanup.
parent
1c32d285
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
37 deletions
+34
-37
src/bin/initdb/initdb.sh
src/bin/initdb/initdb.sh
+7
-3
src/bin/psql/psql.c
src/bin/psql/psql.c
+19
-10
src/include/catalog/pg_attribute.h
src/include/catalog/pg_attribute.h
+1
-14
src/include/catalog/pg_class.h
src/include/catalog/pg_class.h
+1
-4
src/include/catalog/pg_description.h
src/include/catalog/pg_description.h
+2
-2
src/include/catalog/pg_type.h
src/include/catalog/pg_type.h
+1
-3
src/man/psql.1
src/man/psql.1
+3
-1
No files found.
src/bin/initdb/initdb.sh
View file @
12fc3307
...
...
@@ -26,7 +26,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.2
8 1997/11/15 20:57:30
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.2
9 1997/11/16 04:36:14
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -346,10 +346,14 @@ fi
echo
# If the COPY is first, the VACUUM generates an error, so we vacuum first
echo
"vacuuming template1"
echo
"vacuum"
| postgres
-F
-Q
-D
$PGDATA
template1 2>&1
>
/dev/null |
\
grep
-v
"^DEBUG:"
echo
"loading pg_description"
echo
"copy pg_description from '
$TEMPLATE_DESCR
'"
| postgres
-F
-Q
-D
$PGDATA
template1
>
/dev/null
echo
"copy pg_description from '
$GLOBAL_DESCR
'"
| postgres
-F
-Q
-D
$PGDATA
template1
>
/dev/null
echo
"vacuuming template1"
echo
"vacuum analyze"
| postgres
-F
-Q
-D
$PGDATA
template1 2>&1
>
/dev/null |
\
grep
-v
"^DEBUG:"
src/bin/psql/psql.c
View file @
12fc3307
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.10
6 1997/11/15 16:32:03
momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.10
7 1997/11/16 04:36:20
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -114,7 +114,8 @@ static void handleCopyOut(PGresult *res, bool quiet, FILE *copystream);
static
void
handleCopyIn
(
PGresult
*
res
,
const
bool
mustprompt
,
FILE
*
copystream
);
static
int
tableList
(
PsqlSettings
*
pset
,
bool
deep_tablelist
,
char
info_type
);
static
int
tableList
(
PsqlSettings
*
pset
,
bool
deep_tablelist
,
char
info_type
,
bool
system_tables
);
static
int
tableDesc
(
PsqlSettings
*
pset
,
char
*
table
,
FILE
*
fout
);
static
int
objectDescription
(
PsqlSettings
*
pset
,
char
*
object
,
FILE
*
fout
);
static
int
rightsList
(
PsqlSettings
*
pset
);
...
...
@@ -223,6 +224,7 @@ slashUsage(PsqlSettings *pset)
fprintf
(
fout
,
"
\\
di -- list only indices
\n
"
);
fprintf
(
fout
,
"
\\
do -- list operators
\n
"
);
fprintf
(
fout
,
"
\\
ds -- list only sequences
\n
"
);
fprintf
(
fout
,
"
\\
dS -- list system tables and indexes
\n
"
);
fprintf
(
fout
,
"
\\
dt -- list only tables
\n
"
);
fprintf
(
fout
,
"
\\
dT -- list types
\n
"
);
fprintf
(
fout
,
"
\\
e [<fname>] -- edit the current query buffer or <fname>
\n
"
);
...
...
@@ -303,7 +305,8 @@ listAllDbs(PsqlSettings *pset)
*
*/
int
tableList
(
PsqlSettings
*
pset
,
bool
deep_tablelist
,
char
info_type
)
tableList
(
PsqlSettings
*
pset
,
bool
deep_tablelist
,
char
info_type
,
bool
system_tables
)
{
char
listbuf
[
256
];
int
nColumns
;
...
...
@@ -347,7 +350,10 @@ tableList(PsqlSettings *pset, bool deep_tablelist, char info_type)
strcat
(
listbuf
,
"WHERE ( relkind = 'r' OR relkind = 'i' OR relkind = 'S') "
);
break
;
}
strcat
(
listbuf
,
" and relname !~ '^pg_'"
);
if
(
!
system_tables
)
strcat
(
listbuf
,
" and relname !~ '^pg_'"
);
else
strcat
(
listbuf
,
" and relname ~ '^pg_'"
);
strcat
(
listbuf
,
" and relname !~ '^xin[vx][0-9]+'"
);
/*
...
...
@@ -1708,7 +1714,7 @@ HandleSlashCmds(PsqlSettings *pset,
false
,
false
,
0
);
else
if
(
strncmp
(
cmd
,
"di"
,
2
)
==
0
)
/* only indices */
tableList
(
pset
,
false
,
'i'
);
tableList
(
pset
,
false
,
'i'
,
false
);
else
if
(
strncmp
(
cmd
,
"do"
,
2
)
==
0
)
{
/* operators */
...
...
@@ -1754,10 +1760,13 @@ HandleSlashCmds(PsqlSettings *pset,
}
else
if
(
strncmp
(
cmd
,
"ds"
,
2
)
==
0
)
/* only sequences */
tableList
(
pset
,
false
,
'S'
);
tableList
(
pset
,
false
,
'S'
,
false
);
else
if
(
strncmp
(
cmd
,
"dS"
,
2
)
==
0
)
/* system tables */
tableList
(
pset
,
false
,
'b'
,
true
);
else
if
(
strncmp
(
cmd
,
"dt"
,
2
)
==
0
)
/* only tables */
tableList
(
pset
,
false
,
't'
);
tableList
(
pset
,
false
,
't'
,
false
);
else
if
(
strncmp
(
cmd
,
"dT"
,
2
)
==
0
)
/* types */
SendQuery
(
&
success
,
pset
,
"\
...
...
@@ -1770,11 +1779,11 @@ HandleSlashCmds(PsqlSettings *pset,
false
,
false
,
0
);
else
if
(
!
optarg
)
/* show tables, sequences and indices */
tableList
(
pset
,
false
,
'b'
);
tableList
(
pset
,
false
,
'b'
,
false
);
else
if
(
strcmp
(
optarg
,
"*"
)
==
0
)
{
/* show everything */
if
(
tableList
(
pset
,
false
,
'b'
)
==
0
)
tableList
(
pset
,
true
,
'b'
);
if
(
tableList
(
pset
,
false
,
'b'
,
false
)
==
0
)
tableList
(
pset
,
true
,
'b'
,
false
);
}
else
if
(
strncmp
(
cmd
,
"d "
,
2
)
==
0
)
/* describe the specified table */
...
...
src/include/catalog/pg_attribute.h
View file @
12fc3307
...
...
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_attribute.h,v 1.1
8 1997/11/15 20:57:40
momjian Exp $
* $Id: pg_attribute.h,v 1.1
9 1997/11/16 04:36:32
momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
...
...
@@ -226,19 +226,6 @@ DATA(insert OID = 0 ( 1262 cmin 29 0 4 -4 0 -1 t f i f f));
DATA
(
insert
OID
=
0
(
1262
xmax
28
0
4
-
5
0
-
1
f
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1262
cmax
29
0
4
-
6
0
-
1
t
f
i
f
f
));
/* ----------------
* pg_description
* ----------------
*/
DATA
(
insert
OID
=
0
(
1251
objoid
26
0
4
1
0
-
1
t
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1251
description
25
0
-
1
2
0
-
1
f
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1251
ctid
27
0
6
-
1
0
-
1
f
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1251
oid
26
0
4
-
2
0
-
1
t
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1251
xmin
28
0
4
-
3
0
-
1
f
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1251
cmin
29
0
4
-
4
0
-
1
t
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1251
xmax
28
0
4
-
5
0
-
1
f
f
i
f
f
));
DATA
(
insert
OID
=
0
(
1251
cmax
29
0
4
-
6
0
-
1
t
f
i
f
f
));
/* ----------------
* pg_proc
* ----------------
...
...
src/include/catalog/pg_class.h
View file @
12fc3307
...
...
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_class.h,v 1.1
4 1997/11/15 20:57:41
momjian Exp $
* $Id: pg_class.h,v 1.1
5 1997/11/16 04:36:38
momjian Exp $
*
* NOTES
* ``pg_relation'' is being replaced by ``pg_class''. currently
...
...
@@ -132,8 +132,6 @@ DATA(insert OID = 1247 ( pg_type 71 PGUID 0 0 0 0 0 f f r n 16 0 0 0 f _null
DESCR
(
""
);
DATA
(
insert
OID
=
1249
(
pg_attribute
75
PGUID
0
0
0
0
0
f
f
r
n
16
0
0
0
f
_null_
));
DESCR
(
""
);
DATA
(
insert
OID
=
1251
(
pg_description
76
PGUID
0
0
0
0
0
f
t
r
n
2
0
0
0
f
_null_
));
DESCR
(
""
);
DATA
(
insert
OID
=
1255
(
pg_proc
81
PGUID
0
0
0
0
0
f
f
r
n
16
0
0
0
f
_null_
));
DESCR
(
""
);
DATA
(
insert
OID
=
1259
(
pg_class
83
PGUID
0
0
0
0
0
f
f
r
n
18
0
0
0
f
_null_
));
...
...
@@ -156,7 +154,6 @@ DATA(insert OID = 1219 ( pg_trigger 111 PGUID 0 0 0 0 0 t t r n 7 0 0 0 f _nu
DESCR
(
""
);
#define RelOid_pg_type 1247
#define RelOid_pg_description 1251
#define RelOid_pg_attribute 1249
#define RelOid_pg_proc 1255
#define RelOid_pg_class 1259
...
...
src/include/catalog/pg_description.h
View file @
12fc3307
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_description.h,v 1.
3 1997/11/15 20:57:48
momjian Exp $
* $Id: pg_description.h,v 1.
4 1997/11/16 04:36:41
momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
...
...
@@ -32,7 +32,7 @@
* typedef struct FormData_pg_description
* ----------------
*/
CATALOG
(
pg_description
)
BOOTSTRAP
CATALOG
(
pg_description
)
{
Oid
objoid
;
text
description
;
...
...
src/include/catalog/pg_type.h
View file @
12fc3307
...
...
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_type.h,v 1.2
2 1997/11/15 20:58:05
momjian Exp $
* $Id: pg_type.h,v 1.2
3 1997/11/16 04:36:43
momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
...
...
@@ -210,8 +210,6 @@ DATA(insert OID = 71 ( pg_type PGUID 1 1 t b t \054 1247 0 foo bar foo bar c _
DESCR
(
""
);
DATA
(
insert
OID
=
75
(
pg_attribute
PGUID
1
1
t
b
t
\
054
1249
0
foo
bar
foo
bar
c
_null_
));
DESCR
(
""
);
DATA
(
insert
OID
=
76
(
pg_description
PGUID
1
1
t
b
t
\
054
1251
0
foo
bar
foo
bar
c
_null_
));
DESCR
(
""
);
DATA
(
insert
OID
=
81
(
pg_proc
PGUID
1
1
t
b
t
\
054
1255
0
foo
bar
foo
bar
c
_null_
));
DESCR
(
""
);
DATA
(
insert
OID
=
83
(
pg_class
PGUID
1
1
t
b
t
\
054
1259
0
foo
bar
foo
bar
c
_null_
));
...
...
src/man/psql.1
View file @
12fc3307
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/psql.1,v 1.1
7 1997/11/15 16:32:25
momjian Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/psql.1,v 1.1
8 1997/11/16 04:36:52
momjian Exp $
.TH PSQL UNIX 1/20/96 PostgreSQL PostgreSQL
.SH NAME
psql \(em run the interactive query front-end
...
...
@@ -304,6 +304,8 @@ List only indexes.
List operators.
.IP "\eds"
List only sequences.
.IP "\edS"
List system tables and indexes.
.IP "\edt"
List only tables.
.IP "\edT"
...
...
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