Press "Enter" to skip to content

Day: September 25, 2025

RETURNING Clause in PostgreSQL Update Operations

Hans-Jürgen Schönig wants the output:

PostgreSQL 18 offers a couple of new features such as asynchronous I/O (aio), improvements around indexing, and a lot more. However, there is one feature that has really caught my attention. While it might go unnoticed by many users, it is really powerful and, to me, somehow represents everything I like about PostgreSQL.

The improvement I want to focus on today is related to the way the “RETURNING-clause” works in PostgreSQL 18.

This behavior is very much like the OUTPUT clause in T-SQL. Though it appears that OLD and NEW are not themselves pseudotables like SQL Server’s INSERTED and DELETED, as there is an example that includes old and new columns together in the same row.

Leave a Comment

A Primer on GitHub Actions

Temidayo Omoniyi provides an introduction to GitHub Actions workflows:

In today’s fast-paced development cycles, the demand to ship high-quality code quickly is more important than ever before. However, several tedious, labor-intensive, and prone to mistakes procedures that stand between producing code and releasing it to consumers frequently slow down teams.

Every Developer faces these common issues:

  • Repetitive Checks: Before each push, unit tests, linters, and build scripts are manually executed.
  • Inconsistent Environments: Code that passes locally in one environment but fails in another is known as the “it works on my machine” dilemma.
  • High-Stakes Deployments: Deploying code by following a meticulous, manual checklist in which even one mistake could result in downtime.
  • Slow Comments Loops: The review process is prolonged when you wait for a coworker to pull your branch, run tests, and provide comments on a pull request.

I like GitHub Actions workflows a lot. Once you’ve put together a workflow or two, it’s pretty easy to see what’s going on. On top of that, there is a huge amount of functionality and an enormous number of third-party templates to extend it even further.

Leave a Comment

An Outside-In Triage for SQL Server Performance

Kevin Hill triages an issue:

It’s 9:05 AM and your helpdesk lights up: “The SQL Server is down. Nothing works.”

By 9:07, everyone is staring at you.

The trap: you open SSMS and start digging for blocking queries. But what if the database isn’t the problem at all?

I think my biggest gripe about the list is the challenge of being allowed to get several of these metrics. But it is good, in the face of a “Everything is slow fix it now!” style of request, to look at extrinsic factors before digging into SQL Server, as that’s just following the old joke about the drunken man searching for his keys under the streetlamp, despite not having lost them there, because it’s easier to see that area.

Leave a Comment

Announcements from FabCon Vienna

James Serra has a round-up:

A bunch of new features for Microsoft Fabric were announced at the Microsoft Fabric Community Conference (FabCon Vienna) recently. Here are all the new features that I found most interesting, with some released now and others coming soon:

Click through for approximately two dozen more announcements.

Leave a Comment

Time Zone Conversions in SQL Server

Louis Davidson knows what time it is:

Recently a topic came up at work, and I remember seeing it on Reddit, so you know, that definitely is a sign that I had to write a blog on it.

For a lot of people, we typically standardize on a single time zone for our life, and in turn our data. Maybe it is the time zone of our headquarters, our house, and sometimes it is the standard time zone UTC. It is often suggested that every organization should use UTC, and that is a great suggestion for many things.

However…if you store all your times as UTC, this becomes a nightmare for some kinds of reporting.

Click through for a primer on the capabilities of the DATETIMEOFFSET data type and some of the functionality you can use with it. And Louis hits on one important note around daylight savings time changes: the date changes over the years. Another is that what’s in the Windows or Linux time zone database isn’t always historically accurate. For example, in 1974 and 1975, the US extended DST and began it in January and Feburary, respectively. But if you use Louis’s query, it claims DST started in April, which would have followed the 1966-1973 and 1976-2006 patterns but is historically inaccurate. You’ll find these sorts of things for a variety of countries because Daylight Savings Time adherence is kind of wild.

Leave a Comment