{"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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">&#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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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":28,"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 v28.8 (Yoast SEO v28.8) - 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=\"Open source 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=\"Open source Team\" \/>\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\":\"Open source Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/4bae5e5dd8c7d48edbd948772b49b202\"},\"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\\\/4bae5e5dd8c7d48edbd948772b49b202\"},\"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\\\/4bae5e5dd8c7d48edbd948772b49b202\",\"name\":\"Open source Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"caption\":\"Open source Team\"},\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/open-source-team\\\/\"}]}<\/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":"Open source Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Open source Team","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":"Open source Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/4bae5e5dd8c7d48edbd948772b49b202"},"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\/4bae5e5dd8c7d48edbd948772b49b202"},"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\/4bae5e5dd8c7d48edbd948772b49b202","name":"Open source Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","caption":"Open source Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/open-source-team\/"}]}},"_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\/28"}],"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}]}}