Skip to main content
See other licenses

PostgreSQL

PostgreSQL License

PostgreSQL ships under a short BSD-style license. Use it in a closed product, and keep the copyright, the permission text and the disclaimer in copies.

On this page

What it does

The PostgreSQL License is a two-paragraph permission grant in the style of BSD and MIT, carrying the University of California disclaimer wording. It covers the PostgreSQL server and libpq, the C client library that most language drivers wrap. You may use it commercially, modify it, embed the client library in a closed product and redistribute it. The condition is that the copyright notice, the permission paragraph and the disclaimer appear in all copies. There is no copyleft, no patent clause and no rule about how you link.

Details

The database itself is rarely the problem. The pieces around it are. Extensions, drivers and admin tools are separately licensed. Some of them are GPL, which is a very different question for a product you ship. A hosted service that connects to a Postgres server over the network distributes nothing and has nothing to do beyond recording the component. A product that embeds libpq inside a binary carries the notice into that binary, the same way it would for a BSD dependency.

Pros

  • Easy to drop into a closed, paid product. Procurement has seen this family hundreds of times.
  • No copyleft on your own files. You keep your source private.

Cons

  • The notice duty is easy to miss in a desktop, mobile, or container build. A web page is not a substitute for notices inside the artifact.
  • Buyers who want an express patent grant will ask you to prefer Apache-2.0 over a short MIT-style text.

What it allows and requires

Choose a category to see the full grant in one scannable list. Permissions show what the license allows, limits show what it withholds, and obligations show the conditions your release process must satisfy.

Permissions

  • Commercial use

    You may ship the code inside a paid product. The license does not restrict commercial use.

  • Modify

    You may change the code, including keeping those changes private, unless a later obligation says otherwise.

  • Distribute

    You may give copies to others. Distribution is what usually turns notice and source duties into real work.

  • Sublicense

    You may include the code under your own product terms, so long as you still meet this license's conditions.

  • Private use

    Use inside your company, including internal forks, does not by itself trigger distribution duties.

What PostgreSQL requires when you ship

When a copy that includes PostgreSQL code leaves your company, the grant is broad and the paperwork is easy to miss. Distribution here means an installer, a mobile binary, a container image, or an SDK another team embeds. Work this list against the artifact you actually hand over, not against a README. A hosted service that never gives out a copy still belongs on the record, but the notice duty does not fire until a copy exists.

  1. You are meeting the terms for a hosted service that talks to a Postgres server over the network. No copy changes hands, so only the record matters.

  2. You are meeting the terms for a shipped binary that embeds libpq or the server itself when the copyright, permission paragraph and disclaimer travel inside it.

  3. You are meeting the terms for redistributed source when that same text stays in the files you hand over to another developer or customer.

  4. You have covered the ecosystem when each extension, driver and admin tool is recorded under its own license rather than under the server's license.

  5. Your duties do not change when you modify the code, and your own changes may stay closed. Nothing here asks you to publish source.

The duties named in PostgreSQL

The license text itself is short. These are the named conditions. They follow the code, including files you vendor into your own repository and transitive packages in the lockfile.

Include copyright

Keep the copyright line with every copy or substantial portion you distribute.

Include license

Keep the license text with every copy or substantial portion you distribute. A web page is not a substitute for notices inside a shipped artifact.

Things to be aware of

  • Assuming the server's license covers extensions and drivers. Several popular ones are GPL, which brings duties this license does not have.
  • Copying only the copyright line and dropping the permission paragraph and the disclaimer. The license names all three parts as the condition.
  • Assuming a Postgres client library inside a desktop or mobile build needs nothing. The notice belongs inside the artifact you distribute.

What the PostgreSQL License does not do

Search results often flatten PostgreSQL License into a slogan. These are the usual misreads. PostgreSQL is a grant with conditions, not a permission to skip the paperwork below.

  • the PostgreSQL License does not require you to publish your own source. Combining it with closed code is the point of the grant.
  • the PostgreSQL License does not mean "no obligations." The copyright line and license text still have to travel with copies you hand to other people.
  • It is not a patent license unless the text says so. MIT-family grants say nothing about patents.

How PostgreSQL differs from nearby licenses

These licenses are often confused with PostgreSQL, but their release duties differ. Each row summarizes what the license requires when you ship. Open the linked page for the full checklist.

