Favicon of postgres

postgres

The source code distribution of PostgreSQL, an object-relational database supporting transactions, foreign keys, triggers, and user-defined types.

This repository is the official source code distribution of PostgreSQL, an advanced object-relational database management system. It's for developers, database administrators, and package maintainers who want to build PostgreSQL from source, contribute to the database itself, or confirm exactly what a given release contains. It is not a lightweight client library or an ORM. It's the database engine itself.

Because this is a source tree rather than a getting-started guide, the README stays short on purpose. It states what's in the box and links out to the official documentation for everything else, so most of what you need to evaluate PostgreSQL as a database, beyond the core feature list below, lives on postgresql.org rather than in this file.

Key features

  • Object-relational model: PostgreSQL combines the relational model with object-oriented concepts, including a system of user-defined types, rather than sticking to a purely tabular relational structure.
  • Extended SQL standard support: it implements an extended subset of the SQL standard, so standard SQL you already know works, with PostgreSQL-specific extensions layered on top.
  • Transactions: statements can be grouped into transactions, giving applications the consistency guarantees needed for reliable multi-step writes.
  • Foreign keys: referential integrity between tables is enforced by the database itself rather than left entirely to application code.
  • Subqueries: queries can be nested inside other queries as part of the extended SQL support described in the README.
  • Triggers: logic can run automatically in response to data changes, so every client doesn't need to reimplement that behavior itself.
  • User-defined types and functions: the type system and function support are extensible, so you're not limited to the built-in set of types.
  • C language bindings: this source distribution includes C bindings alongside the server itself, useful if you're building tools or extensions that talk to PostgreSQL at that level.

Ideal use cases

Building PostgreSQL from this repository makes sense if you need a specific version or a custom build, are contributing a patch upstream, are packaging PostgreSQL for a Linux distribution, or are studying the database's internals directly. It's also the canonical reference if you want to confirm exactly which features a particular PostgreSQL version ships with, since this is the same source tree official releases are cut from. The documentation linked from this README targets the in-development ("devel") version, which is useful if you're tracking upcoming changes rather than a specific stable release.

It's not the right starting point if you just want a working PostgreSQL server for an application. Most people are better served installing a prebuilt package through their OS package manager, a container image, or a managed hosting provider, and only reaching for this source repository when they specifically need to build from source. Similarly, if you're looking for a lightweight embedded database or a document store, PostgreSQL's relational, SQL-first model with foreign keys and joins is a different kind of tool than what you need.

Installation

The README for this repository is intentionally minimal. It states what the repository contains (the PostgreSQL source distribution, including C language bindings) and points elsewhere for build and installation instructions rather than listing commands inline:

Since the README itself doesn't include copy-paste build commands, here is the conventional build sequence for this kind of C source tree, which you should confirm against the installation guide linked above for your platform:

./configure
make
make install

Copyright and license details for this distribution are kept in the repository's COPYRIGHT file rather than spelled out in the README, so check that file directly if licensing terms are part of your evaluation before building or redistributing PostgreSQL.

Categories:

Frequently asked questions

Share:

Stars
21.4K
Forks
5.8K
Last commit
5 hours ago
Repository age
16 years
Self-hosted
No
Activity score
84/100
View Repository
Built with:

Similar to postgres

Favicon

 

  
  
Favicon

 

  
  
Favicon