
{"id":3887,"date":"2023-04-07T01:08:03","date_gmt":"2023-04-07T01:08:03","guid":{"rendered":"https:\/\/test.opensource-db.in\/wp1\/?p=3887"},"modified":"2023-04-07T01:39:43","modified_gmt":"2023-04-07T01:39:43","slug":"postgres-triggers-best-practices-pgsql-phriday-007","status":"publish","type":"post","link":"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/","title":{"rendered":"Postgres Triggers: Best Practices and Common Use Cases &#8211; PGSQL Phriday #007"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">PGSQL Phriday #007 &#8211; Be the James Bond of your Database &#8211; take risks, Create Triggers, and always remember that you have a license to thrill.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">L\u00e6titia Avrot is hosting the <a href=\"https:\/\/mydbanotebook.org\/post\/triggers\/\" target=\"_blank\" rel=\"noreferrer noopener\">#PGSQLPhriday 007<\/a> <br><a href=\"https:\/\/www.pgsqlphriday.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">PGSQL Phriday<\/a>\u00a0is a monthly community blog event by the PostgreSQL community.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-1024x538.png\" alt=\"\" class=\"wp-image-3889\" srcset=\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-1024x538.png 1024w, https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-300x158.png 300w, https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-768x403.png 768w, https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-1536x806.png 1536w, https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-2048x1075.png 2048w, https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-189x99.png 189w, https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-152x80.png 152w, https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-394x207.png 394w, https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-915x480.png 915w, https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-1240x651.png 1240w, https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-1920x1008.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Postgres Triggers<\/strong> is a powerful tool for automatically executing custom code when certain events occur in the database, such as INSERTs, UPDATEs, or DELETEs in a table. While Triggers can be very useful for enforcing business rules, auditing changes to data, and maintaining data consistency, they can potentially corrupt the database if they are not designed and implemented carefully.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Some popular Trigger <em>pitfalls<\/em>:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Endless loops:<\/strong> Triggers can cause infinite loops if they update the same table or tables that are referenced by other Triggers. This can lead to excessive CPU usage and lock the database, resulting in poor performance and even crashing the database.<\/li><li><strong>Conflicts:<\/strong> Triggers can conflict with each other if they are designed to perform the same action on the same table or column. This can result in unexpected behavior, data inconsistencies, and even data loss.<\/li><li><strong>Errors:<\/strong> Triggers can generate errors if they contain bugs or are not designed to handle certain edge cases. This can cause data corruption, inconsistent data, or even crashing the database.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Some <em>best practices<\/em> to follow:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Use sparingly:<\/strong> Triggers should be used only when necessary, and only on the tables where they are needed. Too many triggers can slow down the database and cause unnecessary complexity.<\/li><li><strong>Efficient code:<\/strong> Triggers should be designed to execute quickly and efficiently. This can include using appropriate indexes, optimizing queries, and minimizing the use of unnecessary database resources.<\/li><li><strong>Test thoroughly:<\/strong> Triggers should be thoroughly tested before they are deployed to the production environment. This can include testing for conflicts, performance issues, and error handling.<\/li><li><strong>Monitoring:<\/strong> Triggers should be monitored regularly to ensure that they are executing as expected and that they are not causing excessive load on the database.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Now that we&#8217;ve looked at a bit of Pros &amp; Cons, let&#8217;s look at Postgres triggers that can be used for two main purposes:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Business logic flow<\/li><li>Audit flow<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Business logic flow:<\/strong> To enforce business rules by automatically executing custom code when certain events occur in the database. For example, a trigger can be defined to prevent certain rows from being inserted into a table or to update the values of certain columns based on the values in other columns. This can help to ensure data consistency and enforce business rules.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Audit flow:<\/strong> To audit changes to data by automatically recording information about changes that are made to a table. For example, a trigger can be defined to record the user who made a change, the time when the change was made, and the old and new values of the changed data. This can help to track changes to data over time and identify potential issues.<br><br>Both business logic and audit flows can be useful in different contexts, depending on the specific requirements of the application. It&#8217;s important to design and implement triggers carefully, however, to ensure that they execute efficiently and do not cause performance issues or data corruption.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Event triggers<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Event triggers in Postgres are specifically used to execute custom code in response to specific events that occur in the database. Unlike regular triggers, which are associated with specific tables and execute when changes are made to those tables, event triggers are associated with specific events that occur at the database level, such as the creation or deletion of a table, or the start or end of a transaction.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Defined using the `CREATE EVENT TRIGGER` statement, and can be used for a variety of purposes, including:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Schema management:<\/strong> Event triggers can be used to automate schema management tasks, such as creating or modifying tables, indexes, or other database objects in response to specific events.<br><strong>Security management:<\/strong> Event triggers can be used to enforce security policies.<br><strong>Maintenance: <\/strong>Can be used to automate maintenance tasks, such as archiving data to reduce disk space usage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Conclusion<\/strong><br>Postgres triggers provide a mechanism for responding to changes in your database by executing custom code in response to specific events. Triggers can be used to enforce business rules, validate data, automate tasks, and perform audit logging. They are highly customizable and can be created at the row, statement, or database level, allowing you to tailor their behavior to your specific needs. While triggers can be a powerful tool, they should be used judiciously to avoid negatively impacting database performance.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PGSQL Phriday #007 &#8211; Be the James Bond of your Database &#8211; take risks, Create Triggers, and always remember that [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[23,42],"tags":[64,62,63,61],"class_list":["post-3887","post","type-post","status-publish","format-standard","hentry","category-postgresql-14","category-postgresql-15","tag-pgphriday","tag-pgsql","tag-pgsqlphriday","tag-triggers"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Postgres Triggers: Best Practices and Common Use Cases - PGSQL Phriday #007 - OpenSource DB<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Postgres Triggers: Best Practices and Common Use Cases - PGSQL Phriday #007 - OpenSource DB\" \/>\n<meta property=\"og:description\" content=\"PGSQL Phriday #007 &#8211; Be the James Bond of your Database &#8211; take risks, Create Triggers, and always remember that [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/\" \/>\n<meta property=\"og:site_name\" content=\"OpenSource DB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-07T01:08:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-07T01:39:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-1024x538.png\" \/>\n<meta name=\"author\" content=\"Hari Kiran\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@opensource_db\" \/>\n<meta name=\"twitter:site\" content=\"@opensource_db\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hari Kiran\" \/>\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:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/\"},\"author\":{\"name\":\"Hari Kiran\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/2d16bf6a94c0502f1c5b69e4a36e9a09\"},\"headline\":\"Postgres Triggers: Best Practices and Common Use Cases &#8211; PGSQL Phriday #007\",\"datePublished\":\"2023-04-07T01:08:03+00:00\",\"dateModified\":\"2023-04-07T01:39:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/\"},\"wordCount\":765,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-1024x538.png\",\"keywords\":[\"pgphriday\",\"pgsql\",\"pgsqlphriday\",\"triggers\"],\"articleSection\":[\"PostgreSQL 14\",\"PostgreSQL 15\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/\",\"name\":\"Postgres Triggers: Best Practices and Common Use Cases - PGSQL Phriday #007 - OpenSource DB\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-1024x538.png\",\"datePublished\":\"2023-04-07T01:08:03+00:00\",\"dateModified\":\"2023-04-07T01:39:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/#primaryimage\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers.png\",\"contentUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers.png\",\"width\":2400,\"height\":1260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/test.opensource-db.in\/wp1\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Postgres Triggers: Best Practices and Common Use Cases &#8211; PGSQL Phriday #007\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#website\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/\",\"name\":\"OpenSource DB\",\"description\":\"Your Trusted OpenSource Databases partner\",\"publisher\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/test.opensource-db.in\/wp1\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\",\"name\":\"OPENSOURCE DB PRIVATE LIMITED\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png\",\"contentUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png\",\"width\":368,\"height\":120,\"caption\":\"OPENSOURCE DB PRIVATE LIMITED\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/\",\"https:\/\/x.com\/opensource_db\",\"https:\/\/www.youtube.com\/channel\/UCmTI5h\",\"https:\/\/www.linkedin.com\/company\/opensource-db\",\"https:\/\/www.instagram.com\/opensource_db\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/2d16bf6a94c0502f1c5b69e4a36e9a09\",\"name\":\"Hari Kiran\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c9afef742ba871448bf401518655463f5e87b02f9fbd0096e88f857c51896822?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c9afef742ba871448bf401518655463f5e87b02f9fbd0096e88f857c51896822?s=96&d=mm&r=g\",\"caption\":\"Hari Kiran\"},\"description\":\"Hari Kiran has over 15 years of extensive experience in areas of operations and managing multiple database technologies. A proven leader with excellent skills in building relationships, positive team dynamics, and decision-making. Hari also has strong Open Source expertise in Professional Services. He has the experience to help you refine your strategy and drive execution.\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/author\/harikiranopensource-db-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Postgres Triggers: Best Practices and Common Use Cases - PGSQL Phriday #007 - OpenSource DB","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Postgres Triggers: Best Practices and Common Use Cases - PGSQL Phriday #007 - OpenSource DB","og_description":"PGSQL Phriday #007 &#8211; Be the James Bond of your Database &#8211; take risks, Create Triggers, and always remember that [&hellip;]","og_url":"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/","og_site_name":"OpenSource DB","article_publisher":"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/","article_published_time":"2023-04-07T01:08:03+00:00","article_modified_time":"2023-04-07T01:39:43+00:00","og_image":[{"url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-1024x538.png","type":"","width":"","height":""}],"author":"Hari Kiran","twitter_card":"summary_large_image","twitter_creator":"@opensource_db","twitter_site":"@opensource_db","twitter_misc":{"Written by":"Hari Kiran","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/#article","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/"},"author":{"name":"Hari Kiran","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/2d16bf6a94c0502f1c5b69e4a36e9a09"},"headline":"Postgres Triggers: Best Practices and Common Use Cases &#8211; PGSQL Phriday #007","datePublished":"2023-04-07T01:08:03+00:00","dateModified":"2023-04-07T01:39:43+00:00","mainEntityOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/"},"wordCount":765,"commentCount":0,"publisher":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#organization"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-1024x538.png","keywords":["pgphriday","pgsql","pgsqlphriday","triggers"],"articleSection":["PostgreSQL 14","PostgreSQL 15"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/","url":"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/","name":"Postgres Triggers: Best Practices and Common Use Cases - PGSQL Phriday #007 - OpenSource DB","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#website"},"primaryImageOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/#primaryimage"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers-1024x538.png","datePublished":"2023-04-07T01:08:03+00:00","dateModified":"2023-04-07T01:39:43+00:00","breadcrumb":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/#primaryimage","url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers.png","contentUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2023\/04\/blog-triggers.png","width":2400,"height":1260},{"@type":"BreadcrumbList","@id":"https:\/\/test.opensource-db.in\/wp1\/postgres-triggers-best-practices-pgsql-phriday-007\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/test.opensource-db.in\/wp1\/"},{"@type":"ListItem","position":2,"name":"Postgres Triggers: Best Practices and Common Use Cases &#8211; PGSQL Phriday #007"}]},{"@type":"WebSite","@id":"https:\/\/test.opensource-db.in\/wp1\/#website","url":"https:\/\/test.opensource-db.in\/wp1\/","name":"OpenSource DB","description":"Your Trusted OpenSource Databases partner","publisher":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/test.opensource-db.in\/wp1\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/test.opensource-db.in\/wp1\/#organization","name":"OPENSOURCE DB PRIVATE LIMITED","url":"https:\/\/test.opensource-db.in\/wp1\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/","url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png","contentUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png","width":368,"height":120,"caption":"OPENSOURCE DB PRIVATE LIMITED"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/","https:\/\/x.com\/opensource_db","https:\/\/www.youtube.com\/channel\/UCmTI5h","https:\/\/www.linkedin.com\/company\/opensource-db","https:\/\/www.instagram.com\/opensource_db\/"]},{"@type":"Person","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/2d16bf6a94c0502f1c5b69e4a36e9a09","name":"Hari Kiran","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c9afef742ba871448bf401518655463f5e87b02f9fbd0096e88f857c51896822?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c9afef742ba871448bf401518655463f5e87b02f9fbd0096e88f857c51896822?s=96&d=mm&r=g","caption":"Hari Kiran"},"description":"Hari Kiran has over 15 years of extensive experience in areas of operations and managing multiple database technologies. A proven leader with excellent skills in building relationships, positive team dynamics, and decision-making. Hari also has strong Open Source expertise in Professional Services. He has the experience to help you refine your strategy and drive execution.","url":"https:\/\/test.opensource-db.in\/wp1\/author\/harikiranopensource-db-com\/"}]}},"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"Hari Kiran","author_link":"https:\/\/test.opensource-db.in\/wp1\/author\/harikiranopensource-db-com\/"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-14\/\" rel=\"category tag\">PostgreSQL 14<\/a> <a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-15\/\" rel=\"category tag\">PostgreSQL 15<\/a>","rttpg_excerpt":"PGSQL Phriday #007 &#8211; Be the James Bond of your Database &#8211; take risks, Create Triggers, and always remember that [&hellip;]","_links":{"self":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/3887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/comments?post=3887"}],"version-history":[{"count":6,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/3887\/revisions"}],"predecessor-version":[{"id":3897,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/3887\/revisions\/3897"}],"wp:attachment":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/media?parent=3887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/categories?post=3887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/tags?post=3887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}