From 583a472f7b02b0d2b99462addff060eb551465cf Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sun, 21 May 2006 19:56:41 +0000 Subject: Change \' to '', for SQL standards compliance. Backpatch to 7.3, 7.4, and 8.0. Later releases already patched. --- src/bin/scripts/createdb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/bin/scripts/createdb') 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 -- cgit v1.2.3