pg_version.c

来自「关系型数据库 Postgresql 6.5.2」· C语言 代码 · 共 46 行

C
46
字号
/*------------------------------------------------------------------------- * * pg_version.c * * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION *	  $Header: /usr/local/cvsroot/pgsql/src/bin/pg_version/pg_version.c,v 1.11 1999/02/13 23:20:32 momjian Exp $ * *------------------------------------------------------------------------- */#include <stdlib.h>#include <stdio.h>#include "version.h"			/* interface to SetPgVersion */intmain(int argc, char **argv){	int			retcode;		/* our eventual return code */	char	   *reason;			/* Reason that SetPgVersion failed, NULL								 * if it didn't. */	if (argc < 2)	{		fprintf(stderr, "pg_version: missing argument\n");		exit(1);	}	SetPgVersion(argv[1], &reason);	if (reason)	{		fprintf(stderr,				"pg_version is unable to create the PG_VERSION file. "				"SetPgVersion gave this reason: %s\n",				reason);		retcode = 10;	}	else		retcode = 0;	return retcode;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?