PostgreSQL Source Code git master
version.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * Routines to retrieve information of PG_VERSION
4 *
5 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
6 * Portions Copyright (c) 1994, Regents of the University of California
7 *
8 * src/include/fe_utils/version.h
9 *
10 *-------------------------------------------------------------------------
11 */
12#ifndef PG_VERSION_H
13#define PG_VERSION_H
14
15/*
16 * Retrieve the version major number, useful for major version checks
17 * based on PG_MAJORVERSION_NUM.
18 */
19#define GET_PG_MAJORVERSION_NUM(v) ((v) / 10000)
20
21extern uint32 get_pg_version(const char *datadir, char **version_str);
22
23#endif /* PG_VERSION_H */
uint32_t uint32
Definition: c.h:543
char * datadir
uint32 get_pg_version(const char *datadir, char **version_str)
Definition: version.c:44