# implementing

Published articles for implementing.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Implementing LFU Cache in O(1) Time: A Hands-on Breakdown

DevFeed: [Implementing LFU Cache in O(1) Time: A Hands-on Breakdown](<https://devfeed.tech/articles/implementing-lfu-cache-in-o-1-time-a-hands-on-breakdown-39586.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/34-lfu-cache-o1-implementation/>)

Author: hello@ankit-rana.com

Published: 2026-08-02T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [Cache](<https://devfeed.tech/topics/cache.md>), [Caching](<https://devfeed.tech/topics/caching.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>), [implementation](<https://devfeed.tech/topics/implementation.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [cache](<https://devfeed.tech/tags/cache.md>), [caching](<https://devfeed.tech/tags/caching.md>), [implementing](<https://devfeed.tech/tags/implementing.md>), [java](<https://devfeed.tech/tags/java.md>), [lfu](<https://devfeed.tech/tags/lfu.md>), [memory](<https://devfeed.tech/tags/memory.md>), [order](<https://devfeed.tech/tags/order.md>), [performance](<https://devfeed.tech/tags/performance.md>), [pointers](<https://devfeed.tech/tags/pointers.md>), [system-design](<https://devfeed.tech/tags/system-design.md>)

### AI overview

This tutorial explains why LRU can evict a frequently requested product during a long-tail burst, then presents an O(1) LFU cache design. It contrasts a naive O(n) eviction scan with an implementation using key-to-node and frequency-to-bucket maps, doubly linked lists, and a minFreq pointer.

### Source excerpt

LFU evicts the least frequently used key rather than the least recently used, which protects a hot key during a long-tail burst that would make LRU drop a bestseller. The naive implementation scans every key to find the minimum frequency, which is O(n) per eviction. The O(1) version inverts the index: a key-to-node map, a frequency-to-bucket map of doubly linked lists, and a minFreq pointer.

## \[GSoC 2026\] Modernizing Haiku's Bluetooth stack: Implementing support for HFP profile - Mid-Term Progress Report

DevFeed: [\[GSoC 2026\] Modernizing Haiku's Bluetooth stack: Implementing support for HFP profile - Mid-Term Progress Report](<https://devfeed.tech/articles/gsoc-2026-modernizing-haiku-s-bluetooth-stack-implementing-support-for-hfp-profile-mid-term-progress-report-34782.md>)

Original publisher: [Read original article](<https://www.haiku-os.org/blog/vighnesh-sawant/2026-07-15_gsoc_2026_mid_term_progress_report/>)

Author: vighnesh-sawant

Published: 2026-07-15T14:32:12Z

Content type: article

Language: en

Sources: [Haiku Project](<https://devfeed.tech/sources/haiku-project.md>)

Topics: [Bluetooth](<https://devfeed.tech/topics/bluetooth.md>), [Protocol (disambiguation)](<https://devfeed.tech/topics/protocol.md>), [systems](<https://devfeed.tech/topics/systems.md>), [real-time](<https://devfeed.tech/topics/real-time.md>), [Streaming](<https://devfeed.tech/topics/streaming.md>), [USB](<https://devfeed.tech/topics/usb.md>), [Kernel](<https://devfeed.tech/topics/kernel.md>), [interface](<https://devfeed.tech/topics/interface.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [bluetooth](<https://devfeed.tech/tags/bluetooth.md>), [driver](<https://devfeed.tech/tags/driver.md>), [gsoc](<https://devfeed.tech/tags/gsoc.md>), [haiku](<https://devfeed.tech/tags/haiku.md>), [implementing](<https://devfeed.tech/tags/implementing.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [modernizing](<https://devfeed.tech/tags/modernizing.md>), [progress-report](<https://devfeed.tech/tags/progress-report.md>), [protocol](<https://devfeed.tech/tags/protocol.md>), [real-time](<https://devfeed.tech/tags/real-time.md>), [report](<https://devfeed.tech/tags/report.md>), [software](<https://devfeed.tech/tags/software.md>), [streaming](<https://devfeed.tech/tags/streaming.md>), [usb](<https://devfeed.tech/tags/usb.md>)

### AI overview

A GSoC 2026 progress report on modernizing Haiku's Bluetooth stack by adding groundwork for the Hands-Free Profile. Completed work includes isochronous USB endpoint support, SCO handling, kernel hooks, and SCO and RFCOMM protocol implementations. Planned work covers SPP, SDP, and the remaining HFP functionality.

### Source excerpt

Introduction Hello again! It has been a fun journey since the beginning of GSoC. My project focuses on modernizing Haiku's Bluetooth stack, specifically adding support for the Hands-Free Profile (HFP). HFP is a profile that allows operating systems to interact with Bluetooth audio devices, such as headsets, for two-way voice calls and audio streaming. Today, I'll be sharing a progress report on the work I have completed till now, and will outline my plans for the remainder of the project. Progress So Far A significant portion of my work has been dedicated to laying the groundwork for the HFP profile. Because Haiku's Bluetooth stack previously lacked the necessary transport layers for real-time audio, I had to implement several underlying protocols. Here is a breakdown of the changes I've made: USB and Driver Support (Isochronous Endpoints): I started off by adding support for isochronous USB endpoints to the h2generic Bluetooth driver. Isochronous transfers are critical because they guarantee bandwidth and timely delivery of data, which is a requirement for streaming real-time audio. Following this, I implemented SCO (Synchronous Connection-Oriented) handling within h2transactions, along with the proper scheduling mechanism.. Kernel Hooks: I added the necessary hooks for SCO and HCI (Host Controller Interface) commands. Protocol Implementations (SCO and RFCOMM): I successfully added the core implementations for both the SCO and RFCOMM protocols. RFCOMM provides an emulated serial interface over L2CAP. It serves as the control channel for many higher-level profiles, including HFP. SCO handles the actual low-latency audio transmission needed for voice calls. What's Next? Short-term Goals: Serial Port Profile (SPP) The Serial Port Profile sits on top of RFCOMM and provides a standard way to send and receive data. Implement SPP API: I will be implementing the JSR82 API methods for SPP in the Bluetooth kit. Implementing the Hands-Free Profile (HFP) The remaining time wil

## Reasoning about asyncio.Semaphore

DevFeed: [Reasoning about asyncio.Semaphore](<https://devfeed.tech/articles/reasoning-about-asyncio-semaphore-38903.md>)

Original publisher: [Read original article](<http://neopythonic.blogspot.com/2022/10/reasoning-about-asynciosemaphore.html>)

Author: Guido van Rossum (noreply@blogger.com)

Published: 2022-10-05T06:39:00Z

Content type: article

Language: en

Sources: [Guido van Rossum](<https://devfeed.tech/sources/guido-van-rossum.md>)

Topics: [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [await](<https://devfeed.tech/topics/await.md>)

Tags: [await](<https://devfeed.tech/tags/await.md>), [fairness](<https://devfeed.tech/tags/fairness.md>), [implementing](<https://devfeed.tech/tags/implementing.md>), [performance](<https://devfeed.tech/tags/performance.md>), [reasoning](<https://devfeed.tech/tags/reasoning.md>), [semantics](<https://devfeed.tech/tags/semantics.md>), [synchronization](<https://devfeed.tech/tags/synchronization.md>)

### AI overview

The article explains asyncio synchronization primitives through a restaurant queuing analogy. It maps exclusive access and cancellation to a Lock, then explains why multiple concurrently seated guests require a Semaphore. It also discusses challenges involving fairness, correctness, semantics, and performance.

### Source excerpt

In Silicon Valley is a very exclusive fast-food restaurant, which is always open. There is one table, where one guest at a time is served an absolutely fabulous hamburger. When you arrive, you wait in line until the table is available. Then the host takes you to the table and, this being America, you are asked a seemingly endless series of questions about how you would like your hamburger to be cooked and served. But today we're not talking about culinary delights. We're talking about the queuing system used by the restaurant. If you are lucky to arrive at the restaurant when the table is available and there are no other guests waiting, you are seated right away. Otherwise, the host gives you a buzzer (from an infinite stack of buzzers!) and you are free to roam the neighborhood until your buzzer goes off. It is the host's job to ensure that guests are seated in order of arrival. When it is your turn, the host will cause your buzzer go off and you make your way back to the restaurant, where you will be seated. If you change your mind, you can return the buzzer to the host, who will take it back without lifting an eyebrow. If your buzzer has already gone off, the host will buzz the next guest, if any. Guests are always polite and don't abscond with their buzzers. The host is always fair and doesn't seat another guest ahead of you even if you take your time making it back. The above description fits that of a Lock. A guest arriving corresponds to the acquire() call; leaving is a release() call. Changing your mind is like getting cancelled while waiting in acquire(). You can change your mind before or after your buzzer goes off, i.e., you can be cancelled before or after the lock has awakened your call (but before you return from acquire()). One day the restaurant expands, hiring extra sous-chefs and opening several new tables. There is still only one host, whose job is not really changed. However, since multiple guests can be seated concurrently, a Semaphore must now

## Implementing Rich Results in a Content Management System (CMS): A Guide for Bartholomew CMS Users

DevFeed: [Implementing Rich Results in a Content Management System (CMS): A Guide for Bartholomew CMS Users](<https://devfeed.tech/articles/implementing-rich-results-in-a-content-management-system-cms-a-guide-for-bartholomew-cms-users-15192.md>)

Original publisher: [Read original article](<https://www.fermyon.com/blog/cms-rich-results>)

Author: Tim McCallum

Published: 2022-08-24T00:00:00Z

Content type: tutorial

Language: en

Sources: [Fermyon - Experience the next wave of cloud computing.](<https://devfeed.tech/sources/fermyon-experience-the-next-wave-of-cloud-computing.md>)

Topics: [Content Management System](<https://devfeed.tech/topics/cms.md>)

Tags: [cms](<https://devfeed.tech/tags/cms.md>), [content](<https://devfeed.tech/tags/content.md>), [guide](<https://devfeed.tech/tags/guide.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [implementing](<https://devfeed.tech/tags/implementing.md>)

### AI overview

A guide to implementing rich results in Fermyon's Bartholomew Content Management System, including support for videos, images, and events beyond standard blue links.

### Source excerpt

Rich results go beyond the standard blue link, helping to represent videos, images, events and more. This blog post shows how to implement rich results inside Fermyon's Content Management System (CMS) called Bartholomew.

## Implementing Stable API for Apache Airflow

DevFeed: [Implementing Stable API for Apache Airflow](<https://devfeed.tech/articles/implementing-stable-api-for-apache-airflow-32563.md>)

Original publisher: [Read original article](<https://airflow.apache.org/blog/implementing-stable-api-for-apache-airflow/>)

Author: Apache Airflow

Published: 2020-07-19T00:00:00Z

Content type: article

Language: en

Sources: [Apache Airflow Blog](<https://devfeed.tech/sources/apache-airflow-blog.md>)

Topics: [REST API](<https://devfeed.tech/topics/rest-api.md>), [OpenAPI Specification](<https://devfeed.tech/topics/openapi.md>), [API](<https://devfeed.tech/topics/api.md>), [Database](<https://devfeed.tech/topics/database.md>), [unit tests](<https://devfeed.tech/topics/unit-tests.md>), [Flask](<https://devfeed.tech/topics/flask.md>)

Tags: [apache-airflow](<https://devfeed.tech/tags/apache-airflow.md>), [api](<https://devfeed.tech/tags/api.md>), [implementing](<https://devfeed.tech/tags/implementing.md>), [openapi](<https://devfeed.tech/tags/openapi.md>), [rest-api](<https://devfeed.tech/tags/rest-api.md>), [schema](<https://devfeed.tech/tags/schema.md>), [tests](<https://devfeed.tech/tags/tests.md>)

### AI overview

An Outreachy intern describes progress on extending and improving the Apache Airflow REST API. The article covers read-only Connection and DagRun endpoints, database schema work with Marshmallow 2, unit tests, OpenAPI date-time validation, and workarounds for library licensing and parsing issues.

### Source excerpt

My Outreachy internship is coming to its ends which is also the best time to look back and reflect on the progress so far. The goal of my project is to Extend and Improve the Apache Airflow REST API. In this post, I will be sharing my progress so far. We started a bit late implementing the REST API because it took time for the OpenAPI 3.0 specification we were to use for the project to be merged. Thanks to Kamil, who paved the way for us to start implementing the REST API endpoints. Below are the endpoints I implemented and the challenges I encountered, including how I overcame them. Implementing The Read-Only Connection Endpoints The read-only connection endpoints were the first endpoint I implemented. Looking back, I can see how much I have improved. I started by implementing the database schema for the Connection table using Marshmallow 2. We had to use Marshmallow 2 because Flask-AppBuilder was still using it and Flask-AppBuilder is deeply integrated to Apache Airflow. This meant I had to unlearn Marshmallow 3 that I had been studying before this realization, but thankfully, Marshmallow 3 isn't too different, so I was able to start using Marshmallow 2 in no time. This first PR would have been more difficult than it was unless there had been any reference endpoint to look at. Kamil implemented a draft PR in which I took inspiration from. Thanks to this, It was easy for me to write the unit tests. It was also in this endpoint that I learned using parameterized in unit tests :D. Implementing The Read-Only DagRuns Endpoints This endpoint came with its many challenges, especially on filtering with datetimes. This was because the connexion library we were using to build the REST API was not validating date-time format in OpenAPI 3.0 specification, what I eventually found out, was intentional. Connexion dropped strict-rfc3339 because of the later license which is not compatible with Apache 2.0 license. I implemented a workaround on this, by defining a function called c

## Implementing mouse pointer interactions on iPad

DevFeed: [Implementing mouse pointer interactions on iPad](<https://devfeed.tech/articles/implementing-mouse-pointer-interactions-on-ipad-39514.md>)

Original publisher: [Read original article](<https://rambo.codes/posts/2020-03-19-implementing-mouse-interactions-on-ipad>)

Published: 2020-03-24T21:00:00Z

Content type: tutorial

Language: en

Sources: [Rambo Codes](<https://devfeed.tech/sources/rambo-codes.md>)

Topics: [iOS](<https://devfeed.tech/topics/ios.md>), [ui](<https://devfeed.tech/topics/ui.md>), [coding](<https://devfeed.tech/topics/coding.md>), [GUI](<https://devfeed.tech/topics/gui.md>), [Xcode](<https://devfeed.tech/topics/xcode.md>), [keyboard](<https://devfeed.tech/topics/keyboard.md>)

Tags: [animations](<https://devfeed.tech/tags/animations.md>), [apple](<https://devfeed.tech/tags/apple.md>), [coding](<https://devfeed.tech/tags/coding.md>), [gui](<https://devfeed.tech/tags/gui.md>), [implementing](<https://devfeed.tech/tags/implementing.md>), [interaction](<https://devfeed.tech/tags/interaction.md>), [ios](<https://devfeed.tech/tags/ios.md>), [ipad](<https://devfeed.tech/tags/ipad.md>), [keyboard](<https://devfeed.tech/tags/keyboard.md>), [sdk](<https://devfeed.tech/tags/sdk.md>)

### AI overview

A guide to implementing mouse and trackpad pointer interactions on iPadOS 13.4. It covers the relevant APIs, setup requirements, UIHoverGestureRecognizer, and hover animations while noting that iPad pointer behavior differs from macOS.

### Source excerpt

Gui Rambo writes about his coding and reverse engineering adventures.

## Implementing Critical CSS on your website

DevFeed: [Implementing Critical CSS on your website](<https://devfeed.tech/articles/implementing-critical-css-on-your-website-31272.md>)

Original publisher: [Read original article](<https://nystudio107.com/blog/implementing-critical-css>)

Author: andrew@nystudio107.com (Andrew Welch)

Published: 2017-02-28T21:34:00Z

Content type: tutorial

Language: en

Sources: [nystudio107 | Articles on modern web development.](<https://devfeed.tech/sources/nystudio107-articles-on-modern-web-development.md>)

Topics: [modern web development](<https://devfeed.tech/topics/modern-web-development.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [Front end](<https://devfeed.tech/topics/frontend.md>), [inlining](<https://devfeed.tech/topics/inlining.md>), [render](<https://devfeed.tech/topics/render.md>), [Website](<https://devfeed.tech/topics/website.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [browser](<https://devfeed.tech/tags/browser.md>), [critical](<https://devfeed.tech/tags/critical.md>), [development](<https://devfeed.tech/tags/development.md>), [essential](<https://devfeed.tech/tags/essential.md>), [frontend](<https://devfeed.tech/tags/frontend.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [implementing](<https://devfeed.tech/tags/implementing.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [insights](<https://devfeed.tech/tags/insights.md>), [modern](<https://devfeed.tech/tags/modern.md>), [modern-web-development](<https://devfeed.tech/tags/modern-web-development.md>), [performant](<https://devfeed.tech/tags/performant.md>), [render](<https://devfeed.tech/tags/render.md>), [shows](<https://devfeed.tech/tags/shows.md>), [website](<https://devfeed.tech/tags/website.md>)

### AI overview

This tutorial explains Critical CSS, a method for extracting the CSS needed for above-the-fold content and inlining it so the browser can render the page immediately. It presents the technique as part of building performant websites.

### Source excerpt

Implementing Critical CSS is an essential part of modern website development, this article shows you how to do it

## Implementing multimethods in Python

DevFeed: [Implementing multimethods in Python](<https://devfeed.tech/articles/implementing-multimethods-in-python-32133.md>)

Original publisher: [Read original article](<https://adambard.com/blog/implementing-multimethods-in-python/>)

Published: 2014-12-11T00:00:00Z

Content type: tutorial

Language: en

Sources: [Adam Bard](<https://devfeed.tech/sources/adam-bard.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Clojure](<https://devfeed.tech/topics/clojure.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [function](<https://devfeed.tech/topics/function.md>)

Tags: [clojure](<https://devfeed.tech/tags/clojure.md>), [code](<https://devfeed.tech/tags/code.md>), [function](<https://devfeed.tech/tags/function.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [implementing](<https://devfeed.tech/tags/implementing.md>), [library](<https://devfeed.tech/tags/library.md>), [monkey-patching](<https://devfeed.tech/tags/monkey-patching.md>), [production](<https://devfeed.tech/tags/production.md>), [python](<https://devfeed.tech/tags/python.md>), [test](<https://devfeed.tech/tags/test.md>), [use-cases](<https://devfeed.tech/tags/use-cases.md>)

### AI overview

This article explains multimethods in Python as an implementation of multiple dispatch. It contrasts user-defined dispatch on arbitrary values with conventional single dispatch based on an argument's type, and discusses use cases such as reducing nested conditionals, extending existing classes, and dispatching on dictionary keys.

### Source excerpt

In Clojure (and many other languages), a multimethod is an implementation of multiple dispatch as an alternative to single dispatch. Traditionally, if you define several methods with the same name on different classes, the type/class of the first argument (in Python, self, in many other languages implicit) is used to pick which method to call. This is called "single dispatch" because the decision of which method to call is left up to the inferred type of a single argument. Multimethods take the approach of leaving the dispatch up to the user; you can dispatch on any value at all. You just need to supply a function that returns the value on which you wish to dispatch, and a method for each possible value. For certain cases, this is a lot more flexible than single dispatch.

## ReactOS TODO update: explorer-new activation and window handling fixes

DevFeed: [ReactOS TODO update: explorer-new activation and window handling fixes](<https://devfeed.tech/articles/advancing-the-todo-list-32763.md>)

Original publisher: [Read original article](<https://reactos.org/blogs/advancing-the-todo-list/>)

Published: 2014-05-26T00:00:00Z

Content type: article

Language: en

Sources: [Front Page on ReactOS Website](<https://devfeed.tech/sources/front-page-on-reactos-website.md>)

Topics: [Shell](<https://devfeed.tech/topics/shell.md>), [Windows](<https://devfeed.tech/topics/windows.md>), [opensource](<https://devfeed.tech/topics/opensource.md>)

Tags: [existing](<https://devfeed.tech/tags/existing.md>), [free](<https://devfeed.tech/tags/free.md>), [implementing](<https://devfeed.tech/tags/implementing.md>), [issue](<https://devfeed.tech/tags/issue.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [opensource](<https://devfeed.tech/tags/opensource.md>), [os](<https://devfeed.tech/tags/os.md>), [react](<https://devfeed.tech/tags/react.md>), [reactos](<https://devfeed.tech/tags/reactos.md>), [shell](<https://devfeed.tech/tags/shell.md>), [win32](<https://devfeed.tech/tags/win32.md>), [winapi](<https://devfeed.tech/tags/winapi.md>), [windows](<https://devfeed.tech/tags/windows.md>)

### AI overview

A ReactOS development report describes a patch fixing an activation issue and explains a workaround for explorer-new launching new explorer.exe instances when opening folders. The underlying DDE handler issue remains unresolved.

### Source excerpt

If you recall from the last report, I had a few issues that I couldn't fix myself. Well, Huw (Frontier) surprised me by sending me a patch to fix the activation issue! One of the issues in explorer-new was that every time you clicked on the desktop to open a new folder, it would launch a new instance of explorer.exe and run the new window on it. While the underlying issue still remains (it requires implementing the DDE handler for explorer), by disabling the version of the desktop window from RShell and using the existing one from shell32 instead, the shell takes a shortcut and runs the window directly on its own instance.

## Introducing Elliptic Curves

DevFeed: [Introducing Elliptic Curves](<https://devfeed.tech/articles/introducing-elliptic-curves-40341.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2014/02/08/introducing-elliptic-curves/>)

Published: 2014-02-08T10:00:14Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Cryptography](<https://devfeed.tech/topics/cryptography.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>), [Encryption](<https://devfeed.tech/topics/encryption.md>)

Tags: [cryptography](<https://devfeed.tech/tags/cryptography.md>), [diffie-hellman](<https://devfeed.tech/tags/diffie-hellman.md>), [digital-signatures](<https://devfeed.tech/tags/digital-signatures.md>), [elliptic-curves](<https://devfeed.tech/tags/elliptic-curves.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [implementing](<https://devfeed.tech/tags/implementing.md>), [nsa](<https://devfeed.tech/tags/nsa.md>), [python](<https://devfeed.tech/tags/python.md>), [rsa](<https://devfeed.tech/tags/rsa.md>)

### AI overview

An introductory tutorial series on elliptic curves and elliptic curve cryptography. It explains the motivation for ECC, its relationship to RSA and cryptographic security, and plans implementations covering finite fields, key exchange, encryption, and digital signatures.

### Source excerpt

With all the recent revelations of government spying and backdoors into cryptographic standards, I am starting to disagree with the argument that you should never roll your own cryptography. Of course there are massive pitfalls and very few people actually need home-brewed cryptography, but history has made it clear that blindly accepting the word of the experts is not an acceptable course of action. What we really need is more understanding of cryptography, and implementing the algorithms yourself is the best way to do that.

## Dynamic Triggers in PLpgSQL

DevFeed: [Dynamic Triggers in PLpgSQL](<https://devfeed.tech/articles/dynamic-triggers-in-plpgsql-34400.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2010/11/dynamic-triggers-in-plpgsql/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2010-11-24T15:45:00Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [function](<https://devfeed.tech/topics/function.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [developer](<https://devfeed.tech/tags/developer.md>), [function](<https://devfeed.tech/tags/function.md>), [implementing](<https://devfeed.tech/tags/implementing.md>), [triggers](<https://devfeed.tech/tags/triggers.md>)

### AI overview

This article explores implementing dynamic triggers in PL/pgSQL, including reusing the same trigger function across multiple tables and handling a dynamic column name. The author describes the approach as difficult, unconventional, and preliminary, with slow performance in initial tests.

### Source excerpt

You certainly know that implementing dynamic triggers in PLpgSQL is impossible. But I had a very bad night, being up from as soon as 3:30 am today, so that when a developer asked me about reusing the same trigger function code from more than one table and for a dynamic column name, I didn't remember about it being impossible. Here's what happens in such cases, after a long time on the problem (yes, overall, that's a slow day). Note that I'm abusing the (record_literal).* notation a lot in there, and even the (record_literal).column_name too.