echo" -U, --username=USERNAME Username to connect as"
echo" -U, --username=USERNAME Username to connect as"
echo" -W, --password Prompt for password"
echo" -W, --password Prompt for password"
echo" -d, --dbname=DBNAME Database to install language in"
echo" -d, --dbname=DBNAME Database to install language in"
echo" -e, --echo Create some output about what is happening"
echo" -L, --pglib=PGLIB Find language interpreter in directory PGLIB"
echo" -L, --pglib=PGLIB Find language interpreter in directory PGLIB"
echo" -l, --list Show a list of currently installed languages"
echo" -l, --list Show a list of currently installed languages"
echo
echo"Report bugs to <pgsql-bugs@postgresql.org>."
exit 0
exit 0
fi
fi
if["$list"];then
psql $PSQLOPT-d"$dbname"-c"SELECT lanname, lanpltrusted, lancompiler FROM pg_language WHERE lanispl = 't'"
exit$?
fi
# ----------
# ----------
# Check that we have a database
# Check that we have a database
...
@@ -153,6 +143,15 @@ if [ -z "$dbname" ]; then
...
@@ -153,6 +143,15 @@ if [ -z "$dbname" ]; then
fi
fi
# ----------
# List option
# ----------
if["$list"];then
${PATHNAME}psql $PSQLOPT-d"$dbname"-P'title=Procedural languages'-c"SELECT lanname as \"Name\", lanpltrusted as \"Trusted?\", lancompiler as \"Compiler\" FROM pg_language WHERE lanispl = 't'"
exit$?
fi
# ----------
# ----------
# Check that we have PGLIB
# Check that we have PGLIB
# ----------
# ----------
...
@@ -210,13 +209,7 @@ if [ ! -f $PGLIB/${langname}__DLSUFFIX__ ]; then
...
@@ -210,13 +209,7 @@ if [ ! -f $PGLIB/${langname}__DLSUFFIX__ ]; then
fi
fi
if["$echo"];then
PSQL="${PATHNAME}psql -A -t -q $PSQLOPT -d $dbname -c"
echo" -U, --username=USERNAME Username to connect as"
echo" -U, --username=USERNAME Username to connect as"
echo" -W, --password Prompt for password"
echo" -W, --password Prompt for password"
echo" -d, --dbname=DBNAME Database to remove language from"
echo" -d, --dbname=DBNAME Database to remove language from"
echo" -e, --echo Create some output about what is happening"
echo" -l, --list Show a list of currently installed languages"
echo" -l, --list Show a list of currently installed languages"
echo
echo"Report bugs to <pgsql-bugs@postgresql.org>."
exit 0
exit 0
fi
fi
if["$list"];then
if["$list"];then
psql $PSQLOPT-d"$dbname"-c"SELECT lanname, lanpltrusted, lancompiler FROM pg_language WHERE lanispl = 't'"
${PATHNAME}psql $PSQLOPT-d"$dbname"-P'title=Procedural languages'-c"SELECT lanname as \"Name\", lanpltrusted as \"Trusted?\", lancompiler as \"Compiler\" FROM pg_language WHERE lanispl = 't'"
exit$?
exit$?
fi
fi
...
@@ -171,13 +167,7 @@ case "$langname" in
...
@@ -171,13 +167,7 @@ case "$langname" in
esac
esac
if["$echo"];then
PSQL="${PATHNAME}psql -A -t -q $PSQLOPT -d $dbname -c"