{"id":20926,"date":"2022-12-06T15:03:30","date_gmt":"2022-12-06T14:03:30","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=20926"},"modified":"2022-12-06T15:03:31","modified_gmt":"2022-12-06T14:03:31","slug":"some-tips-when-developing-in-postgresqls-pl-pgsql","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/some-tips-when-developing-in-postgresqls-pl-pgsql\/","title":{"rendered":"Some tips when developing in PostgreSQL&#8217;s PL\/pgSQL"},"content":{"rendered":"\n<p>When you develop <a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-createfunction.html\" target=\"_blank\" rel=\"noreferrer noopener\">functions<\/a> or <a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-createprocedure.html\" target=\"_blank\" rel=\"noreferrer noopener\">procedures<\/a> in PostgreSQL&#8217;s <a href=\"https:\/\/www.postgresql.org\/docs\/current\/plpgsql.html\" target=\"_blank\" rel=\"noreferrer noopener\">PL\/pgSQL<\/a> there are some points to consider, which make your life easier. This post is not about control structures, nor is it about development in general. This is more about small things to know, especially if you just started with PostgreSQL and PL\/pgSQL.<\/p>\n\n\n\n<p>Consider this function:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# create or replace function f1() returns void as\n$$\nbegin\n  select * from t1;\nend; $$ language plpgsql;\nCREATE FUNCTION\n<\/pre><\/div>\n\n\n<p>PostgreSQL will create the function without any issues, but as soon as you call the function, you&#8217;ll notice that you get an error, because the table &#8220;t1&#8221; does not exist:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# select f1();\nERROR:  relation &quot;t1&quot; does not exist\nLINE 1: select * from t1\n                      ^\nQUERY:  select * from t1\nCONTEXT:  PL\/pgSQL function f1() line 3 at SQL statement\n<\/pre><\/div>\n\n\n<p>This means, PostgreSQL does not check if referenced objects in the body of the function do really exist at the time the function is created. It is, however, checking if the data type you want to return does really exist:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# create or replace function f2() returns my_type as\n$$\nbegin\n  select * from t1;\nend; $$ language plpgsql;\nERROR:  type &quot;my_type&quot; does not exist\n<\/pre><\/div>\n\n\n<p>I&#8217;ve covered that in more detail some time ago <a href=\"https:\/\/www.dbi-services.com\/blog\/postgresql-check_function_bodies-what-is-it-good-for\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<p>Another point to consider is, that you can enable additional Compile-Time and Run-Time checks. Lets have a look a the following function:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# create or replace function f3(p1 int) returns int as\n$$\ndeclare\n  p1 int := 1;\nbegin\n  return p1;\nend; $$ language plpgsql;\nCREATE FUNCTION\n<\/pre><\/div>\n\n\n<p>If we call the function like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# select * from f3(2);\n<\/pre><\/div>\n\n\n<p>&#8230; what will it return, one or two? The parameter which goes into the function has the same name as the variable in the function. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# select * from f3(2);\n f3 \n----\n  1\n(1 row)\n<\/pre><\/div>\n\n\n<p>This is called shadowing of variables and you can tell PostgreSQL to check for this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; highlight: [10,11]; title: ; notranslate\" title=\"\">\npostgres=# set plpgsql.extra_warnings to &#039;shadowed_variables&#039;;\nSET\npostgres=# create or replace function f3(p1 int) returns int as\n$$\ndeclare\n  p1 int := 1;\nbegin\n  return p1;\nend; $$ language plpgsql;\nWARNING:  variable &quot;p1&quot; shadows a previously defined variable\nLINE 4:   p1 int := 1;\n          ^\nCREATE FUNCTION\npostgres=# \n\n<\/pre><\/div>\n\n\n<p>Lets have a look at another example:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# create table t ( a int, b int );\nCREATE TABLE\npostgres=# insert into t values (1,1);\nINSERT 0 1\npostgres=# create function f4() returns void as\n$$\ndeclare\n  v1 int;\n  v2 int;\nbegin\n  select a,b\n    into v1,v2\n    from t;\nend; $$ language plpgsql;\nCREATE FUNCTION\n<\/pre><\/div>\n\n\n<p>Executing this currently is not an issue as the table exactly contains one row:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# select * from f4();\n f4 \n----\n \n(1 row)\n<\/pre><\/div>\n\n\n<p>But what happens if there is more than one row in that table?<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# insert into t values (2,2);\nINSERT 0 1\npostgres=# select * from f4();\n f4 \n----\n \n(1 row)\n<\/pre><\/div>\n\n\n<p>PostgreSQL will still execute the function, but how can you know which row you get? If you have an &#8220;into&#8221; statement and there will be potentially more than row returned, this is probably wrong and you can ask PostgreSQL to warn you about that:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; highlight: [4,5]; title: ; notranslate\" title=\"\">\npostgres=# set plpgsql.extra_warnings to &#039;too_many_rows&#039;;\nSET\npostgres=# select * from f4();\nWARNING:  query returned more than one row\nHINT:  Make sure the query returns a single row, or use LIMIT 1.\n f4 \n----\n \n(1 row)\n\npostgres=# \n<\/pre><\/div>\n\n\n<p>Last example for today: Consider this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# create or replace function f5() returns void as\n$$\ndeclare\n  v1 int;\n  v2 int;\nbegin\n  select a,b,&#039;aaa&#039;\n    into v1,v2\n    from t;\nend; $$ language plpgsql;\nCREATE FUNCTION\npostgres=# select f5();\nWARNING:  query returned more than one row\nHINT:  Make sure the query returns a single row, or use LIMIT 1.\n f5 \n----\n \n(1 row)\n<\/pre><\/div>\n\n\n<p>We still get the warning from before, but what happens to the third value we&#8217;ve selected? PostgreSQL will just ignore it, but you also can enable a warning for this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; highlight: [4,5,6]; title: ; notranslate\" title=\"\">\npostgres=# set plpgsql.extra_warnings to &#039;strict_multi_assignment&#039;;\nSET\npostgres=# select f5();\nWARNING:  number of source and target fields in assignment does not match\nDETAIL:  strict_multi_assignment check of extra_warnings is active.\nHINT:  Make sure the query returns the exact list of columns.\n f5 \n----\n \n(1 row)\n\npostgres=# \n<\/pre><\/div>\n\n\n<p>Combining these flags is possible as well:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\npostgres=# set plpgsql.extra_warnings to &#039;strict_multi_assignment&#039;,&#039;too_many_rows&#039;,&#039;shadowed_variables&#039;;\nSET\n<\/pre><\/div>\n\n\n<p>At least for the time you spend on developing functions or procedures you should enable those.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you develop functions or procedures in PostgreSQL&#8217;s PL\/pgSQL there are some points to consider, which make your life easier. This post is not about control structures, nor is it about development in general. This is more about small things to know, especially if you just started with PostgreSQL and PL\/pgSQL. Consider this function: PostgreSQL [&hellip;]<\/p>\n","protected":false},"author":29,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229,198,368],"tags":[2775,77],"type_dbi":[],"class_list":["post-20926","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","category-database-management","category-development-performance","tag-pl-pgsql","tag-postgresql"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Some tips when developing in PostgreSQL&#039;s PL\/pgSQL - dbi Blog<\/title>\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\/some-tips-when-developing-in-postgresqls-pl-pgsql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Some tips when developing in PostgreSQL&#039;s PL\/pgSQL\" \/>\n<meta property=\"og:description\" content=\"When you develop functions or procedures in PostgreSQL&#8217;s PL\/pgSQL there are some points to consider, which make your life easier. This post is not about control structures, nor is it about development in general. This is more about small things to know, especially if you just started with PostgreSQL and PL\/pgSQL. Consider this function: PostgreSQL [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/some-tips-when-developing-in-postgresqls-pl-pgsql\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-06T14:03:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-06T14:03:31+00:00\" \/>\n<meta name=\"author\" content=\"Daniel Westermann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@westermanndanie\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daniel Westermann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 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\\\/some-tips-when-developing-in-postgresqls-pl-pgsql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/some-tips-when-developing-in-postgresqls-pl-pgsql\\\/\"},\"author\":{\"name\":\"Daniel Westermann\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"headline\":\"Some tips when developing in PostgreSQL&#8217;s PL\\\/pgSQL\",\"datePublished\":\"2022-12-06T14:03:30+00:00\",\"dateModified\":\"2022-12-06T14:03:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/some-tips-when-developing-in-postgresqls-pl-pgsql\\\/\"},\"wordCount\":354,\"commentCount\":0,\"keywords\":[\"PL\\\/pgSQL\",\"PostgreSQL\"],\"articleSection\":[\"Database Administration &amp; Monitoring\",\"Database management\",\"Development &amp; Performance\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/some-tips-when-developing-in-postgresqls-pl-pgsql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/some-tips-when-developing-in-postgresqls-pl-pgsql\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/some-tips-when-developing-in-postgresqls-pl-pgsql\\\/\",\"name\":\"Some tips when developing in PostgreSQL's PL\\\/pgSQL - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2022-12-06T14:03:30+00:00\",\"dateModified\":\"2022-12-06T14:03:31+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/some-tips-when-developing-in-postgresqls-pl-pgsql\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/some-tips-when-developing-in-postgresqls-pl-pgsql\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/some-tips-when-developing-in-postgresqls-pl-pgsql\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Some tips when developing in PostgreSQL&#8217;s PL\\\/pgSQL\"}]},{\"@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\\\/8d08e9bd996a89bd75c0286cbabf3c66\",\"name\":\"Daniel Westermann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"caption\":\"Daniel Westermann\"},\"description\":\"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\\\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.\",\"sameAs\":[\"https:\\\/\\\/x.com\\\/westermanndanie\"],\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/daniel-westermann\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Some tips when developing in PostgreSQL's PL\/pgSQL - dbi Blog","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\/some-tips-when-developing-in-postgresqls-pl-pgsql\/","og_locale":"en_US","og_type":"article","og_title":"Some tips when developing in PostgreSQL's PL\/pgSQL","og_description":"When you develop functions or procedures in PostgreSQL&#8217;s PL\/pgSQL there are some points to consider, which make your life easier. This post is not about control structures, nor is it about development in general. This is more about small things to know, especially if you just started with PostgreSQL and PL\/pgSQL. Consider this function: PostgreSQL [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/some-tips-when-developing-in-postgresqls-pl-pgsql\/","og_site_name":"dbi Blog","article_published_time":"2022-12-06T14:03:30+00:00","article_modified_time":"2022-12-06T14:03:31+00:00","author":"Daniel Westermann","twitter_card":"summary_large_image","twitter_creator":"@westermanndanie","twitter_misc":{"Written by":"Daniel Westermann","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/some-tips-when-developing-in-postgresqls-pl-pgsql\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/some-tips-when-developing-in-postgresqls-pl-pgsql\/"},"author":{"name":"Daniel Westermann","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"headline":"Some tips when developing in PostgreSQL&#8217;s PL\/pgSQL","datePublished":"2022-12-06T14:03:30+00:00","dateModified":"2022-12-06T14:03:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/some-tips-when-developing-in-postgresqls-pl-pgsql\/"},"wordCount":354,"commentCount":0,"keywords":["PL\/pgSQL","PostgreSQL"],"articleSection":["Database Administration &amp; Monitoring","Database management","Development &amp; Performance"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/some-tips-when-developing-in-postgresqls-pl-pgsql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/some-tips-when-developing-in-postgresqls-pl-pgsql\/","url":"https:\/\/www.dbi-services.com\/blog\/some-tips-when-developing-in-postgresqls-pl-pgsql\/","name":"Some tips when developing in PostgreSQL's PL\/pgSQL - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2022-12-06T14:03:30+00:00","dateModified":"2022-12-06T14:03:31+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/some-tips-when-developing-in-postgresqls-pl-pgsql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/some-tips-when-developing-in-postgresqls-pl-pgsql\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/some-tips-when-developing-in-postgresqls-pl-pgsql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Some tips when developing in PostgreSQL&#8217;s PL\/pgSQL"}]},{"@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\/8d08e9bd996a89bd75c0286cbabf3c66","name":"Daniel Westermann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","caption":"Daniel Westermann"},"description":"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.","sameAs":["https:\/\/x.com\/westermanndanie"],"url":"https:\/\/www.dbi-services.com\/blog\/author\/daniel-westermann\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/20926","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\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=20926"}],"version-history":[{"count":9,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/20926\/revisions"}],"predecessor-version":[{"id":20935,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/20926\/revisions\/20935"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=20926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=20926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=20926"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=20926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}