55 * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
66 * Portions Copyright (c) 1994, Regents of the University of California
77 *
8- * $PostgreSQL: pgsql/src/bin/scripts/createdb.c,v 1.11 2004/06/03 00:07:38 momjian Exp $
8+ * $PostgreSQL: pgsql/src/bin/scripts/createdb.c,v 1.12 2004/06/18 21:47:24 tgl Exp $
99 *
1010 *-------------------------------------------------------------------------
1111 */
@@ -31,7 +31,7 @@ main(int argc, char *argv[])
3131{"echo" ,no_argument ,NULL ,'e' },
3232{"quiet" ,no_argument ,NULL ,'q' },
3333{"owner" ,required_argument ,NULL ,'O' },
34- {"location " ,required_argument ,NULL ,'D' },
34+ {"tablespace " ,required_argument ,NULL ,'D' },
3535{"template" ,required_argument ,NULL ,'T' },
3636{"encoding" ,required_argument ,NULL ,'E' },
3737{NULL ,0 ,NULL ,0 }
@@ -50,7 +50,7 @@ main(int argc, char *argv[])
5050bool echo = false;
5151bool quiet = false;
5252char * owner = NULL ;
53- char * location = NULL ;
53+ char * tablespace = NULL ;
5454char * template = NULL ;
5555char * encoding = NULL ;
5656
@@ -90,7 +90,7 @@ main(int argc, char *argv[])
9090owner = optarg ;
9191break ;
9292case 'D' :
93- location = optarg ;
93+ tablespace = optarg ;
9494break ;
9595case 'T' :
9696template = optarg ;
@@ -149,11 +149,8 @@ main(int argc, char *argv[])
149149
150150if (owner )
151151appendPQExpBuffer (& sql ," OWNER %s" ,fmtId (owner ));
152- if (location )
153- {
154- appendPQExpBuffer (& sql ," LOCATION " );
155- appendStringLiteral (& sql ,location , false);
156- }
152+ if (tablespace )
153+ appendPQExpBuffer (& sql ," TABLESPACE %s" ,fmtId (tablespace ));
157154if (encoding )
158155appendPQExpBuffer (& sql ," ENCODING '%s'" ,encoding );
159156if (template )
@@ -221,19 +218,19 @@ help(const char *progname)
221218printf (_ ("Usage:\n" ));
222219printf (_ (" %s [OPTION]... [DBNAME] [DESCRIPTION]\n" ),progname );
223220printf (_ ("\nOptions:\n" ));
224- printf (_ (" -D, --location=PATH alternative place to store the database\n" ));
225- printf (_ (" -E, --encoding=ENCODING encoding for the database\n" ));
226- printf (_ (" -O, --owner=OWNER database user to own the new database\n" ));
227- printf (_ (" -T, --template=TEMPLATE template database to copy\n" ));
228- printf (_ (" -e, --echo show the commands being sent to the server\n" ));
229- printf (_ (" -q, --quiet don't write any messages\n" ));
230- printf (_ (" --help show this help, then exit\n" ));
231- printf (_ (" --version output version information, then exit\n" ));
221+ printf (_ (" -D, --tablespace=TABLESPACE default tablespace for the database\n" ));
222+ printf (_ (" -E, --encoding=ENCODING encoding for the database\n" ));
223+ printf (_ (" -O, --owner=OWNER database user to own the new database\n" ));
224+ printf (_ (" -T, --template=TEMPLATE template database to copy\n" ));
225+ printf (_ (" -e, --echo show the commands being sent to the server\n" ));
226+ printf (_ (" -q, --quiet don't write any messages\n" ));
227+ printf (_ (" --help show this help, then exit\n" ));
228+ printf (_ (" --version output version information, then exit\n" ));
232229printf (_ ("\nConnection options:\n" ));
233- printf (_ (" -h, --host=HOSTNAME database server host or socket directory\n" ));
234- printf (_ (" -p, --port=PORT database server port\n" ));
235- printf (_ (" -U, --username=USERNAME user name to connect as\n" ));
236- printf (_ (" -W, --password prompt for password\n" ));
230+ printf (_ (" -h, --host=HOSTNAME database server host or socket directory\n" ));
231+ printf (_ (" -p, --port=PORT database server port\n" ));
232+ printf (_ (" -U, --username=USERNAME user name to connect as\n" ));
233+ printf (_ (" -W, --password prompt for password\n" ));
237234printf (_ ("\nBy default, a database with the same name as the current user is created.\n" ));
238235printf (_ ("\nReport bugs to <pgsql-bugs@postgresql.org>.\n" ));
239236}