startup.c 14.6 KB
Newer Older
P
Peter Eisentraut 已提交
1 2 3
/*
 * psql - the PostgreSQL interactive terminal
 *
4
 * Copyright (c) 2000-2003, PostgreSQL Global Development Group
P
Peter Eisentraut 已提交
5
 *
6
 * $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.92 2004/05/02 04:25:45 momjian Exp $
P
Peter Eisentraut 已提交
7
 */
8
#include "postgres_fe.h"
9 10 11

#include <sys/types.h>

12 13
#ifndef WIN32
#include <unistd.h>
B
Bruce Momjian 已提交
14
#else							/* WIN32 */
15
#include <io.h>
B
Hi!  
Bruce Momjian 已提交
16
#include <windows.h>
17
#include <win32.h>
18
#endif   /* WIN32 */
19

20
#include "getopt_long.h"
21 22

#ifndef HAVE_OPTRESET
B
Bruce Momjian 已提交
23
int			optreset;
24 25
#endif

P
Peter Eisentraut 已提交
26 27
#include <locale.h>

28
#include "libpq-fe.h"
29 30 31

#include "command.h"
#include "common.h"
32 33
#include "describe.h"
#include "help.h"
34
#include "input.h"
35
#include "mainloop.h"
36
#include "print.h"
37 38
#include "settings.h"
#include "variables.h"
39

40 41
#include "mb/pg_wchar.h"

42 43 44
/*
 * Global psql options
 */
45
PsqlSettings pset;
46

47
#define SYSPSQLRC	"psqlrc"
48
#define PSQLRC 		".psqlrc"
49

50 51
/*
 * Structures to pass information between the option parsing routine
52 53
 * and the main function
 */
B
Bruce Momjian 已提交
54 55
enum _actions
{
56 57 58 59 60
	ACT_NOTHING = 0,
	ACT_SINGLE_SLASH,
	ACT_LIST_DB,
	ACT_SINGLE_QUERY,
	ACT_FILE
61 62
};

B
Bruce Momjian 已提交
63 64 65 66 67 68 69 70 71
struct adhoc_opts
{
	char	   *dbname;
	char	   *host;
	char	   *port;
	char	   *username;
	enum _actions action;
	char	   *action_string;
	bool		no_readline;
72
	bool		no_psqlrc;
73 74
};

75
static void parse_psql_options(int argc, char *argv[],
B
Bruce Momjian 已提交
76
				   struct adhoc_opts * options);
77
static void process_psqlrc(void);
78
static void process_psqlrc_file(char *filename);
79
static void showVersion(void);
80

B
Bruce Momjian 已提交
81
#ifdef USE_SSL
82
static void printSSLInfo(void);
B
Bruce Momjian 已提交
83
#endif
84

B
> >  
Bruce Momjian 已提交
85 86 87 88
#ifdef WIN32
static void
			checkWin32Codepage(void);
#endif
89 90 91

/*
 *
92
 * main
93 94 95
 *
 */
int
96
main(int argc, char *argv[])
97
{
B
Bruce Momjian 已提交
98 99
	struct adhoc_opts options;
	int			successResult;
100

B
Bruce Momjian 已提交
101 102 103
	char	   *username = NULL;
	char	   *password = NULL;
	bool		need_pass;
104

P
Peter Eisentraut 已提交
105
	setlocale(LC_ALL, "");
106
#ifdef ENABLE_NLS
P
Peter Eisentraut 已提交
107 108 109 110
	bindtextdomain("psql", LOCALEDIR);
	textdomain("psql");
#endif

111
	pset.progname = get_progname(argv[0]);
112

113 114
	if (argc > 1)
	{
B
Bruce Momjian 已提交
115
		if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
116 117 118 119
		{
			usage();
			exit(EXIT_SUCCESS);
		}
B
Bruce Momjian 已提交
120
		if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0)
121 122 123 124
		{
			showVersion();
			exit(EXIT_SUCCESS);
		}
B
Bruce Momjian 已提交
125
	}
126

127 128 129
#ifdef WIN32
	setvbuf(stderr,NULL,_IONBF,0);
#endif
130 131
	pset.cur_cmd_source = stdin;
	pset.cur_cmd_interactive = false;
132
	pset.encoding = PQenv2encoding();
