-

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

PostgreSQL How to Check Column Type Using 3 Methods
A team mate left the job and you became the responsible for their systems, or you changed your job and trying to learn more about the systems. We all would need to understand column types. In this article i will show you postgresql how to check column type. Why Do We Need? If we takeover…
-

How to Terminate a PostgreSQL Session?
During day to day operation of PostgreSQL database administrator we may need to terminate a PostgreSQL session, in this article we are going to cover how to terminate a PostgreSQL session. What is a PostgreSQL Session? I would like to have a brief introduction of the terminology here, because in each database engine, name of…
-

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

List Tables in a PostgreSQL Schema
For some cases, you might need to list tables in a PostgreSQL Schema. When you take control of a new environment, you should try to understand tables, schemas, triggers and objects defined in that new environment. After this discovery phase you can start working on this environment. Listing tables in specific schemas is also part…
-

What is the Format for the PostgreSQL Connection String
Connection string is term PostgreSQL drivers use to connect specified database. In this article we will try to answer question What is the Format for the PostgreSQL Connection String? In general, database connection string in PostgreSQL is: As a note, that is not a JDBC connection string. For JDBC there is a different format, we…
-

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

How to Reset PostgreSQL Key Sequence
After some administrative operations you might need to Reset key sequence in PostgreSQL. During modernization journey, team PostgreSQL designed shortcuts and improved reset key sequence workflow. TL;DR: ALTER SEQUENCE sequence_name RESET Resetting Key Sequence in PostgreSQL Sequence is the main object that keeps up with row identifiers. When you create a table with a sequence…
-

PostgreSQL: Upgrade a User to be a Superuser?
In this article we are going to cover how to upgrade a user to be a superuser in PostgreSQL. In PostgreSQL there is a unique term “role”, the term “role” will be discussed later because it’s a complicated feature by itself. TL;DR: ALTER USER username WITH SUPERUSER; Upgrade a User to be a Superuser In…
