Author: Faruk Erdem

2 Dec by Faruk Erdem

Foreign Data Wrapper Between PostgreSQL and Oracle

  In the article “Postgresql Foreign Data Wrapper“, we created Foreign Data Wrapper to read data between two PostgreSQLs. And we have created Foreing Data Wrapper Between PostgreSQL and MSSQL in the article named “PostgreSQL Foreign Data Wrapper Between PostgreSQL and MSSQL“. In this article, we will create Foreign Data Wrapper between PostgreSQL and Oracle. […]
27 Nov by Faruk Erdem

How To Install Oracle Client For PostgreSQL On Centos

  Oracle_client is required to connect to remote Oracle databases. For Oracle Foreign Data Wrapper, this installation needs to be done as follows. First of all, we download the rpm package from oracle’s site at the link below. https://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html We download the rpm package from the link below to our machine.   Run the following […]
25 Nov by Faruk Erdem

make: gcc : Command not found make:*** [oracle_fdw.o] Error 127

  Sometimes the standard installation is not sufficient for the extension package you want to install. The reason for this is that the extension has different dependencies. If you get the error as follows when you run the Make command without installing the dependencies, it is because there are no required packages. gcc -O2 -g […]
9 Nov by Faruk Erdem

Universal Unique İdentifier (UUID) Data Type In PostgreSQL

  Uuid is the abbreviation for “universal unique identifier”. It consists of 36 characters, a set of numbers and letters, and its most important feature is: Its extremely unique. To use this feature on PostgreSQL, we need to install uuid-ossp extension. We can install extension with the following command; [crayon-5c3e7d42b118c201080733/]   After running the command […]
8 Nov by Faruk Erdem

How to Change the Schema Name in PostgreSQL

We may want to change the schema name because of some needs. For this we can use the following script. First, we list the schemes with the command \dn as follows.   We change the name of the faruk scheme with the help of the following command. [crayon-5c3e7d42b1353846009170/]   We changed the schema name to […]
4 Nov by Faruk Erdem

How To Insert Random Data In PostgreSQL

In some cases, we may want to increase the size of the database by inserting random data into the database. In the script below, we create a table named t_random. [crayon-5c3e7d42b14f9652453904/]   We increase the size of the table by inserting some data after the table is created. [crayon-5c3e7d42b14fe079792785/]   We can learn the size […]
2 Nov by Faruk Erdem

How to Change User Name in PostgreSQL

  You have created a user in Postgresql, but software developer ask for change the user name or you have to change it for different reasons. You do not need to delete and re-create the user, you can change the user name using the command below. [crayon-5c3e7d42b16bc096629299/]
1 Nov by Faruk Erdem

How To Find and Kill Long Running Queries In PostgreSQL

  You can use the following queries to monitor the performance of the database or to find and kill queries that cause lock. The following query returns queries that last longer than 5 minutes. [crayon-5c3e7d42b1898322732690/]   You can find queries that have ExclusiveLock with the following query. [crayon-5c3e7d42b189d427789037/]   We have found your query with […]
28 Oct by Faruk Erdem

How to Install Postgresql Sample Database

  In Postgresql, sometimes we need a sample database when we test. We can use pagila in postgresql.org for this. You can follow the steps below to install Pagilla. We’re running the following command to load Pagila’s files. [crayon-5c3e7d42b1a99011769410/]   As you can see above, pagila files were created. Let’s see where it is now. […]