惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
博客园 - 三生石上(FineUI控件)
S
Securelist
U
Unit 42
The Cloudflare Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Simon Willison's Weblog
Simon Willison's Weblog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
B
Blog
T
Tenable Blog
The Hacker News
The Hacker News
The Register - Security
The Register - Security
IT之家
IT之家
博客园 - 【当耐特】
Spread Privacy
Spread Privacy
P
Privacy & Cybersecurity Law Blog
博客园_首页
T
Tailwind CSS Blog
人人都是产品经理
人人都是产品经理
C
Cybersecurity and Infrastructure Security Agency CISA
Know Your Adversary
Know Your Adversary
NISL@THU
NISL@THU
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
T
Tor Project blog
C
CERT Recently Published Vulnerability Notes
Apple Machine Learning Research
Apple Machine Learning Research
Stack Overflow Blog
Stack Overflow Blog
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
V
Vulnerabilities – Threatpost
A
Arctic Wolf
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
V
V2EX
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
Cyberwarzone
Cyberwarzone
V
Visual Studio Blog
月光博客
月光博客
爱范儿
爱范儿
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
美团技术团队
G
GRAHAM CLULEY
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Heimdal Security Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

Supabase Blog

AI Agents Know About Supabase. They Don't Always Use It Right. Custom OIDC Providers for Supabase Auth 100,000 GitHub stars Supabase docs over SSH Navigating Regional Network Blocks Supabase Joins the Stripe Projects Developer Preview Log Drains: Now available on Pro Supabase Storage: major performance, security, and reliability updates Supabase incident on February 12, 2026 Hydra joins Supabase X / Twitter OAuth 2.0 is now available for Supabase Auth BKND joins Supabase Supabase is now an official Claude connector Supabase PrivateLink is now available Introducing: Postgres Best Practices When to use Read Replicas vs. bigger compute Introducing TRAE SOLO integration with Supabase Supabase Security Retro: 2025 Sync Stripe Data to Your Supabase Database in One Click Building ChatGPT Apps with Supabase Edge Functions and mcp-use Own Your Observability: Supabase Metrics API Introducing iceberg-js: A JavaScript Client for Apache Iceberg Introducing Supabase for Platforms Adding Async Streaming to Postgres Foreign Data Wrappers Build "Sign in with Your App" using Supabase Auth Introducing Seven New Email Templates for Supabase Auth The new Supabase power for Kiro Introducing Supabase ETL Introducing Analytics Buckets Introducing Vector Buckets Snap, Inc. Launches Snap Cloud, Powered by Supabase Triplit joins Supabase Supabase Series E 1000 Y Combinator Founders Choose Supabase gm 👋 web3, welcome aboard to Sign in with Web3 (Solana, Ethereum) Announcing the Supabase Remote MCP Server Enterprise speed, enterprise standards with Bolt Cloud + Supabase PostgREST 13 Lovable Cloud + Supabase: The Default Platform for AI Builders Processing large jobs with Edge Functions, Cron, and Queues Defense in Depth for MCP Servers OrioleDB Patent: now freely available to the Postgres community Supabase Launch Week 15 Hackathon Winner Announcement The Vibe Coder's Guide to Supabase Environments Testing for Vibe Coders: From Zero to Production Confidence The Vibe Coding Master Checklist Vibe Coding: Best Practices for Prompting Supabase Auth: Build vs. Buy Top 10 Launches of Launch Week 15 Supabase Launch Week 15 Hackathon Storage: 10x Larger Uploads, 3x Cheaper Cached Egress, and 2x Egress Quota Persistent Storage and 97% Faster Cold Starts for Edge Functions Algolia Connector for Supabase New Observability Features in Supabase Improved Security Controls and A New Home for Security Introducing Branching 2.0 Stripe-To-Postgres Sync Engine as standalone Library Supabase Analytics Buckets with Iceberg Support Create a Supabase backend using Figma Make Introducing JWT Signing Keys Supabase UI: Platform Kit Build a Personalized AI Assistant with Postgres Announcing Multigres: Vitess for Postgres Building on open table formats Open Data Standards: Postgres, OTel, and Iceberg Simplifying back-end complexity with Supabase Data APIs PostgreSQL Event Triggers without superuser access Top 10 Launches of Launch Week 14 Supabase MCP Server Data API Routes to Nearest Read Replica Declarative Schemas for Simpler Database Management Realtime: Broadcast from Database Keeping Tabs on What's New in Supabase Studio Edge Functions: Deploy from the Dashboard + Deno 2.1 Automatic Embeddings in Postgres Introducing the Supabase UI Library Supabase Auth: Bring Your Own Clerk Postgres Language Server: Initial Release Migrating from Fauna to Supabase Migrating from the MongoDB Data API to Supabase Dedicated Poolers Postgres as a Graph Database: (Ab)using pgRouting AI Hackathon at Y Combinator Calendars in Postgres using Foreign Data Wrappers Supabase Launch Week 13 Hackathon Winners How to Hack the Base! Running Durable Workflows in Postgres using DBOS database.build v2: Bring-your-own-LLM Restore to a New Project Hack the Base! with Supabase Top 10 Launches of Launch Week 13 Supabase Queues High Performance Disk Supabase Cron Supabase CLI v2: Config as Code Supabase Edge Functions: Introducing Background Tasks, Ephemeral Storage, and WebSockets Supabase AI Assistant v2 OrioleDB Public Alpha Executing Dynamic JavaScript Code on Supabase with Edge Functions ClickHouse Partnership, improved Postgres Replication, and Disk Management
PostgREST 11 pre-release
Steve Chavez · 2022-12-16 · via Supabase Blog