133

134
	pset.vars = CreateVariableSpace();
135 136
	if (!pset.vars)
	{
P
Peter Eisentraut 已提交
137
		fprintf(stderr, gettext("%s: out of memory\n"), pset.progname);
138 139
		exit(EXIT_FAILURE);
	}
140 141 142
	pset.popt.topt.format = PRINT_ALIGNED;
	pset.queryFout = stdout;
	pset.popt.topt.border = 1;
143
	pset.popt.topt.pager = 1;
144
	pset.popt.default_footer = true;
145

146
	SetVariable(pset.vars, "VERSION", PG_VERSION_STR);
147

148 149
	/* Default values for variables that are used in noninteractive cases */
	SetVariableBool(pset.vars, "AUTOCOMMIT");
150
	SetVariable(pset.vars, "VERBOSITY", "default");
151
	pset.verbosity = PQERRORS_DEFAULT;
152

153
	pset.notty = (!isatty(fileno(stdin)) || !isatty(fileno(stdout)));
154

155
	/* This is obsolete and should be removed sometime. */
156
#ifdef PSQL_ALWAYS_GET_PASSWORDS
157
	pset.getPassword = true;
158
#else
159
	pset.getPassword = false;
160 161
#endif

162 163 164 165 166
#ifndef HAVE_UNIX_SOCKETS
	/* default to localhost on platforms without unix sockets */
	options.host = "localhost";
#endif

167
	parse_psql_options(argc, argv, &options);
168

169
	if (!pset.popt.topt.fieldSep)
170
		pset.popt.topt.fieldSep = pg_strdup(DEFAULT_FIELD_SEP);
171
	if (!pset.popt.topt.recordSep)
172
		pset.popt.topt.recordSep = pg_strdup(DEFAULT_RECORD_SEP);
173

B
Bruce Momjian 已提交
174 175
	if (options.username)
	{
176 177 178 179 180
		/*
		 * The \001 is a hack to support the deprecated -u option which
		 * issues a username prompt. The recommended option is -U followed
		 * by the name on the command line.
		 */
181
		if (strcmp(options.username, "\001") == 0)
182
			username = simple_prompt("User name: ", 100, true);
B
Bruce Momjian 已提交
183
		else
184
			username = pg_strdup(options.username);
185 186
	}

187
	if (pset.getPassword)
B
Bruce Momjian 已提交
188
		password = simple_prompt("Password: ", 100, false);
189

B
Bruce Momjian 已提交
190 191 192 193
	/* loop until we have a password if requested by backend */
	do
	{
		need_pass = false;
194
		pset.db = PQsetdbLogin(options.host, options.port, NULL, NULL,
195 196
			options.action == ACT_LIST_DB ? "template1" : options.dbname,
							   username, password);
B
Bruce Momjian 已提交
197

198
		if (PQstatus(pset.db) == CONNECTION_BAD &&
199 200
			strcmp(PQerrorMessage(pset.db), "fe_sendauth: no password supplied\n") == 0 &&
			!feof(stdin))
B
Bruce Momjian 已提交
201
		{
202
			PQfinish(pset.db);
B
Bruce Momjian 已提交
203 204 205 206 207 208
			need_pass = true;
			free(password);
			password = NULL;
			password = simple_prompt("Password: ", 100, false);
		}
	} while (need_pass);
209

B
Bruce Momjian 已提交
210 211 212
	free(username);
	free(password);

213
	if (PQstatus(pset.db) == CONNECTION_BAD)
B
Bruce Momjian 已提交
214
	{
215
		fprintf(stderr, "%s: %s", pset.progname, PQerrorMessage(pset.db));
216
		PQfinish(pset.db);
B
Bruce Momjian 已提交
217 218 219
		exit(EXIT_BADCONN);
	}

220 221
	PQsetNoticeProcessor(pset.db, NoticeProcessor, NULL);

222
	SyncVariables();
P
Peter Eisentraut 已提交
223

B
Bruce Momjian 已提交
224 225
	if (options.action == ACT_LIST_DB)
	{
226
		int			success = listAllDbs(false);
B
Bruce Momjian 已提交
227

228
		PQfinish(pset.db);
229
		exit(success ? EXIT_SUCCESS : EXIT_FAILURE);
B
Bruce Momjian 已提交
230 231
	}

