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
6b0e1666
Commit
6b0e1666
authored
Oct 16, 2002
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve appearance of SET command.
parent
5d8c6746
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
20 additions
and
20 deletions
+20
-20
src/bin/scripts/clusterdb
src/bin/scripts/clusterdb
+2
-2
src/bin/scripts/createdb
src/bin/scripts/createdb
+3
-3
src/bin/scripts/createlang.sh
src/bin/scripts/createlang.sh
+4
-4
src/bin/scripts/createuser
src/bin/scripts/createuser
+2
-2
src/bin/scripts/dropdb
src/bin/scripts/dropdb
+2
-2
src/bin/scripts/droplang
src/bin/scripts/droplang
+3
-3
src/bin/scripts/dropuser
src/bin/scripts/dropuser
+2
-2
src/bin/scripts/vacuumdb
src/bin/scripts/vacuumdb
+2
-2
No files found.
src/bin/scripts/clusterdb
View file @
6b0e1666
...
...
@@ -11,7 +11,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/clusterdb,v 1.
5 2002/10/16 03:24:09
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/clusterdb,v 1.
6 2002/10/16 03:44:28
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -176,7 +176,7 @@ do
idx
=
`
echo
$tabs
|
cut
-d
:
-f3
`
query
=
"
$query
CLUSTER
$idx
ON
$nspc
.
$tab
;"
done
${
PATHNAME
}
psql
$PSQLOPT
$ECHOOPT
-c
"SET autocommit
=
'on';
$query
"
-d
$db
${
PATHNAME
}
psql
$PSQLOPT
$ECHOOPT
-c
"SET autocommit
TO
'on';
$query
"
-d
$db
if
[
"
$?
"
-ne
0
]
then
echo
"
$CMDNAME
: While clustering
$db
, the following failed:
$query
"
1>&2
...
...
src/bin/scripts/createdb
View file @
6b0e1666
...
...
@@ -12,7 +12,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.2
6 2002/10/16 03:24:09
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.2
7 2002/10/16 03:44:28
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -189,7 +189,7 @@ withstring=
[
"
$TEMPLATE
"
]
&&
withstring
=
"
$withstring
TEMPLATE =
\"
$TEMPLATE
\"
"
[
"
$withstring
"
]
&&
withstring
=
" WITH
$withstring
"
${
PATHNAME
}
psql
$PSQLOPT
-d
template1
-c
"SET autocommit
=
'on';CREATE DATABASE
\"
$dbname
\"
$withstring
"
${
PATHNAME
}
psql
$PSQLOPT
-d
template1
-c
"SET autocommit
TO
'on';CREATE DATABASE
\"
$dbname
\"
$withstring
"
if
[
"
$?
"
-ne
0
]
;
then
echo
"
$CMDNAME
: database creation failed"
1>&2
exit
1
...
...
@@ -200,7 +200,7 @@ fi
dbcomment
=
`
echo
"
$dbcomment
"
|
sed
"s/'/
\\\\\'
/g"
`
${
PATHNAME
}
psql
$PSQLOPT
-d
"
$dbname
"
-c
"SET autocommit
=
'on';COMMENT ON DATABASE
\"
$dbname
\"
IS '
$dbcomment
'"
${
PATHNAME
}
psql
$PSQLOPT
-d
"
$dbname
"
-c
"SET autocommit
TO
'on';COMMENT ON DATABASE
\"
$dbname
\"
IS '
$dbcomment
'"
if
[
"
$?
"
-ne
0
]
;
then
echo
"
$CMDNAME
: comment creation failed (database was created)"
1>&2
exit
1
...
...
src/bin/scripts/createlang.sh
View file @
6b0e1666
...
...
@@ -7,7 +7,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/scripts/Attic/createlang.sh,v 1.4
0 2002/10/16 03:24:09
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.4
1 2002/10/16 03:44:28
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -270,7 +270,7 @@ fi
# Create the call handler and the language
# ----------
if
[
"
$handlerexists
"
=
no
]
;
then
sqlcmd
=
"SET autocommit
=
'on';CREATE FUNCTION
\"
$handler
\"
() RETURNS LANGUAGE_HANDLER AS '
$PGLIB
/
${
object
}
' LANGUAGE C;"
sqlcmd
=
"SET autocommit
TO
'on';CREATE FUNCTION
\"
$handler
\"
() RETURNS LANGUAGE_HANDLER AS '
$PGLIB
/
${
object
}
' LANGUAGE C;"
if
[
"
$showsql
"
=
yes
]
;
then
echo
"
$sqlcmd
"
fi
...
...
@@ -281,7 +281,7 @@ if [ "$handlerexists" = no ]; then
fi
fi
sqlcmd
=
"SET autocommit
=
'on';CREATE
${
trusted
}
LANGUAGE
\"
$langname
\"
HANDLER
\"
$handler
\"
;"
sqlcmd
=
"SET autocommit
TO
'on';CREATE
${
trusted
}
LANGUAGE
\"
$langname
\"
HANDLER
\"
$handler
\"
;"
if
[
"
$showsql
"
=
yes
]
;
then
echo
"
$sqlcmd
"
fi
...
...
@@ -297,7 +297,7 @@ fi
# seems best to disable public USAGE for an untrusted one.
# ----------
if
test
-z
"
$trusted
"
;
then
sqlcmd
=
"SET autocommit
=
'on';REVOKE ALL ON LANGUAGE
\"
$langname
\"
FROM PUBLIC;"
sqlcmd
=
"SET autocommit
TO
'on';REVOKE ALL ON LANGUAGE
\"
$langname
\"
FROM PUBLIC;"
if
[
"
$showsql
"
=
yes
]
;
then
echo
"
$sqlcmd
"
fi
...
...
src/bin/scripts/createuser
View file @
6b0e1666
...
...
@@ -9,7 +9,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.2
7 2002/10/16 03:24:09
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.2
8 2002/10/16 03:44:28
momjian Exp $
#
# Note - this should NOT be setuid.
#
...
...
@@ -253,7 +253,7 @@ SUBQUERY=
[
"
$CanAddUser
"
=
t
]
&&
QUERY
=
"
$QUERY
CREATEUSER"
[
"
$CanAddUser
"
=
f
]
&&
QUERY
=
"
$QUERY
NOCREATEUSER"
${
PATHNAME
}
psql
-c
"SET autocommit
=
'on';
$QUERY
"
-d
template1
$PSQLOPT
${
PATHNAME
}
psql
-c
"SET autocommit
TO
'on';
$QUERY
"
-d
template1
$PSQLOPT
if
[
"
$?
"
-ne
0
]
;
then
echo
"
$CMDNAME
: creation of user
\"
$NewUser
\"
failed"
1>&2
exit
1
...
...
src/bin/scripts/dropdb
View file @
6b0e1666
...
...
@@ -11,7 +11,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropdb,v 1.1
7 2002/10/16 03:24:09
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropdb,v 1.1
8 2002/10/16 03:44:28
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -138,7 +138,7 @@ fi
dbname
=
`
echo
"
$dbname
"
|
sed
's/\"/\\\"/g'
`
${
PATHNAME
}
psql
$PSQLOPT
-d
template1
-c
"SET autocommit
=
'on';DROP DATABASE
\"
$dbname
\"
"
${
PATHNAME
}
psql
$PSQLOPT
-d
template1
-c
"SET autocommit
TO
'on';DROP DATABASE
\"
$dbname
\"
"
if
[
"
$?
"
-ne
0
]
;
then
echo
"
$CMDNAME
: database removal failed"
1>&2
exit
1
...
...
src/bin/scripts/droplang
View file @
6b0e1666
...
...
@@ -7,7 +7,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/scripts/Attic/droplang,v 1.2
5 2002/10/16 03:24:09
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/droplang,v 1.2
6 2002/10/16 03:44:28
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -229,7 +229,7 @@ fi
# ----------
# Drop the language
# ----------
sqlcmd
=
"SET autocommit
=
'on';DROP LANGUAGE
\"
$langname
\"
;"
sqlcmd
=
"SET autocommit
TO
'on';DROP LANGUAGE
\"
$langname
\"
;"
if
[
"
$showsql
"
=
yes
]
;
then
echo
"
$sqlcmd
"
fi
...
...
@@ -256,7 +256,7 @@ if [ "$?" -ne 0 ]; then
exit
1
fi
sqlcmd
=
"SET autocommit
=
'on';DROP FUNCTION
\"
$handler
\"
();"
sqlcmd
=
"SET autocommit
TO
'on';DROP FUNCTION
\"
$handler
\"
();"
if
[
"
$showsql
"
=
yes
]
;
then
echo
"
$sqlcmd
"
fi
...
...
src/bin/scripts/dropuser
View file @
6b0e1666
...
...
@@ -9,7 +9,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropuser,v 1.
19 2002/10/16 03:24:09
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropuser,v 1.
20 2002/10/16 03:44:28
momjian Exp $
#
# Note - this should NOT be setuid.
#
...
...
@@ -148,7 +148,7 @@ fi
DelUser
=
`
echo
"
$DelUser
"
|
sed
's/\"/\\\"/g'
`
${
PATHNAME
}
psql
$PSQLOPT
-d
template1
-c
"SET autocommit
=
'on';DROP USER
\"
$DelUser
\"
"
${
PATHNAME
}
psql
$PSQLOPT
-d
template1
-c
"SET autocommit
TO
'on';DROP USER
\"
$DelUser
\"
"
if
[
"
$?
"
-ne
0
]
;
then
echo
"
$CMDNAME
: deletion of user
\"
$DelUser
\"
failed"
1>&2
...
...
src/bin/scripts/vacuumdb
View file @
6b0e1666
...
...
@@ -12,7 +12,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.2
4 2002/10/16 03:24:09
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.2
5 2002/10/16 03:44:28
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -169,7 +169,7 @@ fi
for
db
in
$dbname
do
[
"
$alldb
"
-a
"
$quiet
"
-ne
1
]
&&
echo
"Vacuuming
$db
"
${
PATHNAME
}
psql
$PSQLOPT
$ECHOOPT
-c
"SET autocommit
=
'on';VACUUM
$full
$verbose
$analyze
$table
"
-d
$db
${
PATHNAME
}
psql
$PSQLOPT
$ECHOOPT
-c
"SET autocommit
TO
'on';VACUUM
$full
$verbose
$analyze
$table
"
-d
$db
if
[
"
$?
"
-ne
0
]
;
then
echo
"
$CMDNAME
: vacuum
$table
$db
failed"
1>&2
exit
1
...
...
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