---
title: "Postgres"
description: "308 posts about Postgres, summarised, each linking to the original."
---

# Postgres
> 308 posts about Postgres, summarised, each linking to the original.

## Articles

### [Choosing a Postgres Primary Key](https://yomu.fyi/post/choosing-a-postgres-primary-key.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Author: victor
- Published: Sep 8, 2022
- Type: Explainer

Choosing a Postgres primary key involves balancing simplicity, storage, sortability, standards compliance, information leakage, and collision avoidance. The discussion starts with natural and surrogate keys, then compares integer and biginteger identity columns with serial sequences, noting that sequences can have gaps and exposed numeric IDs may reveal information. It then examines pseudorandom and secure random numeric IDs before turning to UUIDs, including UUIDv4 and time-based alternatives, whose generation methods and index behavior differ. Postgres integration, size queries, and the pg\_idkit library provide practical ways to generate and evaluate identifiers; the suggested rules of thumb favor integers for simplicity, UUIDv4 for collision avoidance, xid for time-based sort friendliness, and UUIDv6 or UUIDv7 for a more standards-oriented choice.


### [Building a Realtime Trello Board with Supabase and Angular](https://yomu.fyi/post/building-a-realtime-trello-board-with-supabase-and-angular.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Author: simon\_grimm
- Published: Aug 24, 2022
- Type: Tutorial

The tutorial builds a Trello-style project-management board with Supabase, Angular, and Tailwind rather than stopping at a small “hello world” example. It defines boards, lists, cards, users, and user\_boards in Postgres SQL, adds magic-link authentication, and uses Row Level Security policies plus helper functions and triggers to control access and maintain relationships. Angular components and services use the Supabase JavaScript client, while realtime is enabled for cards and lists and exposed through an Observable that applies INSERT, UPDATE, and DELETE events to local board state. The resulting clone supports shared boards for invited, already registered users, and the article provides SQL and source code for running the project with a Supabase instance.


### [One more thing](https://yomu.fyi/post/one-more-thing.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Author: paul\_copplestone
- Published: Aug 19, 2022
- Type: Announcement

During Launch Week, Supabase announces six product updates spanning database security, authentication, dashboard administration, and developer tooling. Supabase Vault is a Postgres extension for managing secrets and encryption inside the database, built as a thin usability layer over pgsodium and released to gather user feedback rather than for immediate Supabase Platform availability. Auth UI moves from the @supabase/ui library into @supabase/auth-ui-react, with customizable themes, CSS and inline styles, and overridable labels for multilingual support; the initial release supports React. The update also adds granular Dashboard roles, pg\_jsonschema for JSON Schema validation on json and jsonb, pg\_graphql v0.4.0 with json/jsonb, the in filter, and larger-schema introspection, plus early-access signups for Supabase Auth MFA.


### [pg\_jsonschema: JSON Schema support for Postgres](https://yomu.fyi/post/pg-jsonschema-json-schema-support-for-postgres.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Author: oli\_rice
- Published: Aug 19, 2022
- Type: Problem & solution

pg\_jsonschema is a Postgres extension released on the Supabase platform that adds JSON Schema validation for json and jsonb data types. The post addresses a trade-off in storing complex webhook payloads as documents: JSON simplifies the model and accommodates changing payloads, but an unconstrained column cannot enforce required structure or types. It introduces JSON Schema as a formal, human-readable way to describe those constraints, including an object with a required string foo attribute and no additional properties. The extension provides json\_matches\_schema and jsonb\_matches\_schema, which can be used in a Postgres CHECK constraint to validate inserted documents. In the example, the constraint handled all eight test cases correctly, and invalid rows produced a constraint-violation error.


### [PostgREST v10: EXPLAIN and Improved Relationship Detection](https://yomu.fyi/post/postgrest-v10-explain-and-improved-relationship-detection.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Author: steve\_chavez
- Published: Aug 19, 2022
- Type: Announcement

PostgREST v10 adds HTTP and supabase-js access to PostgreSQL execution plans for reads, writes, and RPC requests, with the feature restricted to development-oriented use through db-plan-enabled. Plans can be returned as text or JSON, analyzed to show execution time and RLS filtering, and queried in verbose form for the pg\_stat\_statements query identifier and related settings. The release also improves relationship detection: unique or foreign-key primary keys produce one-to-one JSON objects, while computed relationships let SQL functions define efficient links for views and materialized views. Many-to-many detection now requires a join table’s primary key to include both foreign-key columns, a breaking change; the post says PostgREST 10 was not yet on the Supabase Platform and was planned for release there over the following month.


