{"id":12150,"date":"2018-12-07T22:32:08","date_gmt":"2018-12-07T21:32:08","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/"},"modified":"2023-06-09T17:14:07","modified_gmt":"2023-06-09T15:14:07","slug":"postgresql-get-my-database-server-name","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/","title":{"rendered":"PostgreSQL : Get my database server name"},"content":{"rendered":"<p><strong>By Mouhamadou Diaw<\/strong><\/p>\n<p>I was looking for a build-in function to get the hostname of the server hosting my PostgreSQL cluster.<br \/>\nBut seems that there is no build-in function. Looking in the extensions, I find the extension hostname which can allow to get the database server host name.<br \/>\nIn this this blog I am explaining how to install and how to use it. The installation is very easy. The first step is to download it <a href=\"https:\/\/github.com\/theory\/pg-hostname\/\" target=\"_blank\" rel=\"noopener noreferrer\"> here <\/a>.<\/p>\n<p>After let\u2019s go to the directory where the archive was decompressed and let\u2019s run the command make<\/p>\n<div>\n<div id=\"highlighter_686757\" class=\"syntaxhighlighter  bash\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<div class=\"line number5 index4 alt2\">5<\/div>\n<div class=\"line number6 index5 alt1\">6<\/div>\n<div class=\"line number7 index6 alt2\">7<\/div>\n<div class=\"line number8 index7 alt1\">8<\/div>\n<div class=\"line number9 index8 alt2\">9<\/div>\n<div class=\"line number10 index9 alt1\">10<\/div>\n<div class=\"line number11 index10 alt2\">11<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"bash plain\">master<\/code><code class=\"bash plain\">\/pg-hostname-master\/<\/code> <code class=\"bash plain\">[PG1] <\/code><code class=\"bash functions\">ls<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"bash plain\">Changes\u00a0 doc\u00a0 <\/code><code class=\"bash functions\">hostname<\/code><code class=\"bash plain\">.control\u00a0 Makefile\u00a0 META.json\u00a0 README.md\u00a0 sql\u00a0 src\u00a0 <\/code><code class=\"bash functions\">test<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"bash plain\">14:46:26 postgres@dbi-pg-essentials:<\/code><code class=\"bash plain\">\/home\/postgres\/pg-hostname-master\/pg-hostname-master\/<\/code> <code class=\"bash plain\">[PG1] <\/code><code class=\"bash functions\">ls<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"bash plain\">Changes\u00a0 doc\u00a0 <\/code><code class=\"bash functions\">hostname<\/code><code class=\"bash plain\">.control\u00a0 Makefile\u00a0 META.json\u00a0 README.md\u00a0 sql\u00a0 src\u00a0 <\/code><code class=\"bash functions\">test<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"bash plain\">14:46:48 postgres@dbi-pg-essentials:<\/code><code class=\"bash plain\">\/home\/postgres\/pg-hostname-<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"bash plain\">master<\/code><code class=\"bash plain\">\/pg-hostname-master\/<\/code> <code class=\"bash plain\">[PG1] <\/code><code class=\"bash functions\">make<\/code><\/div>\n<div class=\"line number8 index7 alt1\"><code class=\"bash functions\">gcc<\/code> <code class=\"bash plain\">-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-<\/code><code class=\"bash functions\">format<\/code><code class=\"bash plain\">-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fpic -I. -I.\/ -I<\/code><code class=\"bash plain\">\/u01\/app\/postgres\/product\/95\/db_0\/include\/server<\/code> <code class=\"bash plain\">-I<\/code><code class=\"bash plain\">\/u01\/app\/postgres\/product\/95\/db_0\/include\/internal<\/code> <code class=\"bash plain\">-D_GNU_SOURCE -I<\/code><code class=\"bash plain\">\/usr\/include\/libxml2<\/code>\u00a0\u00a0 <code class=\"bash plain\">-c -o src<\/code><code class=\"bash plain\">\/hostname<\/code><code class=\"bash plain\">.o src<\/code><code class=\"bash plain\">\/hostname<\/code><code class=\"bash plain\">.c<\/code><\/div>\n<div class=\"line number9 index8 alt2\"><code class=\"bash functions\">gcc<\/code> <code class=\"bash plain\">-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-<\/code><code class=\"bash functions\">format<\/code><code class=\"bash plain\">-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -fpic -L<\/code><code class=\"bash plain\">\/u01\/app\/postgres\/product\/95\/db_0\/lib<\/code> <code class=\"bash plain\">-Wl,--as-needed -Wl,-rpath,<\/code><code class=\"bash string\">'\/u01\/app\/postgres\/product\/95\/db_0\/lib'<\/code><code class=\"bash plain\">,--<\/code><code class=\"bash functions\">enable<\/code><code class=\"bash plain\">-new-dtags\u00a0 -shared -o src<\/code><code class=\"bash plain\">\/hostname<\/code><code class=\"bash plain\">.so src<\/code><code class=\"bash plain\">\/hostname<\/code><code class=\"bash plain\">.o<\/code><\/div>\n<div class=\"line number10 index9 alt1\"><code class=\"bash functions\">cp<\/code> <code class=\"bash plain\">sql<\/code><code class=\"bash plain\">\/hostname<\/code><code class=\"bash plain\">.sql sql<\/code><code class=\"bash plain\">\/hostname--1<\/code><code class=\"bash plain\">.0.0.sql<\/code><\/div>\n<div class=\"line number11 index10 alt2\"><code class=\"bash plain\">14:46:55 postgres@dbi-pg-essentials:<\/code><code class=\"bash plain\">\/home\/postgres\/pg-hostname-<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Once done let\u2019s run the command make install<\/p>\n<div>\n<div id=\"highlighter_172278\" class=\"syntaxhighlighter  bash\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<div class=\"line number5 index4 alt2\">5<\/div>\n<div class=\"line number6 index5 alt1\">6<\/div>\n<div class=\"line number7 index6 alt2\">7<\/div>\n<div class=\"line number8 index7 alt1\">8<\/div>\n<div class=\"line number9 index8 alt2\">9<\/div>\n<div class=\"line number10 index9 alt1\">10<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"bash plain\">pg-<\/code><code class=\"bash functions\">hostname<\/code><code class=\"bash plain\">-master\/ [PG1] <\/code><code class=\"bash functions\">make<\/code> <code class=\"bash functions\">install<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"bash plain\">\/bin\/mkdir<\/code> <code class=\"bash plain\">-p <\/code><code class=\"bash string\">'\/u01\/app\/postgres\/product\/95\/db_0\/share\/extension'<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"bash plain\">\/bin\/mkdir<\/code> <code class=\"bash plain\">-p <\/code><code class=\"bash string\">'\/u01\/app\/postgres\/product\/95\/db_0\/share\/extension'<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"bash plain\">\/bin\/mkdir<\/code> <code class=\"bash plain\">-p <\/code><code class=\"bash string\">'\/u01\/app\/postgres\/product\/95\/db_0\/lib'<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"bash plain\">\/bin\/mkdir<\/code> <code class=\"bash plain\">-p <\/code><code class=\"bash string\">'\/u01\/app\/postgres\/product\/95\/db_0\/share\/doc\/extension'<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"bash plain\">\/bin\/install<\/code> <code class=\"bash plain\">-c -m 644 .<\/code><code class=\"bash plain\">\/\/hostname<\/code><code class=\"bash plain\">.control <\/code><code class=\"bash string\">'\/u01\/app\/postgres\/product\/95\/db_0\/share\/extension\/'<\/code><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"bash plain\">\/bin\/install<\/code> <code class=\"bash plain\">-c -m 644 .<\/code><code class=\"bash plain\">\/\/sql\/hostname--1<\/code><code class=\"bash plain\">.0.0.sql .<\/code><code class=\"bash plain\">\/\/sql\/hostname--unpackaged--1<\/code><code class=\"bash plain\">.0.0.sql\u00a0 <\/code><code class=\"bash string\">'\/u01\/app\/postgres\/product\/95\/db_0\/share\/extension\/'<\/code><\/div>\n<div class=\"line number8 index7 alt1\"><code class=\"bash plain\">\/bin\/install<\/code> <code class=\"bash plain\">-c -m 755\u00a0 src<\/code><code class=\"bash plain\">\/hostname<\/code><code class=\"bash plain\">.so <\/code><code class=\"bash string\">'\/u01\/app\/postgres\/product\/95\/db_0\/lib\/'<\/code><\/div>\n<div class=\"line number9 index8 alt2\"><code class=\"bash plain\">\/bin\/install<\/code> <code class=\"bash plain\">-c -m 644 .<\/code><code class=\"bash plain\">\/\/doc\/hostname<\/code><code class=\"bash plain\">.mmd <\/code><code class=\"bash string\">'\/u01\/app\/postgres\/product\/95\/db_0\/share\/doc\/extension\/'<\/code><\/div>\n<div class=\"line number10 index9 alt1\"><code class=\"bash plain\">14:47:29 postgres@dbi-pg-essentials:<\/code><code class=\"bash plain\">\/home\/postgres\/pg-hostname-master\/pg-hostname-master\/<\/code> <code class=\"bash plain\">[PG1]<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>If everything is ok we should now have the extension in our $PGHOME\/share\/extension<\/p>\n<div>\n<div id=\"highlighter_13050\" class=\"syntaxhighlighter  bash\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"bash plain\">15:02:39 postgres@dbi-pg-essentials:[PG1] <\/code><code class=\"bash functions\">ls<\/code> <code class=\"bash plain\">-ltra *<\/code><code class=\"bash functions\">hostname<\/code><code class=\"bash plain\">*<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"bash plain\">-rw-r--r--. 1 postgres postgres 140 Dec\u00a0 5 14:47 <\/code><code class=\"bash functions\">hostname<\/code><code class=\"bash plain\">.control<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"bash plain\">-rw-r--r--. 1 postgres postgres\u00a0 96 Dec\u00a0 5 14:47 <\/code><code class=\"bash functions\">hostname<\/code><code class=\"bash plain\">--1.0.0.sql<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"bash plain\">-rw-r--r--. 1 postgres <\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>And that\u2019s all. We just have now have to install the extension in the database<\/p>\n<div>\n<div id=\"highlighter_110511\" class=\"syntaxhighlighter  bash\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"bash plain\">postgres=<\/code><code class=\"bash comments\"># CREATE EXTENSION hostname;<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"bash plain\">CREATE EXTENSION<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>And then now we can have the hostname of our the server<\/p>\n<div>\n<div id=\"highlighter_103815\" class=\"syntaxhighlighter  bash\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<div class=\"line number5 index4 alt2\">5<\/div>\n<div class=\"line number6 index5 alt1\">6<\/div>\n<div class=\"line number7 index6 alt2\">7<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"bash plain\">postgres=<\/code><code class=\"bash comments\"># SELECT hostname();<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"bash spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"bash functions\">hostname<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"bash plain\">-------------------<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"bash spaces\">\u00a0<\/code><code class=\"bash plain\">dbi-pg-essentials<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"bash plain\">(1 row)<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"bash plain\">postgres=<\/code><code class=\"bash comments\">#<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>By Mouhamadou Diaw I was looking for a build-in function to get the hostname of the server hosting my PostgreSQL cluster. But seems that there is no build-in function. Looking in the extensions, I find the extension hostname which can allow to get the database server host name. In this this blog I am explaining [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229],"tags":[378,1513,77],"type_dbi":[],"class_list":["post-12150","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","tag-extension","tag-gethostname","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 : Get my database server name - dbi Blog<\/title>\n<meta name=\"description\" content=\"PostgreSQL, gethostname,extension\" \/>\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-get-my-database-server-name\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PostgreSQL : Get my database server name\" \/>\n<meta property=\"og:description\" content=\"PostgreSQL, gethostname,extension\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-12-07T21:32:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-09T15:14:07+00:00\" \/>\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=\"2 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-get-my-database-server-name\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"PostgreSQL : Get my database server name\",\"datePublished\":\"2018-12-07T21:32:08+00:00\",\"dateModified\":\"2023-06-09T15:14:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/\"},\"wordCount\":153,\"commentCount\":0,\"keywords\":[\"Extension\",\"gethostname\",\"PostgreSQL\"],\"articleSection\":[\"Database Administration &amp; Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/\",\"name\":\"PostgreSQL : Get my database server name - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2018-12-07T21:32:08+00:00\",\"dateModified\":\"2023-06-09T15:14:07+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"description\":\"PostgreSQL, gethostname,extension\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PostgreSQL : Get my database server name\"}]},{\"@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 : Get my database server name - dbi Blog","description":"PostgreSQL, gethostname,extension","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-get-my-database-server-name\/","og_locale":"en_US","og_type":"article","og_title":"PostgreSQL : Get my database server name","og_description":"PostgreSQL, gethostname,extension","og_url":"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/","og_site_name":"dbi Blog","article_published_time":"2018-12-07T21:32:08+00:00","article_modified_time":"2023-06-09T15:14:07+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"PostgreSQL : Get my database server name","datePublished":"2018-12-07T21:32:08+00:00","dateModified":"2023-06-09T15:14:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/"},"wordCount":153,"commentCount":0,"keywords":["Extension","gethostname","PostgreSQL"],"articleSection":["Database Administration &amp; Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/","url":"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/","name":"PostgreSQL : Get my database server name - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2018-12-07T21:32:08+00:00","dateModified":"2023-06-09T15:14:07+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"description":"PostgreSQL, gethostname,extension","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-get-my-database-server-name\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"PostgreSQL : Get my database server name"}]},{"@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\/12150","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=12150"}],"version-history":[{"count":1,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/12150\/revisions"}],"predecessor-version":[{"id":25795,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/12150\/revisions\/25795"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=12150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=12150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=12150"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=12150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}