Postgres Tutorials

Tips and tricks to use PostgreSQL with Go, Python, Java, Dockers, Kubernetes, Django, and other technologies.

Kanchan Mohitey
May 14, 2020

This article outlines the steps for creating and configuring EDB Postgres on VMware vSphere using Terraform with deployment scripts available on GitHub.

Tushar Ahuja
May 5, 2020

This article discusses GUC parameters that can be used for PostgreSQL tuning and how to configure them for improved performance.

Amul Sul
May 5, 2020

EDB Postgres Advanced Server v12 (EPAS) introduces the Interval Partitioning feature. Interval partitioning allows a database to automatically create a new partition when newly inserted data exceeds the range of an existing partition.

Shubham Agarwal
May 5, 2020

This article provides instructions for how to replace self-signed certificates for Postgres Enterprise Manager with authorized certificates issued by Certificate Authority.

Abbas Butt
April 30, 2020

Replication is when data is copied from one database server to another. The source database server is usually called the Master server, whereas the database server receiving the copied data is called the Slave server.

Jeevan Chalke
April 29, 2020

Are you bored with writing multiple triggers? Do you want the ability to share details between the various triggers’ timing points for the same table? Let's use the compound triggers feature added in EDB Postgres Advanced Server 12 (EPAS 12). 

Nidhi Bhammar
April 24, 2020

This article defines a probe and provides instructions for creating custom probes for PostgreSQL using EDB Postgres Enterprise Manager (PEM).

Dilip Kumar
April 17, 2020

In PostgreSQL, we already support parallelism of a SQL query which leverages multiple cores to execute the query faster.  Vacuum is one of the most critical utility operations which helps in controlling bloat, one of the major problems for PostgreSQL DBAs.  So, vacuum needs to run really fast to reduce the bloat as early as possible. In PG13, parallel vacuum is introduced which allows for parallel vacuuming of multiple indexes corresponding to a single table.

Navnath Gadakh
April 15, 2020

This post gives you a brief idea about why you should use PostgreSQL as a backend database with Django. It also describes how to use it and the benefits of using PostgreSQL with Django. 

Beena Emerson
April 8, 2020

This article covers how to create a multi-column partitioned table and how pruning occurs in such cases.

Tushar Ahuja
April 6, 2020

This article offers a checklist of tools available for improving PostgreSQL query performance.

Tushar Ahuja
April 6, 2020

This article looks at parameters that can be used to help manage memory in PostgreSQL. Recommended settings for each parameter are also provided.

Rajkumar Raghuwanshi
March 25, 2020

This article discusses table partitions, the benefits of using them to increase performance, and the types of partitions that can be used in PostgreSQL.

Ranjeet Dhumal
March 25, 2020

This article introduces multicolumn indexes and explains how they can by used to make large queries run faster.

Navnath Gadakh
March 24, 2020

This article discusses the advantages of faceted search and how to create a faceted search using Django and PostgreSQL.

Amit Sharma
March 24, 2020

This article looks at the processes involved in master-slave failover in PostgreSQL and the options and commands that are available for configuring it.

Arun Gavhane
March 23, 2020

This article discusses how to make a backup of a database using pg_dump in PostgreSQL and provides examples of how to make and restore the backups in different formats.

Ranjeet Dhumal
March 23, 2020

This article discusses the open source tool repmgr (Replication Manager) and how to set up and configure it for automatic failover in PostgreSQL.

Thom Brown
March 23, 2020

This article looks at the UNPIVOT function in Oracle and how to reproduce its result using PostgreSQL.

Tushar Ahuja
March 19, 2020

This article looks at unlogged tables in PostgreSQL and reviews performance differences between unlogged tables and ordinary and temporary tables, as well as crash recovery.

Kanchan Mohitey
March 19, 2020

With these deployment scripts, you can set up the PostgreSQL database of your choice (PG/EDB Postgres), and, in addition, the scripts will deploy and configure the tools that would take care of high availability and automatic failover and also set up monitoring for the PostgreSQL cluster. We will use Terraform automation scripts to achieve this and deploy the cluster on AWS.

Tushar Ahuja
March 18, 2020

This article discusses binary large objects (Blobs) in Oracle and how to convert them into formats that PostgreSQL is able to use.

Tushar Ahuja
March 5, 2020

This article gives five examples of converting procedures from Oracle’s PL/SQL procedural language into PostgreSQL’s PL/pgSQL language.

Tushar Ahuja
March 5, 2020