### [Supabase Vault](https://yomu.fyi/post/supabase-vault.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Author: michel
- Published: Aug 19, 2022
- Type: Announcement

Supabase Vault is a Postgres extension for managing secrets and encryption inside the database, presented as a thin usability layer over pgsodium. The announcement contrasts it with pgcrypto, which accepts raw encryption keys directly and lacks public key signing, key derivation APIs, and streaming encryption. Vault stores secrets in an encrypted text column, while a unique per-database root key is managed outside SQL by pgsodium and libsodium; rows expose an internally derived key ID rather than the raw key. The vault.decrypted\_secrets view decrypts values on demand, leaving stored data encrypted on disk and in backups, and users can create additional keys with pgsodium.create\_key(). Vault uses Authenticated Encryption with Associated Data, binding the associated column to the authentication signature, and is positioned for API keys, access tokens, and environment variables rather than larger PII datasets.


### [Supabase Series B](https://yomu.fyi/post/supabase-series-b.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Author: Paul Copplestone
- Published: Aug 12, 2022
- Type: Announcement

Supabase announced an $80 million Series B in May, bringing total funding to $116 million, and reported growth to more than 150,000 hosted PostgreSQL databases and 110,000 developers. Community metrics also increased, with Discord membership rising from 4,000 to 8,000, Twitter followers from 18,000 to 37,000, and GitHub stars from 19,000 to 36,000. The round is led by Felicis, with Coatue, Lightspeed, and Square Peg Capital joining, while Supabase describes its open-source support through contributor payments, maintainer hiring, sponsorship, and community collaboration. The company is moving into its third phase, focused on cloud-native PostgreSQL capabilities including branching, scalable storage, distribution, ephemeral compute, snapshots, and time travel. It invested $500,000 in OrioleDB and hired a developer to work on it, while stating that OrioleDB is not currently used on the Supabase platform and that the company will not run a PostgreSQL fork.


### [Slack Consolidate: a slackbot built with Python and Supabase](https://yomu.fyi/post/slack-consolidate-a-slackbot-built-with-python-and-supabase.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Author: Rodrigo Mansueli
- Published: Aug 9, 2022
- Type: Tutorial

Slack Consolidate is a Python Slackbot that watches configured Slack channels and reposts messages to destination channels according to routing rules stored in Supabase. The tutorial sets up Slack app permissions from a manifest, installs the Python SDKs, configures environment variables for Supabase and Slack tokens, and creates slack\_channels and slack\_watcher PostgreSQL tables. Its polling loop loads channel mappings, fetches up to 20 recent messages, converts Slack timestamps to ISO-compatible values, inserts messages into the watcher table, builds message links, and posts through a bot client; it waits 1.4 seconds between channel processing and rescans channel configuration hourly. Public-channel posts contain a link, while private-channel posts include the message text as well. The project also provides a Google Colab notebook for trying the example.


### [Supabase Beta July 2022](https://yomu.fyi/post/supabase-beta-july-2022.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Author: Ant Wilson
- Published: Aug 3, 2022
- Type: Announcement

Supabase published its July 2022 beta update alongside the announcement of Launch Week 5 scheduled for August 15-19. Key feature releases include a developer preview of Flutter SDK 1.0 with an emphasis on developer experience and Auth Helpers supporting server-side rendering environments like SvelteKit. The team introduced pg\_jsonschema, an experimental 10-line Postgres extension created with pgx to enforce structure on json and jsonb columns. Security and identity features were expanded with an hCaptcha integration in authentication settings to block bot attacks. Additionally, email one-time passwords now accommodate lengths between 6 and 10 digits, while the GenerateLink method returns explicit verification metadata.


### [Implementing "seen by" functionality with Postgres](https://yomu.fyi/post/implementing-seen-by-functionality-with-postgres.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Author: Victor
- Published: Jul 18, 2022
- Type: Benchmark

Tracking unique post views within Postgres presents trade-offs between counter accuracy, row bloat, and concurrent write performance. To evaluate options under an architecture constraint preventing external dependencies, a benchmark suite generated synthetic users, skewed post distributions, and replayed view actions. The benchmark tested four implementations: a naive counter column, an hstore key-value approach, an association table, and HyperLogLog (HLL). Benchmark results demonstrated that simple-hstore achieved the lowest average latency among deduplicating approaches at 2.15 milliseconds, closely followed by HLL at 2.16 milliseconds. Despite hstore's raw performance in prototypes, HLL is recommended for production because it circumvents row bloat as view counts grow while avoiding expensive row counts.


