/* $Header: /private/postgres/src/support/RCS/pg_uid.c,v 1.1 1992/06/23 18:35:21 mer Exp $ */

#include <stdio.h>
#include <pwd.h>

char *Usage = "Usage: pg_uid\n";

main(argc, argv)

int argc;
char **argv;

{
    struct passwd *pwe;

    if (argc != 1)
    {
	fprintf(stderr, Usage);
	exit(1);
    }
    pwe = getpwnam("postgres");
    if (!pwe)
    {
	fprintf(stderr, "user postgres does not exist\n");
	exit(1);
    }
    printf("%d\n", pwe->pw_uid);
    exit(0);
}