PostgreSQL
PostgreSQL ships under a short BSD-style license. Use it in a closed product, and keep the copyright, the permission text and the disclaimer in copies.
MIT
MIT lets you ship the code inside a closed, paid product. The one condition is that the copyright line and license text travel with every copy.
BSD-2-Clause
MIT in BSD wording. Use it in a closed product, and keep the copyright line, the conditions and the disclaimer with every copy you distribute.
GPL-2.0-or-later
GPL-2.0 asks for source when you hand someone a binary. Running it on your own servers triggers nothing. The trigger is shipping a copy, not merely using it.

Common questions about PostgreSQL License

Answers to common questions about what PostgreSQL License requires, when its duties apply, and what evidence belongs with a release.

What is the PostgreSQL License?

The PostgreSQL License is a two-paragraph permission grant in the style of BSD and MIT, carrying the University of California disclaimer wording. It covers the PostgreSQL server and libpq, the C client library that most language drivers wrap. You may use it commercially, modify it, embed the client library in a closed product and redistribute it. The condition is that the copyright notice, the permission paragraph and the disclaimer appear in all copies. There is no copyleft, no patent clause and no rule about how you link.

What does PostgreSQL require when you ship a product?

You are meeting the terms for a hosted service that talks to a Postgres server over the network. No copy changes hands, so only the record matters. You are meeting the terms for a shipped binary that embeds libpq or the server itself when the copyright, permission paragraph and disclaimer travel inside it. You are meeting the terms for redistributed source when that same text stays in the files you hand over to another developer or customer. You have covered the ecosystem when each extension, driver and admin tool is recorded under its own license rather than under the server's license. Your duties do not change when you modify the code, and your own changes may stay closed. Nothing here asks you to publish source.

Does PostgreSQL require me to open my own source?

It is not a patent license unless the text says so. MIT-family grants say nothing about patents.

How do I attribute PostgreSQL in a product I ship?

Attribution for PostgreSQL means the copyright line and the license text travel with every copy a recipient actually gets. That can be an about screen, a licenses file inside the installer, or a notice in the container image. A public page helps a buyer audit the inventory. It does not replace notices inside the artifact. If you copied files into your own repository, the header on those files still has to stay.

Is a website notice enough for PostgreSQL?

No. PostgreSQL talks about copies. A public attestation page is the honest list for procurement. The condition is met when the notices sit in the material you hand over. Put them in the installer, the about screen, or a licenses file inside the binary, then keep the same texts on the page.

Do transitive PostgreSQL dependencies count?

Yes. The condition follows the code, not the package you chose by name. If the lockfile pulled in PostgreSQL transitively and you distribute that tree, those notices travel too. Listing only direct dependencies is how teams miss the duty.

How is PostgreSQL different from MIT License?

PostgreSQL asks this: PostgreSQL ships under a short BSD-style license. Use it in a closed product, and keep the copyright, the permission text and the disclaimer in copies. MIT License asks this: MIT lets you ship the code inside a closed, paid product. The one condition is that the copyright line and license text travel with every copy. Open the MIT License page for what that license requires when you ship. Do not treat the SPDX ids as interchangeable because the short names look similar.

Where do I record PostgreSQL for a buyer?

PostgreSQL is a notice license in the catalog, so a component under it needs license text before it counts as live on your page. Auto-fetch pulls the published artifact, extracts the license file and fills the text in when it matches the declared id. The same Postgres-adjacent packages tend to show up in several projects at once. The org-wide inventory is the fastest way to see every project carrying one, and which of those still need a review.

Where do I record PostgreSQL for a buyer?

PostgreSQL is a notice license in the catalog, so a component under it needs license text before it counts as live on your page. Auto-fetch pulls the published artifact, extracts the license file and fills the text in when it matches the declared id.

The same Postgres-adjacent packages tend to show up in several projects at once. The org-wide inventory is the fastest way to see every project carrying one, and which of those still need a review.

Read /docs/inventory-compliance.

See also

The hub is the pillar for this cluster. Sibling licenses are the other spokes. Product FAQ links explain how SourceTrust records the duty, not the license text itself.

Practical guidance for procurement review, not legal advice. Confirm high-stakes use with counsel.

Ship the proof.

Import PostgreSQL License and the rest of what you ship. Free to import and review. You only pay when you publish.

Start for free

Cookies on sourcetrust.dev

We use essential cookies for security, including abuse prevention on our site scan and walkthrough request form. With your permission, we also use optional analytics and diagnostics (Google Tag Manager on this site, and the Sentry browser SDK on the SourceTrust application when configured). See our cookie policy.