summaryrefslogtreecommitdiff
path: root/src/bin/scripts
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2006-05-21 19:56:41 +0000
committerBruce Momjian <bruce@momjian.us>2006-05-21 19:56:41 +0000
commit583a472f7b02b0d2b99462addff060eb551465cf (patch)
tree9440b0310a25ef66b865957c861c6eac8e246fee /src/bin/scripts
parent506747337bc94a0f063cf36500e6cf5bc204c5be (diff)
Change \' to '', for SQL standards compliance. Backpatch to 7.3, 7.4,
and 8.0. Later releases already patched.
Diffstat (limited to 'src/bin/scripts')
-rw-r--r--src/bin/scripts/createdb6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/scripts/createdb b/src/bin/scripts/createdb
index 751de6cd223..b67e582b969 100644
--- a/src/bin/scripts/createdb
+++ b/src/bin/scripts/createdb
@@ -12,7 +12,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.28 2002/10/18 22:05:36 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.28.2.1 2006/05/21 19:56:41 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -181,7 +181,7 @@ fi
# escape the quotes
-dbpath=`echo "$dbpath" | sed "s/'/\\\\\'/g"`
+dbpath=`echo "$dbpath" | sed "s/'/\'\'/g"`
dbname=`echo "$dbname" | sed 's/\"/\\\"/g'`
TEMPLATE=`echo "$TEMPLATE" | sed 's/\"/\"\"/g'`
@@ -201,7 +201,7 @@ fi
# Insert comment as well, if requested
[ -z "$dbcomment" ] && exit 0
-dbcomment=`echo "$dbcomment" | sed "s/'/\\\\\'/g"`
+dbcomment=`echo "$dbcomment" | sed "s/'/\'\'/g"`
${PATHNAME}psql $PSQLOPT -d "$dbname" -c "SET autocommit TO 'on';COMMENT ON DATABASE \"$dbname\" IS '$dbcomment'"
if [ "$?" -ne 0 ]; then