PostgREST 11 pre-release

PostgREST 11 is not wrapped up yet, however a pre-release with the latest features and fixes is available on the Supabase CLI.

In this blog post we'll cover some of the improved querying capabilities: spreading related tables, related orders and anti-joins.

Very often the way we structure a database is not the way we want to present it to the frontend application. For example, let's assume we have a films and technical_specs tables and they form a one-to-one relationship.

Using PostgREST resource embedding, we can query them in one request like so

From HTTP:


_10

GET /films?select=title,technical_specs(camera,laboratory,sound_mix)


or JavaScript:


_10

const { data, error } = await supabase.from('films').select(`

_10

title,

_10

technical_specs (

_10

camera, laboratory, duration

_10

)

_10

`)


Response:


_11

[

_11

{

_11

"title": "Pulp Fiction",

_11

"technical_specs": {

_11

"camera": "Arriflex 35-III",

_11

"laboratory": "DeLuxe, Hollywood (CA), USA (color)",

_11

"duration": "02:34:00"

_11

}

_11

},

_11

"..."

_11

]


But we'd like to present a “flattened” result to the frontend, without the technical_specs object. For this we could create a new database view or function that shapes the json the way we want, but creating extra database objects is not always convenient.

Using the new “spread” operator(syntax borrowed from JS), we can expand a related table columns and remove the nested object.

From HTTP:


_10

GET /films?select=title,...technical_specs(camera,laboratory,duration)


or JavaScript:


_10

const { data, error } = await supabase.from('films').select(`

_10

title,

_10

...technical_specs (

_10

camera, laboratory, duration

_10

)

_10

`)


Response:


_10

[

_10

{

_10

"title": "Pulp Fiction",

_10

"camera": "Arriflex 35-III",

_10

"laboratory": "DeLuxe, Hollywood (CA), USA (color)",

_10

"duration": "02:34:00"

_10

},

_10

"..."

_10

]


This only works for one-to-one and many-to-one relationships for now but we're looking at ways to remove this restriction.

It's also a common use case to order a table by a related table column. For example, suppose you'd like to order films based on the technical_specs.duration column.

You can now do it like so:

From HTTP:


_10

GET /films?select=title,...technical_specs(duration)&order=technical_specs(duration).desc


or JavaScript:


_10

const { data, error } = await supabase

_10

.from('films')

_10

.select(`

_10

title,

_10

...technical_specs (

_10

duration

_10

)

_10

`)

_10

.order('technical_specs(duration)', { descending: true }))


Response:


_11

[

_11

{

_11

"title": "Amra Ekta Cinema Banabo",

_11

"duration": "21:05:00"

_11

},

_11

{

_11

"title": "Resan",

_11

"duration": "14:33:00"

_11

},

_11

"..."

_11

]


Similarly to spreading related tables, this only works for one-to-one and many-to-one relationships.

To do the equivalent of a left anti-join, you can now filter the rows where the related table is null.

From HTTP:


_10

GET /films?select=title,nominations()&nominations=is.null


or JavaScript:


_10

const { data, error } = await supabase

_10

.from('films')

_10

.select(`

_10

title,

_10

nominations()

_10

`)

_10

.is('nominations', null))


Response:


_12

[

_12

{

_12

"title": "Memories of Murder"

_12

},

_12

{

_12

"title": "Rush"

_12

},

_12

{

_12

"title": "Groundhog Day"

_12

},

_12

"..."

_12

]


Note that nominations doesn't select any columns so they don't show on the resulting response.

The equivalent of an inner join can be done by filtering the rows where the related table is not null.


_10

GET /films?select=title,nominations(rank,...competitions(name))&nominations=not.is.null



_10

const { data, error } = await supabase

_10

.from('films')

_10

.select(

_10

`

_10

title,

_10

nominations(rank,...competitions(name))

_10

`

_10

)

_10

.not('nominations', 'is', null)


Response:


_11

[

_11

{

_11

"title": "Pulp Fiction"

_11

"nominations": [

_11

{"rank": 1, "name": "Palme d'Or"},

_11

{"rank": 1, "name": "BAFTA Film Award"},

_11

{"..."}

_11

]

_11

},

_11

"..."

_11

]


This was already possible with the !inner modifier(introduced on PostgREST 9) but the not null filter is more flexible and can be used with an or filter to combine related tables' conditions.

This pre-release is not deployed to Supabase cloud but you can try it out locally with the Supabase CLI.

Please try it and report any bugs, suggestions or ideas!