232
	/*
233 234
	 * Now find something to do
	 */
B
Bruce Momjian 已提交
235

236
	/*
237 238
	 * process file given by -f
	 */
239
	if (options.action == ACT_FILE && strcmp(options.action_string, "-") != 0)
240 241 242
	{
		if (!options.no_psqlrc)
			process_psqlrc();
243

244
		successResult = process_file(options.action_string);
245 246
	}

247
	/*
248 249
	 * process slash command if one was given to -c
	 */
B
Bruce Momjian 已提交
250
	else if (options.action == ACT_SINGLE_SLASH)
251
	{
252 253
		PsqlScanState scan_state;

254
		if (VariableEquals(pset.vars, "ECHO", "all"))
255
			puts(options.action_string);
256

257 258 259 260 261 262
		scan_state = psql_scan_create();
		psql_scan_setup(scan_state,
						options.action_string,
						strlen(options.action_string));

		successResult = HandleSlashCmds(scan_state, NULL) != CMD_ERROR
263
			? EXIT_SUCCESS : EXIT_FAILURE;
264 265

		psql_scan_destroy(scan_state);
266 267
	}

268
	/*
269 270
	 * If the query given to -c was a normal one, send it
	 */
B
Bruce Momjian 已提交
271
	else if (options.action == ACT_SINGLE_QUERY)
272
	{
273
		if (VariableEquals(pset.vars, "ECHO", "all"))
274
			puts(options.action_string);
275

276
		successResult = SendQuery(options.action_string)
277 278 279
			? EXIT_SUCCESS : EXIT_FAILURE;
	}

280
	/*
281 282
	 * or otherwise enter interactive main loop
	 */
B
Bruce Momjian 已提交
283
	else
284 285 286
	{
		if (!QUIET() && !pset.notty)
		{
287
			printf(gettext("Welcome to %s %s, the PostgreSQL interactive terminal.\n\n"
P
Peter Eisentraut 已提交
288 289
						   "Type:  \\copyright for distribution terms\n"
						   "       \\h for help with SQL commands\n"
290 291
						   "       \\? for help with psql commands\n"
						   "       \\g or terminate with semicolon to execute query\n"
P
Peter Eisentraut 已提交
292
						   "       \\q to quit\n\n"),
293
				   pset.progname, PG_VERSION);
B
Bruce Momjian 已提交
294
#ifdef USE_SSL
295
			printSSLInfo();
B
> >  
Bruce Momjian 已提交
296 297 298
#endif
#ifdef WIN32
			checkWin32Codepage();
B
Bruce Momjian 已提交
299
#endif
300 301
		}

302
		/* Default values for variables that are used in interactive case */
303 304 305
		SetVariable(pset.vars, "PROMPT1", DEFAULT_PROMPT1);
		SetVariable(pset.vars, "PROMPT2", DEFAULT_PROMPT2);
		SetVariable(pset.vars, "PROMPT3", DEFAULT_PROMPT3);
306

307 308 309 310
		if (!options.no_psqlrc)
			process_psqlrc();
		if (!pset.notty)
			initializeInput(options.no_readline ? 0 : 1);
311
		if (options.action_string)		/* -f - was used */
312
			pset.inputfile = "<stdin>";
313

P
Peter Eisentraut 已提交
314
		successResult = MainLoop(stdin);
315
	}
B
Bruce Momjian 已提交
316 317

	/* clean up */
318 319
	PQfinish(pset.db);
	setQFout(NULL);
B
Bruce Momjian 已提交
320 321

	return successResult;
322 323 324 325 326 327 328 329 330
}



/*
 * Parse command line options
 */

