A better way to authenticate users via a SQL database.

For years I’ve been using this simple design pattern when building a new user authentication backend for a project. Rather than just querying whether a username and password is valid, …

Development PostgreSQL

Rounding datetimes and timestamps in PostgreSQL

A simple PL/pgSQL function to round either a datetime or timestamp value to the nearest N seconds.


Base36 Conversion in PostgreSQL

Using PostgreSQL to base36 encode (and decode) large integers for better human readability. Base36 encoding intermixes letters and digits and is most frequently encountered with URL shortening services and on Dell service tags.