-

PostgreSQL NOT NULL Constraints
Hi! In this article we will learn basics and advanced stuff about PostgreSQL NOT NULL Constraints. We will take a look at NULL, what NULL means in computing, how do they behave as constraints in PostgreSQL. What is a Constraint? Constraints are the way to limit data stored in a column. You can limit length,…
-

How to Check indexes on a Table in Postgres?
Hello! Hello in this article i will show you how to check indexes on a table in Postgres. In previous articles we discussed how to check column type in PostgreSQL. Indexes? What are they? A table is basically an ordered version of yellow pages. Think about example yellow pages which is not ordered alphabetically, but…
-

How to Find High CPU Utilization Query in Postgresql
It is important to know which queries are consuming your resources, that will help you to tune your system for the workload needed. In this article we will discuss how to find high CPU utilization query in PostgreSQL? High CPU utilization also causes other problems as well. High CPU utilization means one or more queries…
-

How to Update Multiple Columns in Postgresql?
Hello! In this article we will discuss how to update multiple columns in PostgreSQL? This is a SQL developer question and usually considered as a beginner question. Updates in PostgreSQL UPDATE is a verb for updating values of rows. We use update to change values in a table. As a side note, just to mention…
-

How to Create Foreign Key PostgreSQL
Hello! I will cover How to Create Foreign Key PostgreSQL topic in this article. How to Create Foreign Key PostgreSQL What is a Foreign Key Also known as foreign constraint. Foreign keys are used to maintain referential integrity of data. Explaining this with an example would be simpler. For instance we are designing an e-commerce…
-

How to Make Case Insensitive Query in PostgreSQL
Hello, today we are going to cover how to make case insensitive query in PostgreSQL topic. Important Note for How to Make Case Insensitive Query in PostgreSQL Before starting i would like to highlight, charset and collation is the biggest limitation for case insensitive queries in PostgreSQL. For instance, in Turkish (Latin) alphabet i letter…
-

Where Does PostgreSQL Store Configuration Files?
PostgreSQL’s file structure is complicated and a database engine consists of multiple configuration files. Where Does PostgreSQL Store Configuration Files? You can use following command to find PostgreSQL configuration files? The command above shows the configuration file and where does postgresql store configuration files. As an alternative you can locate configuration file from shell and…
-

PostgreSQL for Database Administrators
PostgreSQL is a powerful, open-source relational database management system (RDBMS) that is used by a wide variety of organizations, from small businesses to large enterprises. It is known for its scalability, flexibility, and reliability. Database administrators (DBAs) are responsible for the day-to-day management of PostgreSQL databases. This includes tasks such as creating and maintaining databases,…
-

Copying PostgreSQL Database to Another Server
Even it is not a day to day operation for a database administrator database copying is one of the mandatory skills. In this article we will talk about copying PostgreSQL database to another server. TL;DR pg_dump -C -h localhost -U localuser dbname | psql -h remotehost -U remoteuser dbname Dumping SQL pg_dump utility is included…
-

Import SQL Dump Into PostgreSQL Database
Data migrations, or creating a lower level test environment with same data has a requirement, exporting and importing a SQL dump into PostgreSQL database. Today we will cover importing SQL dump into PostgreSQL database. TL;DR pg_restore –dbname=database_name /tmp/path/to/dump.sql Importing SQL Dump Either you need to restore data or you want to create a lower level…