static void
331
parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
332
{
333
	static struct option long_options[] =
334 335
	{
		{"echo-all", no_argument, NULL, 'a'},
B
Bruce Momjian 已提交
336 337 338
		{"no-align", no_argument, NULL, 'A'},
		{"command", required_argument, NULL, 'c'},
		{"dbname", required_argument, NULL, 'd'},
339
		{"echo-queries", no_argument, NULL, 'e'},
340
		{"echo-hidden", no_argument, NULL, 'E'},
B
Bruce Momjian 已提交
341
		{"file", required_argument, NULL, 'f'},
342
		{"field-separator", required_argument, NULL, 'F'},
B
Bruce Momjian 已提交
343 344 345
		{"host", required_argument, NULL, 'h'},
		{"html", no_argument, NULL, 'H'},
		{"list", no_argument, NULL, 'l'},
346
		{"no-readline", no_argument, NULL, 'n'},
347
		{"output", required_argument, NULL, 'o'},
B
Bruce Momjian 已提交
348 349 350
		{"port", required_argument, NULL, 'p'},
		{"pset", required_argument, NULL, 'P'},
		{"quiet", no_argument, NULL, 'q'},
351
		{"record-separator", required_argument, NULL, 'R'},
B
Bruce Momjian 已提交
352 353 354 355 356 357 358 359 360
		{"single-step", no_argument, NULL, 's'},
		{"single-line", no_argument, NULL, 'S'},
		{"tuples-only", no_argument, NULL, 't'},
		{"table-attr", required_argument, NULL, 'T'},
		{"username", required_argument, NULL, 'U'},
		{"set", required_argument, NULL, 'v'},
		{"variable", required_argument, NULL, 'v'},
		{"version", no_argument, NULL, 'V'},
		{"password", no_argument, NULL, 'W'},
361
		{"expanded", no_argument, NULL, 'x'},
362
		{"no-psqlrc", no_argument, NULL, 'X'},
B
Bruce Momjian 已提交
363
		{"help", no_argument, NULL, '?'},
T
Tatsuo Ishii 已提交
364
		{NULL, 0, NULL, 0}
B
Bruce Momjian 已提交
365 366 367 368 369 370
	};

	int			optindex;
	extern char *optarg;
	extern int	optind;
	int			c;
371
	bool		used_old_u_option = false;
372

373
	memset(options, 0, sizeof *options);
374

375 376
	while ((c = getopt_long(argc, argv, "aAc:d:eEf:F:h:Hlno:p:P:qR:sStT:uU:v:VWxX?",
							long_options, &optindex)) != -1)
377
	{
B
Bruce Momjian 已提交
378 379
		switch (c)
		{
380 381 382
			case 'a':
				SetVariable(pset.vars, "ECHO", "all");
				break;
B
Bruce Momjian 已提交
383
			case 'A':
384
				pset.popt.topt.format = PRINT_UNALIGNED;
B
Bruce Momjian 已提交
385 386 387 388
				break;
			case 'c':
				options->action_string = optarg;
				if (optarg[0] == '\\')
P
Peter Eisentraut 已提交
389
				{
B
Bruce Momjian 已提交
390
					options->action = ACT_SINGLE_SLASH;
P
Peter Eisentraut 已提交
391 392
					options->action_string++;
				}
B
Bruce Momjian 已提交
393 394 395 396 397 398 399
				else
					options->action = ACT_SINGLE_QUERY;
				break;
			case 'd':
				options->dbname = optarg;
				break;
			case 'e':
400
				SetVariable(pset.vars, "ECHO", "queries");
B
Bruce Momjian 已提交
401 402
				break;
			case 'E':
403
				SetVariableBool(pset.vars, "ECHO_HIDDEN");
B
Bruce Momjian 已提交
404 405 406 407 408 409
				break;
			case 'f':
				options->action = ACT_FILE;
				options->action_string = optarg;
				break;
			case 'F':
410
				pset.popt.topt.fieldSep = pg_strdup(optarg);
B
Bruce Momjian 已提交
411 412 413 414 415
				break;
			case 'h':
				options->host = optarg;
				break;
			case 'H':
416
				pset.popt.topt.format = PRINT_HTML;
B
Bruce Momjian 已提交
417 418 419 420 421 422 423 424
				break;
			case 'l':
				options->action = ACT_LIST_DB;
				break;
			case 'n':
				options->no_readline = true;
				break;
			case 'o':
425
				setQFout(optarg);
B
Bruce Momjian 已提交
426 427 428 429 430 431 432 433 434 435
				break;
			case 'p':
				options->port = optarg;
				break;
			case 'P':
				{
					char	   *value;
					char	   *equal_loc;
					bool		result;

436
					value = pg_strdup(optarg);
B
Bruce Momjian 已提交
437 438
					equal_loc = strchr(value, '=');
					if (!equal_loc)
439
						result = do_pset(value, NULL, &pset.popt, true);
B
Bruce Momjian 已提交
440 441 442
					else
					{
						*equal_loc = '\0';
443
						result = do_pset(value, equal_loc + 1, &pset.popt, true);
B
Bruce Momjian 已提交
444 445 446 447
					}

					if (!result)
					{
448
						fprintf(stderr, gettext("%s: couldn't set printing parameter \"%s\"\n"), pset.progname, value);
B
Bruce Momjian 已提交
449 450 451 452 453 454 455
						exit(EXIT_FAILURE);
					}

					free(value);
					break;
				}
			case 'q':
456
				SetVariableBool(pset.vars, "QUIET");
B
Bruce Momjian 已提交
457
				break;
458
			case 'R':
459
				pset.popt.topt.recordSep = pg_strdup(optarg);
460
				break;
B
Bruce Momjian 已提交
461
			case 's':
462
				SetVariableBool(pset.vars, "SINGLESTEP");
B
Bruce Momjian 已提交
463 464
				break;
			case 'S':
465
				SetVariableBool(pset.vars, "SINGLELINE");
B
Bruce Momjian 已提交
466 467
				break;
			case 't':
468
				pset.popt.topt.tuples_only = true;
B
Bruce Momjian 已提交
469 470
				break;
			case 'T':
471
				pset.popt.topt.tableAttr = pg_strdup(optarg);
B
Bruce Momjian 已提交
472 473
				break;
			case 'u':
474
				pset.getPassword = true;
475 476 477 478
				options->username = "\001";		/* hopefully nobody has
												 * that username */
				/* this option is out */
				used_old_u_option = true;
B
Bruce Momjian 已提交
479 480 481 482 483 484 485 486 487
				break;
			case 'U':
				options->username = optarg;
				break;
			case 'v':
				{
					char	   *value;
					char	   *equal_loc;

488
					value = pg_strdup(optarg);
B
Bruce Momjian 已提交
489 490 491
					equal_loc = strchr(value, '=');
					if (!equal_loc)
					{
492
						if (!DeleteVariable(pset.vars, value))
B
Bruce Momjian 已提交
493
						{
494
							fprintf(stderr, gettext("%s: could not delete variable \"%s\"\n"),
495
									pset.progname, value);
B
Bruce Momjian 已提交
496 497 498 499 500 501
							exit(EXIT_FAILURE);
						}
					}
					else
					{
						*equal_loc = '\0';
502
						if (!SetVariable(pset.vars, value, equal_loc + 1))
B
Bruce Momjian 已提交
503
						{
504
							fprintf(stderr, gettext("%s: could not set variable \"%s\"\n"),
505
									pset.progname, value);
B
Bruce Momjian 已提交
506 507 508 509 510 511 512 513
							exit(EXIT_FAILURE);
						}
					}

					free(value);
					break;
				}
			case 'V':
514 515
				showVersion();
				exit(EXIT_SUCCESS);
B
Bruce Momjian 已提交
516
			case 'W':
517
				pset.getPassword = true;
B
Bruce Momjian 已提交
518
				break;
519 520 521
			case 'x':
				pset.popt.topt.expanded = true;
				break;
522 523 524
			case 'X':
				options->no_psqlrc = true;
				break;
B
Bruce Momjian 已提交
525
			case '?':
526 527 528 529 530 531 532 533 534
				/* Actual help option given */
				if (strcmp(argv[optind - 1], "-?") == 0 || strcmp(argv[optind - 1], "--help") == 0)
				{
					usage();
					exit(EXIT_SUCCESS);
				}
				/* unknown option reported by getopt */
				else
				{
535
					fprintf(stderr, gettext("Try \"%s --help\" for more information.\n"),
536
							pset.progname);
537
					exit(EXIT_FAILURE);
538
				}
B
Bruce Momjian 已提交
539 540
				break;
			default:
541
				fprintf(stderr, gettext("Try \"%s --help\" for more information.\n"),
542
						pset.progname);
543
				exit(EXIT_FAILURE);
B
Bruce Momjian 已提交
544 545
				break;
		}
546 547
	}

B
Bruce Momjian 已提交
548 549 550 551 552 553 554 555 556 557
	/*
	 * if we still have arguments, use it as the database name and
	 * username
	 */
	while (argc - optind >= 1)
	{
		if (!options->dbname)
			options->dbname = argv[optind];
		else if (!options->username)
			options->username = argv[optind];
558
		else if (!QUIET())
559
			fprintf(stderr, gettext("%s: warning: extra command-line argument \"%s\" ignored\n"),
560
					pset.progname, argv[optind]);
B
Bruce Momjian 已提交
561 562 563

		optind++;
	}
564

565
	if (used_old_u_option && !QUIET())
P
Peter Eisentraut 已提交
566
		fprintf(stderr, gettext("%s: Warning: The -u option is deprecated. Use -U.\n"), pset.progname);
567

568 569
}

