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
a4ee277e
Commit
a4ee277e
authored
Jan 03, 2002
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
droplang had same problem as createlang; default are backwards and did
not work. Fixed to match createlang.
parent
f9b792c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
23 deletions
+23
-23
doc/src/sgml/ref/droplang.sgml
doc/src/sgml/ref/droplang.sgml
+5
-6
src/bin/scripts/droplang
src/bin/scripts/droplang
+18
-17
No files found.
doc/src/sgml/ref/droplang.sgml
View file @
a4ee277e
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/droplang.sgml,v 1.1
5 2001/12/08 03:24:36 thomas
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/droplang.sgml,v 1.1
6 2002/01/03 06:09:01 momjian
Exp $
PostgreSQL documentation
PostgreSQL documentation
-->
-->
...
@@ -23,8 +23,8 @@ PostgreSQL documentation
...
@@ -23,8 +23,8 @@ PostgreSQL documentation
<cmdsynopsis>
<cmdsynopsis>
<command>droplang</command>
<command>droplang</command>
<arg rep="repeat"><replaceable>connection-options</replaceable></arg>
<arg rep="repeat"><replaceable>connection-options</replaceable></arg>
<arg><replaceable>langname</replaceable></arg>
<arg
choice="plain"
><replaceable>langname</replaceable></arg>
<arg
choice="plain"
><replaceable>dbname</replaceable></arg>
<arg><replaceable>dbname</replaceable></arg>
<sbr>
<sbr>
<command>droplang</command>
<command>droplang</command>
<arg rep="repeat"><replaceable>connection-options</replaceable></arg>
<arg rep="repeat"><replaceable>connection-options</replaceable></arg>
...
@@ -45,9 +45,6 @@ PostgreSQL documentation
...
@@ -45,9 +45,6 @@ PostgreSQL documentation
<listitem>
<listitem>
<para>
<para>
Specifies the name of the backend programming language to be removed.
Specifies the name of the backend programming language to be removed.
<application>droplang</application> will prompt for
<replaceable class="parameter">langname</replaceable>
if it is not specified on the command line.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
...
@@ -57,6 +54,8 @@ PostgreSQL documentation
...
@@ -57,6 +54,8 @@ PostgreSQL documentation
<listitem>
<listitem>
<para>
<para>
Specifies from which database the language should be removed.
Specifies from which database the language should be removed.
The default is to create a database with the same name as the
current system user.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
...
...
src/bin/scripts/droplang
View file @
a4ee277e
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
# Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
# Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
# Portions Copyright (c) 1994, Regents of the University of California
#
#
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/droplang,v 1.1
8 2001/09/30 22:17:51
momjian Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/droplang,v 1.1
9 2002/01/03 06:09:02
momjian Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -111,7 +111,7 @@ if [ "$usage" ]; then
...
@@ -111,7 +111,7 @@ if [ "$usage" ]; then
echo
"
$CMDNAME
removes a procedural language from a database."
echo
"
$CMDNAME
removes a procedural language from a database."
echo
echo
echo
"Usage:"
echo
"Usage:"
echo
"
$CMDNAME
[options]
[langname [dbname]
]"
echo
"
$CMDNAME
[options]
langname [dbname
]"
echo
echo
echo
"Options:"
echo
"Options:"
echo
" -h, --host=HOSTNAME Database server host"
echo
" -h, --host=HOSTNAME Database server host"
...
@@ -121,14 +121,24 @@ if [ "$usage" ]; then
...
@@ -121,14 +121,24 @@ if [ "$usage" ]; then
echo
" -d, --dbname=DBNAME Database to remove language from"
echo
" -d, --dbname=DBNAME Database to remove language from"
echo
" -l, --list Show a list of currently installed languages"
echo
" -l, --list Show a list of currently installed languages"
echo
echo
echo
"If 'langname' is not specified, you will be prompted interactively."
echo
"A database name must be specified."
echo
echo
"Report bugs to <pgsql-bugs@postgresql.org>."
echo
"Report bugs to <pgsql-bugs@postgresql.org>."
exit
0
exit
0
fi
fi
if
[
-z
"
$dbname
"
]
;
then
if
[
"
$PGUSER
"
]
;
then
dbname
=
"
$PGUSER
"
else
dbname
=
`
${
PATHNAME
}
pg_id
-u
-n
`
fi
[
"
$?
"
-ne
0
]
&&
exit
1
fi
# ----------
# List option, doesn't need langname
# ----------
if
[
"
$list
"
]
;
then
if
[
"
$list
"
]
;
then
sqlcmd
=
"SELECT lanname as
\"
Name
\"
, lanpltrusted as
\"
Trusted?
\"
FROM pg_language WHERE lanispl = TRUE"
sqlcmd
=
"SELECT lanname as
\"
Name
\"
, lanpltrusted as
\"
Trusted?
\"
FROM pg_language WHERE lanispl = TRUE"
if
[
"
$showsql
"
=
yes
]
;
then
if
[
"
$showsql
"
=
yes
]
;
then
...
@@ -140,23 +150,14 @@ fi
...
@@ -140,23 +150,14 @@ fi
# ----------
# ----------
#
Check that we have a databas
e
#
We can't go any farther without a langnam
e
# ----------
# ----------
if
[
-z
"
$
db
name
"
]
;
then
if
[
-z
"
$
lang
name
"
]
;
then
echo
"
$CMDNAME
: missing required argument
databas
e name"
1>&2
echo
"
$CMDNAME
: missing required argument
languag
e name"
1>&2
echo
"Try '
$CMDNAME
--help' for help."
1>&2
echo
"Try '
$CMDNAME
--help' for help."
1>&2
exit
1
exit
1
fi
fi
# ----------
# If not given on the commandline, ask for the language
# ----------
if
[
-z
"
$langname
"
]
;
then
$ECHO_N
"Language to remove from database
$dbname
: "
$ECHO_C
read
langname
fi
PSQL
=
"
${
PATHNAME
}
psql -A -t -q
$PSQLOPT
-d
$dbname
-c"
PSQL
=
"
${
PATHNAME
}
psql -A -t -q
$PSQLOPT
-d
$dbname
-c"
...
...
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