echo"$CMDNAME installs a procedural language into a PostgreSQL database."
echo
echo"Usage:"
echo" $CMDNAME [options] [langname [dbname]]"
echo
echo"Options:"
echo" -h, --host=HOSTNAME Database server host"
echo" -p, --port=PORT Database server port"
echo" -U, --username=USERNAME Username to connect as"
echo" -W, --password Prompt for password"
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, --list Show a list of currently installed languages"
echo
echo"Report bugs to <pgsql-bugs@postgresql.org>."
exit 0
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
...
...
@@ -153,6 +143,15 @@ if [ -z "$dbname" ]; then
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
# ----------
...
...
@@ -210,13 +209,7 @@ if [ ! -f $PGLIB/${langname}__DLSUFFIX__ ]; then
fi
if["$echo"];then
PSQLOPT="$PSQLOPT -e"
else
PSQLOPT="$PSQLOPT -q"
fi
PSQL="psql -A -t $PSQLOPT -d $dbname -c"
PSQL="${PATHNAME}psql -A -t -q $PSQLOPT -d $dbname -c"
echo"$CMDNAME removes a procedural language from a database."
echo
echo"Usage:"
echo" $CMDNAME [options] [langname [dbname]]"
echo
echo"Options:"
echo" -h, --host=HOSTNAME Database server host"
echo" -p, --port=PORT Database server port"
echo" -U, --username=USERNAME Username to connect as"
echo" -W, --password Prompt for password"
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
echo"Report bugs to <pgsql-bugs@postgresql.org>."
exit 0
fi
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$?
fi
...
...
@@ -171,13 +167,7 @@ case "$langname" in
esac
if["$echo"];then
PSQLOPT="$PSQLOPT -e"
else
PSQLOPT="$PSQLOPT -q"
fi
PSQL="psql -A -t $PSQLOPT -d $dbname -c"
PSQL="${PATHNAME}psql -A -t -q $PSQLOPT -d $dbname -c"