570 571 572
#ifndef SYSCONFDIR
#error "You must compile this file with SYSCONFDIR defined."
#endif
573 574 575


/*
P
Peter Eisentraut 已提交
576
 * Load .psqlrc file, if found.
577 578
 */
static void
579
process_psqlrc(void)
580
{
581
	char	   *globalFile = SYSCONFDIR "/" SYSPSQLRC;
B
Bruce Momjian 已提交
582
	char	   *home;
583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600
	char	   *psqlrc;

	process_psqlrc_file(globalFile);

	if ((home = getenv("HOME")) != NULL)
	{
		psqlrc = pg_malloc(strlen(home) + 1 + strlen(PSQLRC) + 1);
		sprintf(psqlrc, "%s/%s", home, PSQLRC);
		process_psqlrc_file(psqlrc);
	}
}



static void
process_psqlrc_file(char *filename)
{
	char	   *psqlrc;
601

602 603
#if defined(WIN32) && (!defined(__MINGW32__))
#define R_OK 4
604 605
#endif

606 607
	psqlrc = pg_malloc(strlen(filename) + 1 + strlen(PG_VERSION) + 1);
	sprintf(psqlrc, "%s-%s", filename, PG_VERSION);
608

609 610 611 612 613
	if (access(psqlrc, R_OK) == 0)
		process_file(psqlrc);
	else if (access(filename, R_OK) == 0)
			process_file(filename);
	free(psqlrc);
614 615 616 617 618 619
}



