1--- postgresql-9.0.2/src/bin/initdb/initdb.c	2010-12-13 18:55:50.000000000 -0800
2+++ postgresql/src/bin/initdb/initdb.c	2010-12-22 14:47:10.000000000 -0800
3@@ -3132,6 +3132,36 @@
4 	strcpy(bin_dir, argv[0]);
5 	get_parent_directory(bin_dir);
6 
7+#ifdef AC_APPLE_UNIVERSAL_BUILD
8+	/* If the effective user id is _postgres (uid 216), and a Mac OS X-default
9+	 * location is used, suggest serveradmin.
10+	 */
11+	if ((geteuid() == 216)
12+		&& (!strcmp(pg_data_native, "/var/pgsql")
13+			|| !strcmp(pg_data_native, "/Library/Server/PostgreSQL/Data")))
14+	{
15+		printf(_("\nSuccess. Since you appear to be using the default database,\n"
16+			 "the system-wide instance of postgres will be launched on-demand by\n"
17+			 "the various services which use it.\n\n"
18+			 "If necessary, you can now start the database server using:\n\n"
19+			 "    serveradmin start postgres\n\n"
20+			 "See webappctl(8) to learn how to launch postgres on-demand for\n"
21+			 "your web application.\n"));
22+	}
23+	else
24+	{
25+		printf(_("\nSuccess. You can now start the database server using:\n\n"
26+				 "    %s%s%spostgres%s -D %s%s%s -k %s%s%s\n"
27+				 "or\n"
28+				 "    %s%s%spg_ctl%s -D %s%s%s -l logfile -o \"-k %s%s%s\" start\n\n"),
29+		   QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH,
30+			   QUOTE_PATH, pg_data_native, QUOTE_PATH,
31+			   QUOTE_PATH, pg_data_native, QUOTE_PATH,
32+		   QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH,
33+			   QUOTE_PATH, pg_data_native, QUOTE_PATH,
34+			   QUOTE_PATH, pg_data_native, QUOTE_PATH);
35+	}
36+#else	/* AC_APPLE_UNIVERSAL_BUILD */
37 	printf(_("\nSuccess. You can now start the database server using:\n\n"
38 			 "    %s%s%spostgres%s -D %s%s%s\n"
39 			 "or\n"
40@@ -3140,6 +3170,7 @@
41 		   QUOTE_PATH, pg_data_native, QUOTE_PATH,
42 	   QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH,
43 		   QUOTE_PATH, pg_data_native, QUOTE_PATH);
44+#endif	/* AC_APPLE_UNIVERSAL_BUILD */
45 
46 	return 0;
47 }
48