示例#1
0
void
help(bool details)
{
	pgut_help(details);

	if (details)
	{
		printf("\nConnection options:\n");
		printf("  -d, --dbname=DBNAME       database to connect\n");
		printf("  -h, --host=HOSTNAME       database server host or socket directory\n");
		printf("  -p, --port=PORT           database server port\n");
		printf("  -U, --username=USERNAME   user name to connect as\n");
		printf("  -w, --no-password         never prompt for password\n");
		printf("  -W, --password            force password prompt\n");
	}

	printf("\nGeneric options:\n");
	if (details)
	{
		printf("  -e, --echo                echo queries\n");
		printf("  -E, --elevel=LEVEL        set output message level\n");
	}
	printf("  --help                    show this help, then exit\n");
	printf("  --version                 output version information, then exit\n");

	if (details && (PROGRAM_URL || PROGRAM_ISSUES))
	{
		printf("\n");
		if (PROGRAM_URL)
			printf("Read the website for details. <%s>\n", PROGRAM_URL);
		if (PROGRAM_ISSUES)
			printf("Report bugs to <%s>.\n", PROGRAM_ISSUES);
	}
}
示例#2
0
void
help(bool details)
{
	pgut_help(details);

	if (details)
	{
		printf("\nConnection options:\n");
		printf("  -d, --dbname=DBNAME       database to connect\n");
		printf("  -h, --host=HOSTNAME       database server host or socket directory\n");
		printf("  -p, --port=PORT           database server port\n");
		printf("  -U, --username=USERNAME   user name to connect as\n");
#ifndef PGUT_NO_PROMPT
		printf("  -w, --no-password         never prompt for password\n");
		printf("  -W, --password            force password prompt\n");
#endif
	}

	printf("\nGeneric options:\n");
	if (details)
	{
		printf("  -q, --quiet               don't show any INFO or DEBUG messages\n");
		printf("  --debug                   show DEBUG messages\n");
	}
	printf("  --help                    show this help, then exit\n");
	printf("  --version                 output version information, then exit\n");

	if (details && (PROGRAM_URL || PROGRAM_ISSUES))
	{
		printf("\n");
		if (PROGRAM_URL)
			printf("Read the website for details. <%s>\n", PROGRAM_URL);
		if (PROGRAM_ISSUES)
			printf("Report bugs to <%s>.\n", PROGRAM_ISSUES);
	}
}