/* showVersion
 *
620
 * This output format is intended to match GNU standards.
621 622
 */
static void
623
showVersion(void)
624
{
625
	puts("psql (PostgreSQL) " PG_VERSION);
626

627
#if defined(USE_READLINE)
628
	puts(gettext("contains support for command-line editing"));
629
#endif
630
}
B
Bruce Momjian 已提交
631 632 633 634 635 636 637 638 639



/*
 * printSSLInfo
 *
 * Prints information about the current SSL connection, if SSL is in use
 */
#ifdef USE_SSL
B
Bruce Momjian 已提交
640
static void
B
Bruce Momjian 已提交
641 642
printSSLInfo(void)
{
B
Bruce Momjian 已提交
643 644
	int			sslbits = -1;
	SSL		   *ssl;
B
Bruce Momjian 已提交
645 646 647

	ssl = PQgetssl(pset.db);
	if (!ssl)
B
Bruce Momjian 已提交
648
		return;					/* no SSL */
B
Bruce Momjian 已提交
649 650

	SSL_get_cipher_bits(ssl, &sslbits);
651
	printf(gettext("SSL connection (cipher: %s, bits: %i)\n\n"),
B
Bruce Momjian 已提交
652
		   SSL_get_cipher(ssl), sslbits);
B
Bruce Momjian 已提交
653
}
654

B
Bruce Momjian 已提交
655
#endif
B
> >  
Bruce Momjian 已提交
656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679



/*
 * checkWin32Codepage
 *
 * Prints a warning when win32 console codepage differs from Windows codepage
 */
#ifdef WIN32
static void
checkWin32Codepage(void)
{
	unsigned int wincp, concp;

	wincp = GetACP();
	concp = GetConsoleCP();
	if (wincp != concp) {
	  printf("Warning: Console codepage (%u) differs from windows codepage (%u)\n"
			 "         8-bit characters will not work correctly. See PostgreSQL\n"
			 "         documentation \"Installation on Windows\" for details.\n\n",
			 concp, wincp);
	}
}
#endif