### [Supabase Beta June 2022](https://yomu.fyi/post/supabase-beta-june-2022.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Author: Ant Wilson
- Published: Jul 6, 2022
- Type: Announcement

Supabase released its Beta June 2022 updates covering developer tooling, authentication, and infrastructure changes. The team decoupled Supabase Auth Helpers into dedicated packages for Next.js and React, while introducing project pause and restore features to enable unlimited free projects. Developers can now initiate project creation directly through the Supabase CLI and toggle realtime updates from the table editor side panel. Authentication updates include exposing client IP addresses in audit logs, introducing an auth.jwt function, bubbling PostgreSQL errors from GoTrue, and deprecating older authentication functions. Additionally, infrastructure migrations are underway to support multiplayer features, accompanied by community-led tutorials, sponsorships, and platform growth reaching fifty thousand GitHub stars.


### [Flutter Tutorial: building a Flutter chat app](https://yomu.fyi/post/flutter-tutorial-building-a-flutter-chat-app.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Author: Tyler Shukert
- Published: Jun 30, 2022
- Type: Tutorial

Developers can construct cross-platform real-time chat applications for iOS, Android, and web by pairing Flutter with Supabase. The architecture relies on Supabase to manage authentication and provide direct SDK access to a Postgres database without requiring custom backend server code. The database schema defines profiles with regex validation constraints and a messages table configured for live subscriptions through Postgres publication settings. Flutter clients capture user input, insert new records into the messages table, handle database exceptions, and format chat bubbles with dynamic timestamps. While this initial setup implements user registration and message broadcasting in a shared room, securing chat rooms requires subsequent row-level security configuration.


### [Visualizing Supabase Data using Metabase](https://yomu.fyi/post/visualizing-supabase-data-using-metabase.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Author: Ant Wilson
- Published: Jun 29, 2022
- Type: Tutorial

Organizations seeking to analyze database records can bypass code-heavy Python visualization libraries by connecting a Supabase backend directly to Metabase. Deploying the open-source Metabase Docker container exposes an initial setup interface on default port 3000, allowing administrators to input PostgreSQL connection credentials retrieved from Supabase database settings. Once connected, Metabase automatically surfaces table insights and automated x-rays across the public schema, exposing metrics such as inventory count ranges, price distributions, and column-specific statistics without requiring manual queries. For specialized analytics, users can execute custom SQL joins across relational tables like Product and Vendor to render tailored visual dashboard formats, including configurable bar charts mapped to designated axis fields.


### [Partial data dumps using Postgres Row Level Security](https://yomu.fyi/post/partial-data-dumps-using-postgres-row-level-security.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Author: Paul Copplestone
- Published: Jun 28, 2022
- Type: Tutorial

Dumping full production databases onto local development machines creates severe security issues once applications hold real user data. To safely generate local seed data, developers can leverage PostgreSQL Row Level Security to restrict data access. The process involves provisioning a dedicated database user with select privileges on the target schema and tables. Next, administrators enable row-level security policies on those tables to filter records using criteria such as specific primary keys, email domain patterns, date intervals, or boolean flags. Finally, running pg\_dump with the restricted user credentials and the --enable-row-security flag produces a sanitized seed.sql file containing only approved records.


### [Python data loading with Supabase](https://yomu.fyi/post/python-data-loading-with-supabase.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Author: Ant Wilson
- Published: Jun 17, 2022
- Type: Tutorial

Supabase offers a PostgreSQL-based backend-as-a-service platform alongside an open-source Python SDK for automating CRUD operations and data-intensive tasks. After spinning up a new project in the Supabase dashboard, developers can configure relational schemas in the Table Editor by establishing foreign key constraints between tables like Vendor and Product. Authentication for the SDK relies on passing project URL parameters and API keys, which can be securely stored and loaded through environment variables. Programmatic data population utilizes the supabase client library combined with the Faker package to generate realistic synthetic entries and push them directly to database tables using insert and execute calls. Populated records can subsequently be examined in real time through the dashboard Table Editor interface to verify schema integrity and data persistence.


### [Supabase Beta May 2022](https://yomu.fyi/post/supabase-beta-may-2022.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Author: Ant Wilson
- Published: Jun 1, 2022
- Type: Announcement

