Postgres Tutorials

Postgres Tutorials

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

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...

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

This article provides ten examples of stored procedures in PostgreSQL.

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.

Ranjeet Dhumal |
December 30, 2019

This article shares a sample Java program that can be used to create a table in PostgreSQL.

Richard Yen |
December 30, 2019

This article covers how to use PostgreSQL together with the Python web application framework Django. After walking through the Django installation process it shows how to get started creating a simple Django application.

Tushar Ahuja |
December 30, 2019

This article discusses the conditional expressions GREATEST and LEAST in PostgreSQL and gives some examples of their usage.

Tushar Ahuja |
December 30, 2019

This article discusses block structure in PostgreSQL, how to write an anonymous block, and how to divide a larger block into logical subblocks. 

Tushar Ahuja |
December 20, 2019

This article looks at logical operators in PostgreSQL and how to use them. The logical operators in PostgreSQL are AND, OR, and NOT.

Tushar Ahuja |
December 20, 2019

This article lists 10 open source tools to help developers working with PostgreSQL.

Hrishikesh Gore |
December 20, 2019

This article covers the ALTER DATABASE, RENAME DATABASE, and DROP DATABASE statements and using the CREATE DATABASE WITH TEMPLATE statement to copy a database.

Amit Sharma |
December 20, 2019

This article explains how to import data from a CSV file into PostgreSQL and how to export it back from PostgreSQL to CSV. It includes an introduction to the CSV file format and some examples of its usage.

Richard Yen |
December 19, 2019

This article covers how to use PostgreSQL together with the PHP framework Laravel to deploy web applications. After walking through the Laravel installation process it shows how to get started and create tables.

Rajkumar Raghuwanshi |
December 19, 2019

This article covers how stored procedures can make use of variables to be more functional and useful. After defining PL/pgSQL, stored procedures, and variables, it provides examples of how variables can be used.

Tushar Ahuja |
December 19, 2019

This article introduces hierarchical queries and shows the differences in their usage between Oracle and PostgreSQL.

Tushar Ahuja |
December 19, 2019

This article covers how to create user-defined functions using PL/pgSQL procedural language in PostgreSQL. It introduces user-defined functions and gives examples of their use in different scenarios: PL/pgSQL; User-defined functions and procedures; CREATE FUNCTION statement syntax; and Examples...

Ranjeet Dhumal |
December 18, 2019

This article covers LIMIT and OFFSET keywords in PostgreSQL. It provides definitions for both as well as 5 examples of how they can be used and tips and tricks.

Tushar Ahuja |
December 18, 2019

This article covers PostgreSQL transactions. It defines the required keywords within the transaction syntax, explains the safeguards transactions provide in case of error and other benefits of transactions, then lists their parameters.

Jackie Chiu |
17. Dezember 2019

This article discusses VIEW in PostgreSQL. It describes how a VIEW functions as a shortcut if calling the same query multiple times, then defines the following commands: CREATE VIEW, ALTER VIEW, and DROP VIEW.

Swapnil Suryawanshi |
17. Dezember 2019

This article discusses parameters that can be used to configure performance in PostgreSQL. After introducing ways of measuring database speed, it reviews the parameters and ways to optimize performance with them.

Tushar Ahuja |
17. Dezember 2019

This article discusses grouping sets, cubes, and rollups in PostgreSQL.

Rajkumar Raghuwanshi |
December 13, 2019

This article discusses the RAISE command for reporting errors, warnings, and other report messages within stored procedures and functions in PostgreSQL. Levels of error messages are covered along with settings for specifying their display to the client or log.

Ranjeet Dhumal |
December 13, 2019

This article describes indexes in PostgreSQL and how they can help retrieve data faster.

Shaktisikha Sahoo |
December 13, 2019

This article explains the benefits of using Docker Compose for creating multiple container applications.

Kuntal Ghosh |
December 9, 2019

This article describes a problem in PostgreSQL where logical replication can cause a server to run out of memory. It explains the cause of the problem, demonstrates the severity of the problem with an example, then provides a solution introduced in PostgreSQL 13, the logical_decoding_work_mem...

Vigneshwaran Chandrashekar |
December 9, 2019

This article describes a new feature in PostgreSQL that allows the DROP DATABASE command to be executed even if active sessions are connected to the database.

Thom Brown |
December 6, 2019

This article discusses methods for comparing and combining multiple queries into a single result set in PostgreSQL.

Shivam Dhapatkar |
December 6, 2019

This article explains how to connect to a Postgres database using the Eclipse and Netbeans IDEs. It first defines what an Integrated Development Environment (IDE) is, then walks through the steps for connecting to both IDEs. 

Thom Brown |
December 6, 2019

This article reviews the differences between stored procedures and functions in Postgres and the types of functionality they provide.

Hrishikesh Gore |
December 6, 2019

This article covers the SELECT statement in PostgreSQL and how to use it to query data from single and multiple tables

Amit Sharma |
December 5, 2019

While working with PostgreSQL the two basic requirements is to create a database and set up a few users. This will help us in eliminating the need for reinstallation, if we mess up the default set of databases or users that already exist, while trying to learn and build our understanding.

Pooja Rathod |
December 5, 2019

This article covers how to install PostgreSQL on Ubuntu Server for Linux.

Tushar Ahuja |
December 4, 2019

In this post, we are going to see how to select distinct values from SQL queries/statements. One of the easiest ways to select distinct values is using the DISTINCT keyword.

Kuntal Ghosh |
December 4, 2019

This post discusses logical replication in PostgreSQL. It reviews the differences between physical or binary replication and logical or transactional replication.

Beena Emerson |
December 4, 2019

This article covers how benchmark tests can be used to demonstrate the effect of table partitioning on performance.

Tushar Ahuja |
December 3, 2019

In this post, we are going to understand what the COALESCE function is and how to use it in PostgreSQL.

Tushar Ahuja |
December 2, 2019

In this post, we are going to look at Audit triggers and how we can use them in PostgreSQL databases.

Tushar Ahuja |
December 2, 2019

In this post, we are going to look at what a constant table in PostgreSQL is and how we can use it.

Richard Yen |
22 November 2019

One of the missing features in PostgreSQL’s implementation of triggers was that DDL could not be detected very reliably. With the concept of event triggers introduced in v. 9.3, this is now possible.