{"id":2854,"date":"2014-08-04T04:16:00","date_gmt":"2014-08-04T02:16:00","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/"},"modified":"2014-08-04T04:16:00","modified_gmt":"2014-08-04T02:16:00","slug":"postgresql-for-oracle-dbas-an-introduction","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/","title":{"rendered":"PostgreSQL for Oracle DBAs &#8211; an introduction"},"content":{"rendered":"<p><img decoding=\"async\" class=\"blog-image aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_postgresqlfr-logo.jpg\" alt=\"\" \/><\/p>\n<p>Having worked for several years as an Oracle DBA, I decided to have a look at the PostgreSQL database and see how it functions in comparison to the Oracle Database.<\/p>\n<p>The &#8220;Enterprise DB&#8221; graphical installation of PostgreSQL 9.3 is quite easy and rather fast. Under Linux you run the graphical installer, dialog boxes lead you through the installation process. You enter the specific information of your system and at the end of the PostgreSQL installation, the Stack Builder package is invoked if you need to install applications, drivers, agents or utilities.<\/p>\n<p>You can download the Enterprise DB utility using the following URL:<br \/>\n<a href=\"http:\/\/www.enterprisedb.com\/downloads\/postgres-postgresql-downloads\" target=\"_top\">http:\/\/www.enterprisedb.com\/downloads\/postgres-postgresql-downloads<\/a><\/p>\n<p>I have installed PostgreSQL 9.3 using Enterprise DB as described below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg1.png\" alt=\"pg1\" width=\"559\" height=\"428\" \/><\/p>\n<p>Choose Next.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg2.png\" alt=\"pg2\" width=\"560\" height=\"427\" \/><\/p>\n<p>Specify the installation directory where PostgreSQL 9.3 will be installed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg3.png\" alt=\"pg3\" width=\"558\" height=\"427\" \/><\/p>\n<p>Select the directory that will store the data.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg4.png\" alt=\"pg4\" width=\"560\" height=\"429\" \/><\/p>\n<p>Provide a password to the PostgreSQL database user.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg5.png\" alt=\"pg5\" width=\"558\" height=\"429\" \/><\/p>\n<p>Select a port number.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg6.png\" alt=\"pg6\" width=\"559\" height=\"428\" \/><\/p>\n<p>Choose the locale for the new database cluster.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg7.png\" alt=\"pg7\" width=\"557\" height=\"428\" \/><\/p>\n<p>PostgreSQL is now ready to be installed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg8.png\" alt=\"pg8\" width=\"558\" height=\"427\" \/><\/p>\n<p>You can choose to launch or not the Stack Builder &#8211; if not, the installation process will begin.<\/p>\n<p>If you encounter any problem during the installation phase, the log files are generated in \/tmp.<\/p>\n<p>Under Linux, a shell script named uninstall-postgresql is created in the PostgreSQL home directory to de-install the software.<\/p>\n<p>The installation phase is very quick, your PostgreSQL cluster database is ready to use. Furthermore, the Enterprise DB installation creates the automatic startup file in \/etc\/init.d\/postgresql-9.3 to start PostgreSQL in case of a server reboot.<\/p>\n<p>Once the Enterprise DB installation is processed, a database storage area is initialized\u00a0on disk (a database cluster). After the installation, this database cluster will contain a database named postgres and will be used by utilities or users:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">postgres=# list\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 List of databases\u00a0\u00a0 Name\u00a0\u00a0 | Owner\u00a0\u00a0 | Encoding | Collate\u00a0\u00a0 |\u00a0\u00a0 Ctype\u00a0\u00a0 |\u00a0\u00a0 Access privileges-----------+----------+----------+------------+------------+-------------postgres | postgres | UTF8\u00a0\u00a0\u00a0\u00a0 | en_US.utf8 | en_US.utf8 |template0 | postgres | UTF8\u00a0\u00a0\u00a0\u00a0 | en_US.utf8 | en_US.utf8 | =c\/postgres\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0+\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | postgres=CTc\/postgrestemplate1 | postgres | UTF8\u00a0\u00a0\u00a0\u00a0 | en_US.utf8 | en_US.utf8 | postgres=CTc\/postgres+\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | =c\/postgres<\/pre>\n<p>By default, a new database is created by cloning the system standard base named template1. The template0 allows you to create a database containing only pre-defined standard objects.<\/p>\n<p>The sqlplus oracle equivalent command in PostgreSQL is psql. As you will see in the document, the PostgreSQL commands begin with the sign. The \u201c?\u201d command lists every possibility.<\/p>\n<p>For example, the following commands connects to the psi database:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">-bash-3.2$ psql -d psi\nPassword:psql.bin (9.3.4)\nType \"help\" for help.No entry for terminal type \"xterm\";\nusing dumb terminal settings.\npsi=# q<\/pre>\n<p>If you do not want the system to ask for a password, you simply have to create a .pgpass file in the postgres home directory with the 0600 rights and the following syntax:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">-bash-3.2$ more .pgpass\nlocalhost:5432:PSI:postgres:password\n\u00a0\n-bash-3.2$ su - postgres\nPassword:\n-bash-3.2$ psql -d psi\npsql.bin (9.3.4)\nType \"help\" for help.\nNo entry for terminal type \"xterm\";\nusing dumb terminal settings.\npsi=#\npsi-# q<\/pre>\n<p>At first you probably need to create a database. As an Oracle DBA, I was wondering about some typical problems such as character set or default tablespace. With PostgreSQL, it is quite easy to create a database.<\/p>\n<p>As the locale en_US.utf8 has been chosen during the installation phase to be used by the cluster database, every database you will create will use it.<\/p>\n<p>When you create a database you can specify a default tablespace and an owner. At first we create a tablespace:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">postgres=# create tablespace psi location '\/u01\/postgres\/data\/psi';\nCREATE TABLESPACE<\/pre>\n<p>The tablespace data is located in \/u01\/postgres\/data\/psi:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">-bash-3.2$ ls\nPG_9.3_201306121\n-bash-3.2$ ls PG_9.3_201306121\/\n16526\n-bash-3.2$ ls PG_9.3_201306121\/16526\/\n12547\u00a0\u00a0\u00a0\u00a0 12587_vm\u00a0 12624\u00a0\u00a0\u00a0\u00a0 12663\u00a0\u00a0\u00a0\u00a0 12728\u00a0\u00a0\u00a0\u00a0 12773\n12547_fsm 12589\u00a0\u00a0\u00a0\u00a0 12625\u00a0\u00a0\u00a0\u00a0 12664\u00a0\u00a0\u00a0\u00a0 12728_fsm 12774\n12664_vm\u00a0 12730\u00a0\u00a0 12774_vm\u00a0\u00a0\u00a0\u00a0 12627\u00a0\u00a0\u00a0\u00a0 12666\u00a0\u00a0\u00a0\u00a0 12731\u00a0\u00a0\u00a0\u00a0 12776<\/pre>\n<p><code class=\"dbiNormal\">\u2026<\/code><\/p>\n<p>Then we create the database:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">postgres=# create database psi owner postgres tablespace psi;\nCREATE DATABASE<\/pre>\n<p>We can list all databases with the list command:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">postgres=# list\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 List of databases\n\u00a0\u00a0 Name\u00a0\u00a0 | Owner\u00a0\u00a0 | Encoding | Collate\u00a0\u00a0 |\u00a0\u00a0 Ctype\u00a0\u00a0 |\u00a0\u00a0 Access privileges\n-----------+----------+----------+------------+------------+-------------\npostgres | postgres | UTF8\u00a0\u00a0\u00a0\u00a0 | en_US.utf8 | en_US.utf8 |\npsi\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | postgres | UTF8\u00a0\u00a0\u00a0\u00a0 | en_US.utf8 | en_US.utf8 |\ntemplate0 | postgres | UTF8\u00a0\u00a0\u00a0\u00a0 | en_US.utf8 | en_US.utf8 | =c\/postgres\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\n|\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | postgres=CTc\/postgres\ntemplate1 | postgres | UTF8\u00a0\u00a0\u00a0\u00a0 | en_US.utf8 | en_US.utf8 | postgres=CTc\/postgres+\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | =c\/postgres\n<\/pre>\n<p>Now, we can connect to the psi database and create objects, the syntax is quite similar to Oracle:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">postgres=# c psi\nYou are now connected to database \"psi\" as user \"postgres\".<\/pre>\n<p>We create a table and an index:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">psi=# create table employe (name varchar);\nCREATE TABLE\npsi=# create index employe_ix on employe (name);\nCREATE INDEX<\/pre>\n<p>We insert values in it:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">psi=# insert into employe values ('bill');\nINSERT 0 1<\/pre>\n<p>We reconnect to the psi database:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">-bash-3.2$ psql -d psi\nPassword:\npsql.bin (9.3.4)\nType \"help\" for help.\nNo entry for terminal type \"xterm\";\nusing dumb terminal settings.<\/pre>\n<p>The following command lists the tables:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">psi=# dt[+]\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 List of relations\nSchema | Name\u00a0\u00a0 | Type | Owner\u00a0\u00a0 | Size | Description\n--------+---------+-------+----------+-------+-------------\npublic | employe | table | postgres | 16 kB |\n(1 row)\npsi=# select * from employe;\nname\n------\nbill\n(1 row)<\/pre>\n<p>The d+ postgreSQL command is the equivalent of the Oracle desc command:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">psi=# d+ employe\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Table \"public.employe\"\nColumn |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Type\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 | Modifiers | Storage | Stats target | Description\n--------+-------------------+-----------+----------+--------------+-------------\nname\u00a0\u00a0 | character varying |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0| extended |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\nIndexes:\n\u00a0\u00a0 \"employe_ix\" btree (name)\nHas OIDs: no<\/pre>\n<p>Obviously we also have the possibility to create a schema and create objects in this schema.<\/p>\n<p>Let&#8217;s create a schema:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">psi=# create schema psi;\nCREATE SCHEMA<\/pre>\n<p>Let&#8217;s create a table, insert objects in it and create a view:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">psi=# create table psi.salary (val integer);\nCREATE TABLE\npsi=# insert into psi.salary values (10000);\nINSERT 0 1\npsi=# select * from psi.salary;\nval\n-------\n10000\npsi=# create view psi.v_employe as select * from psi.salary;\nCREATE VIEW<\/pre>\n<p>If we list the tables we can only see the public objects:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">psi=# d\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 List of relations\nSchema | Name\u00a0\u00a0 | Type | Owner\u00a0\u00a0\n--------+---------+-------+----------\npublic | employe | table | postgres\n(1 row)<\/pre>\n<p>If we modify the search path, all schemas are visible:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">psi=# set search_path to psi,public;\nSET\npsi=# d\u00a0\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 List of relations\nSchema | Name\u00a0\u00a0 | Type | Owner\u00a0\u00a0\n--------+---------+-------+----------\npsi\u00a0\u00a0 | salary | table | postgres\npublic | employe | table | postgres<\/pre>\n<p>Oracle DBA\u2019s are familiar with sql commands &#8211; e. g. to get the table list of a schema by typing select table_name, owner from user_tables, etc.<br \/>\nWhat is the equivalent query in postgreSQL?<\/p>\n<p>PostgreSQL uses a schema named information_schema available in every database. The owner of this schema is the initial database user in the cluster. You can drop this schema, but the space saving is negligible.<\/p>\n<p>You can easily query the tables of this schema to get precious informations about your database objects:<br \/>\nHere is a list of the schemas tables:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">psi=# select table_name, table_schema from information_schema.tables where table_schema in ('public','psi');\ntable_name | table_schema\n------------+--------------\nemploye\u00a0\u00a0 | public\nsalary\u00a0\u00a0\u00a0\u00a0 | psi<\/pre>\n<p>We can display the database character set:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">psi=# select character_set_name from information_schema.character_sets;\ncharacter_set_name\n--------------------\nUTF8<\/pre>\n<p>We can display schema views:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">psi=# select table_name from information_schema.views where table_schema='psi';\ntable_name\n------------\nv_employe<\/pre>\n<p>Using the information_schema schema helps us to display information about a lot of different database objects (tables, constraints, sequences, triggers, table_privileges \u2026)<\/p>\n<p>Like in Oracle you can run a query from the SQL or the UNIX prompt. For example, if you want to know the index name of the table employe, you shoud use the index.sql script:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">select\nt.relname as table_name,\ni.relname as index_name,\na.attname as column_name\nfrom\npg_class t,pg_class i,\npg_index ix,pg_attribute a\nwheret.oid = ix.indrelid\nand i.oid = ix.indexrelid\nand a.attrelid = t.oid\nand a.attnum = ANY(ix.indkey)\nand t.relkind = 'r'\nand t.relname = 'employe'\norder byt.relname,i.relname;<\/pre>\n<p>If you want to display the employee index from the SQL prompt, you run:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">psi=# i index.sql\ntable_name | index_name | column_name\n------------+------------+-------------\nemploye\u00a0\u00a0 | employe_ix | name\n\u00a0\nIf you want to run the same query from the UNIX prompt:\n\u00a0\n-bash-3.2$ psql -d psi -a -f index.sql\nPassword:\ntable_name | index_name | column_name\n------------+------------+-------------\nemploye\u00a0\u00a0 | employe_ix | name<\/pre>\n<p>However, typing an SQL request might be interesting, but &#8211; as many Oracle DBA &#8211; I like using an administration console because I think it increases efficiency.<\/p>\n<p>I have discovered pgAdmin, an administration tool designed for Unix or Windows systems. pgAdmin is easy to install on a PostgreSQL environment and enables many operations for the administration of a cluster database.<\/p>\n<p>pgAdmin3 is installed in the home directory of the user postgre &#8211; in my case in \/opt\/postgres\/9.3.<\/p>\n<p>To successfully enable pgAdmin3, it is necessary to correctly initialize the LD_LIBRARY_PATH variable:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">export LD_LIBRARY_PATH=\/opt\/PostgreSQL\/9.3\/lib:\/opt\/PostgreSQL\/9.3\/pgAdmin3\/lib<\/pre>\n<p>The pgadmin3 console:<\/p>\n<p><span style=\"font-size: 9.5pt; font-family: 'DIN Offc','sans-serif';\"><img loading=\"lazy\" decoding=\"async\" style=\"vertical-align: middle;\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg9.png\" alt=\"pg9\" width=\"558\" height=\"363\" \/><\/span><\/p>\n<p>As you can see, you can administer every database object (tables, functions, sequences, triggers, views\u2026).<\/p>\n<p>You can visualize the table creation scripts:<\/p>\n<p><span style=\"font-size: 9.5pt; font-family: 'DIN Offc','sans-serif';\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg9.png\" alt=\"pg9\" width=\"560\" height=\"365\" \/><\/span><\/p>\n<p>You can edit \/ change \/ modify the privileges of an object:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg11.png\" alt=\"pg11\" width=\"560\" height=\"427\" \/><\/p>\n<p>You also have the possibility to create scripst for the database creation:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg12.png\" alt=\"pg12\" width=\"560\" height=\"336\" \/><\/p>\n<p>Or even to backup the database:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg13.png\" alt=\"pg13\" width=\"560\" height=\"473\" \/><\/p>\n<p>This tool seems to be very powerful, even if for the moment, I did not find any performance tool available like in Cloud Control 12c.<\/p>\n<h3>Conclusion<\/h3>\n<p>Discovering PostgreSQL as an Oracle DBA, I realized how close the two products are. The PostgreSQL database has a lot of advantages such as the easy installation, the general usage and the price (because it\u2019s free!).<\/p>\n<p>For the processing of huge amounts of data, Oracle certainly has advantages, nevertheless the choice of a RDBMS always depends on what your application business needs are.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Having worked for several years as an Oracle DBA, I decided to have a look at the PostgreSQL database and see how it functions in comparison to the Oracle Database. The &#8220;Enterprise DB&#8221; graphical installation of PostgreSQL 9.3 is quite easy and rather fast. Under Linux you run the graphical installer, dialog boxes lead you [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":2855,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[198],"tags":[280,23,209,77],"type_dbi":[],"class_list":["post-2854","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-management","tag-database","tag-dba","tag-oracle-12c","tag-postgresql"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>PostgreSQL for Oracle DBAs - an introduction - dbi Blog<\/title>\n<meta name=\"description\" content=\"Having worked for several years as an Oracle DBA, I decided to have a look at the PostgreSQL database and see how it functions in comparison to the Oracle Database. The &quot;Enterprise DB&quot; graphical installation of PostgreSQL 9.3 is quite easy and rather fast.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PostgreSQL for Oracle DBAs - an introduction\" \/>\n<meta property=\"og:description\" content=\"Having worked for several years as an Oracle DBA, I decided to have a look at the PostgreSQL database and see how it functions in comparison to the Oracle Database. The &quot;Enterprise DB&quot; graphical installation of PostgreSQL 9.3 is quite easy and rather fast.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-08-04T02:16:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_postgresqlfr-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"PostgreSQL for Oracle DBAs &#8211; an introduction\",\"datePublished\":\"2014-08-04T02:16:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/\"},\"wordCount\":1032,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_postgresqlfr-logo.jpg\",\"keywords\":[\"database\",\"DBA\",\"Oracle 12c\",\"PostgreSQL\"],\"articleSection\":[\"Database management\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/\",\"name\":\"PostgreSQL for Oracle DBAs - an introduction - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_postgresqlfr-logo.jpg\",\"datePublished\":\"2014-08-04T02:16:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"description\":\"Having worked for several years as an Oracle DBA, I decided to have a look at the PostgreSQL database and see how it functions in comparison to the Oracle Database. The \\\"Enterprise DB\\\" graphical installation of PostgreSQL 9.3 is quite easy and rather fast.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_postgresqlfr-logo.jpg\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_postgresqlfr-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PostgreSQL for Oracle DBAs &#8211; an introduction\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"PostgreSQL for Oracle DBAs - an introduction - dbi Blog","description":"Having worked for several years as an Oracle DBA, I decided to have a look at the PostgreSQL database and see how it functions in comparison to the Oracle Database. The \"Enterprise DB\" graphical installation of PostgreSQL 9.3 is quite easy and rather fast.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/","og_locale":"en_US","og_type":"article","og_title":"PostgreSQL for Oracle DBAs - an introduction","og_description":"Having worked for several years as an Oracle DBA, I decided to have a look at the PostgreSQL database and see how it functions in comparison to the Oracle Database. The \"Enterprise DB\" graphical installation of PostgreSQL 9.3 is quite easy and rather fast.","og_url":"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/","og_site_name":"dbi Blog","article_published_time":"2014-08-04T02:16:00+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_postgresqlfr-logo.jpg","type":"image\/jpeg"}],"author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"PostgreSQL for Oracle DBAs &#8211; an introduction","datePublished":"2014-08-04T02:16:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/"},"wordCount":1032,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_postgresqlfr-logo.jpg","keywords":["database","DBA","Oracle 12c","PostgreSQL"],"articleSection":["Database management"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/","url":"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/","name":"PostgreSQL for Oracle DBAs - an introduction - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_postgresqlfr-logo.jpg","datePublished":"2014-08-04T02:16:00+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"description":"Having worked for several years as an Oracle DBA, I decided to have a look at the PostgreSQL database and see how it functions in comparison to the Oracle Database. The \"Enterprise DB\" graphical installation of PostgreSQL 9.3 is quite easy and rather fast.","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_postgresqlfr-logo.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/2e1ax_default_entry_postgresqlfr-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-for-oracle-dbas-an-introduction\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"PostgreSQL for Oracle DBAs &#8211; an introduction"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/2854","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=2854"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/2854\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/2855"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=2854"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=2854"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=2854"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=2854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}