Supabase announced several platform updates and performance improvements across its database, hosting, and developer tooling ecosystem for May 2022. Developers managing preview deployments on Jamstack platforms like Vercel and Netlify can now configure wildcard redirect domains such as \*.mydomain.com/welcome. For serverless workflows, Edge Functions support a -no-verify-jwt CLI deployment flag to facilitate direct invocation via external webhooks without mandatory token validation. In addition, Supabase exposed a Prometheus-compatible metrics endpoint to all users for real-time project monitoring and alerting. Database security policies also gained a dedicated Target roles configuration, replacing older role check expressions and cutting query execution time from 46 seconds to 7 milliseconds in one customer deployment.


### [How Mike Lyndon is using Supabase to accelerate development of AllPullTogether](https://yomu.fyi/post/how-mike-lyndon-is-using-supabase-to-accelerate-development-of-allpull.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Published: May 26, 2022
- Type: Explainer

A collection of case studies outlines how diverse engineering teams adopt Supabase across various infrastructure, authentication, and database workloads. Companies like Good Tape and Shotgun achieved substantial cost reductions between 60% and 83% by migrating to Supabase managed Postgres and authentication services. For security and data access control, Quilia reduced development time by 75% leveraging Supabase Data API alongside Row Level Security features. In machine learning applications, organizations such as Firecrawl, Berri AI, and Quivr utilize Supabase Vector for PostgreSQL vector embeddings rather than standalone vector databases. Additional migrations include Mobbin transferring 200,000 users from Firebase for authentication, while teams like Replenysh implemented one-time password workflows in under 24 hours.


### [Logbook - 2022-05-26](https://yomu.fyi/post/logbook-2022-05-26.md)
- Company: [Fly.io](https://yomu.fyi/company/fly-io.md)
- Published: May 26, 2022
- Type: Announcement

The May 26, 2022 changelog records product, reliability, documentation, and web UI changes made while work continued toward the Fly Machines launch. Users can configure proxy protocol v2 headers, while Fly HA Postgres instances become read-only and fail health checks at 90% volume usage, creating time to respond before full disks cause crashes. The GraphQL API now names missing apps directly, API telemetry is more selective, and fixes address certificate and volume deletion errors, region-code mutation, DNS validation context, and delayed organization invitations. Documentation covers the Machines API, its reference and FaaS usage, fly.toml updates, and PlanetScale Portals, while redesigned dashboards, app and organization pages, paid plans, documents, and app-level views update the web interface.


### [Works With Supabase - announcing our Partner Gallery](https://yomu.fyi/post/works-with-supabase-announcing-our-partner-gallery.md)
- Company: [Supabase](https://yomu.fyi/company/supabase.md)
- Author: Alaister Young, Shane Rice, Thor Schaeff
- Published: Apr 20, 2022
- Type: Announcement

Supabase launched its Partner Gallery to showcase integration partners and certified expert agencies assisting developers on the platform. The open-source gallery is built using the Supabase stack, featuring Postgres Full Text Search, next-image with Supabase Storage, and email triggers via Supabase Edge Functions. Initial agency partners include Morrow, a UK app development agency specializing in React Native and Supabase, alongside Quinence, a Singapore-based product development studio. Integrated tooling covers authentication systems like Clerk and Stytch, database and developer utilities like Prisma, Snaplet, Vercel, and pgMustard, and low-code builders including Appsmith, Draftbit, Plasmic, and Teta. These ecosystem integrations allow developers to manage Postgres workflows, secure user authorization, and build applications across web and mobile platforms.


### [Logbook - 2022-04-20](https://yomu.fyi/post/logbook-2022-04-20.md)
- Company: [Fly.io](https://yomu.fyi/company/fly-io.md)
- Published: Apr 20, 2022
- Type: Announcement

Fly.io’s April 20, 2022 logbook combines a recent changelog with an account of how the company produces updates for a distributed platform running apps in VMs on hardware around the world. It records added IAD capacity, backup regions disabled by default, flyctl releases with NuxtJS and RedwoodJS deployment support, and reliability improvements to postgres operations, failover handling, error reporting, builders, logs, and releases. The post says commits and status updates often fail to capture completed user-relevant work or its impact. It therefore asks engineers to write updates that explain both what changed and why it matters. Collection is automated through a Slack bot and an app that collates entries into feeds, while the team plans to cultivate stronger changelog habits.


[Newer posts](https://yomu.fyi/topic/postgres/page/10.md) · [Older posts](https://yomu.fyi/topic/postgres/page/12.md)