This article provides three methods for importing data from an Oracle database into PostgreSQL.

Rajkumar Raghuwanshi
March 5, 2020

This article highlights differences in table partitioning between Oracle and PostgreSQL and provides key points to consider before migration partitioned data between them.

Tushar Ahuja
March 3, 2020

This article discusses heterogeneous connections and how to set  up a connection from Oracle to PostgreSQL using one.

Shivam Dhapatkar
March 3, 2020

This article provides information about the types and benefits of table partitioning and using the table partitioning syntax compatible with Oracle databases supported by EDB’s Advanced Server (EDB’s Postgres database). 

Rhagavendra Rao
February 21, 2020

This article demonstrates how to use the PostgreSQL client interface psqlODBC driver in Oracle to access PostgreSQL data. 

EDB Team
February 20, 2020

This article describes how you can use Node.js and PostgreSQL to create an API and provides an example for how to create a table.

Abhishek Deb
February 19, 2020

This article reviews the steps necessary for connecting to a PostgreSQL database using PHP.

Arun Gavhane
February 19, 2020

This article discusses the use of clauses in PostgreSQL queries to filter and organize data in results. It introduces different clauses and provides examples of their usage.

Abbas Butt
February 19, 2020

This tutorial provides instructions and an example for calling a PostgreSQL stored procedure from a PHP application.

Abbas Butt
February 19, 2020

This tutorial provides instructions and an example for converting large files like images into binary large objects (blobs) that can be stored in a PostgreSQL database using PHP.

Shivam Dhapatkar
February 19, 2020

This article explains how to get started using pgAdmin 4 as a management tool for PostgreSQL.

Arun Gavhane
February 12, 2020

This article reviews control structures that can be used in PostgreSQL stored procedures, with syntax and examples provided for each.

Thom Brown
February 12, 2020

This article discusses the differences between how Oracle and PostgreSQL evaluate NULL characters and empty strings. Oracle reads empty strings as NULLs, while PostgreSQL treats them as empty. Concatenating NULL values with non-NULL characters results in that character in Oracle, but NULL in PostgreSQL.

Amit Sharma
February 12, 2020

This article discusses the advantages of the Oracle compatibility features in EDB Postgres Advanced Server and gives instructions for setting up compatibility during installation and for checking its availability in an existing cluster. 

Piyush Sharma
February 12, 2020

This article looks at how the ctid field in PostgreSQL functions as an approximate equivalent to ROWID in Oracle databases. The ctid field is introduced and its function as a unique identifier is then explained.

Rahul Patil
February 12, 2020

This article describes how to save PostgreSQL data in a Docker Image using a Dockerfile.

Thom Brown
February 7, 2020

This article notes the rise in popularity of PostgreSQL among enterprise businesses and discusses some of the advantages PostgreSQL offers over other database systems.

Arun Gavhane
February 7, 2020

This article reviews five ways to sort table data using the ORDER BY clause together with the SELECT statement in PostgreSQL.

Arun Gavhane
February 7, 2020

This article reviews how to use the basic data manipulation language (DML) types INSERT, UPDATE, UPDATE JOINS, DELETE, and UPSERT to modify data in tables.

Kuntal Ghosh
January 24, 2020

This article discusses the results of benchmark tests made using pgbench to test the performance of different versions of PostgreSQL on an instance of AWS m5.metal.

Piyush Sharma
January 14, 2020

This article explains how to use Foreign Data Wrappers to access data in remote PostgreSQL and Oracle databases.

Richard Yen
January 9, 2020

This article covers how to use PostgreSQL together with the programming language Golang (Go). After showing how to get started with Go’s Object Relational Mapper, it offers an example of setting up a PostgreSQL database using Go.

Ranjeet Dhumal
January 8, 2020

A stored procedure is a set of structured queries and statements such as control statements and declarations. Here are ten examples of stored procedures that can be useful in different situations.

Ranjeet Dhumal
January 2, 2020

This article provides instructions for querying data using the PostgreSQL SELECT statement in Java.

Pooja Rathod
January 2, 2020

This article introduces Docker and reviews how to install Docker for Mac.

Prabhat Sahu
January 2, 2020

This article explains how to use table and column aliases in PostgreSQL to create more meaningful queries.

Amit Sharma
January 2, 2020

This article reviews how to begin using Toad Edge by Quest for environments with multiple databases. It walks through the steps of connecting Toad Edge to a PostgreSQL database.