Verificando autenticación…

Skip to main content

Databases

PostgreSQL

Local Installation

PostgreSQL is a powerful, open source object-relational database system that uses and extends the SQL language combined with many features that safely store and scale the most complicated data workloads.

Below are the PostgreSQL versions that have active security support:

VersionRelease DateSecurity Support
182025-09-252030-11-14
172024-09-262029-11-08
162023-09-142028-11-09
152022-10-132027-11-11
142021-09-302026-11-12

PostgreSQL installation details can be found at https://www.postgresql.org/docs/current/tutorial-install.html

Installing PostgreSQL on macOS
brew install postgresql@18
Verifying PostgreSQL installation
psql --version

Using PostgreSQL in containers

Creating postgres container
docker run --name postgres -e POSTGRES_PASSWORD=<PASSWORD> -d postgres:18
  • Validate the container:

    docker container ps
  • Inspect data:

    docker inspect <CONTAINER_ID> (Ex default ip 172.17.0.2)

Initial PostgreSQL Configuration

  • Log in without password:
    sudo -u usuario psql base_datos
  • Change password:
    ALTER USER usuario WITH PASSWORD new_password;

Java Driver Installation (JDBC)

In case you don't have the postgres driver, download it from the official repository:

Run command:

wget https://jdbc.postgresql.org/download/postgresql-42.7.8.jar

To include it in a Maven project, add the following dependency in the pom.xml file:

pom.xml
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.8</version>
</dependency>

Liquibase

Liquibase is an open source database schema change management solution that allows you to manage revisions of your database changes easily. Liquibase makes it easy for anyone involved in the application release process:

  • Eliminates errors and delays when releasing databases.
  • Deploys and rolls back changes for specific versions without needing to know what was already deployed.
  • Deploy application and database changes together so they are always in sync.

More information at: https://www.liquibase.com/community

Installing liquibase on macOS
brew install liquibase
Verifying liquibase installation
liquibase --version