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

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
V
V2EX
C
Check Point Blog
GbyAI
GbyAI
D
Docker
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
T
Troy Hunt's Blog
博客园 - Franky
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Microsoft Security Blog
Microsoft Security Blog
P
Privacy & Cybersecurity Law Blog
WordPress大学
WordPress大学
The Cloudflare Blog
S
SegmentFault 最新的问题
Latest news
Latest news
Microsoft Azure Blog
Microsoft Azure Blog
P
Proofpoint News Feed
I
InfoQ
博客园 - 【当耐特】
NISL@THU
NISL@THU
A
About on SuperTechFans
T
Tailwind CSS Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
The Hacker News
The Hacker News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Scott Helme
Scott Helme
雷峰网
雷峰网
C
CXSECURITY Database RSS Feed - CXSecurity.com
Security Latest
Security Latest
V
Vulnerabilities – Threatpost
Security Archives - TechRepublic
Security Archives - TechRepublic
A
Arctic Wolf
Hacker News: Ask HN
Hacker News: Ask HN
N
News and Events Feed by Topic
IT之家
IT之家
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
aimingoo的专栏
aimingoo的专栏
T
Threat Research - Cisco Blogs
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
SecWiki News
SecWiki News
大猫的无限游戏
大猫的无限游戏
S
Security Affairs
The Register - Security
The Register - Security
www.infosecurity-magazine.com
www.infosecurity-magazine.com
L
LINUX DO - 热门话题
T
Tor Project blog

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
Supabase Wrappers v0.2: Query Pushdown & Remote Subqueries
Bo Lu · 2023-12-14 · via Supabase Blog

Supabase Wrappers v0.2: Query Pushdown & Remote Subqueries

Supabase Wrappers v0.2 is out and now available on the Supabase platform. Wrappers is a Postgres extension that provides integrations with external sources so you can interact with third-party data using SQL.


_12

-- Connect Postgres to Stripe

_12

create foreign table products (

_12

id text,

_12

name text,

_12

description text,

_12

default_price text

_12

)

_12

server my_stripe_server

_12

options ( object 'products' );

_12

_12

-- Fetch all your Stripe products in Postgres

_12

select * from products limit 10;


Key Features and Improvements in Wrappers v0.2:

  • New Wrappers
  • Query Pushdown
  • Remote Subqueries
  • Usage Statistics

To start using Wrappers on the Supabase platform, check out the Wrappers docs.

  • Airtable (Read-only): query your Airtable bases with support for jsonb
  • AWS S3 (Read-only): with support for CSV, JSON, and Parquet
  • Clerk (from the team at Tembo). Not yet available on our platform since it is a community wrapper, see below for details.
  • And a WIP Wrapper for Auth0

We cannot support community Wrappers inside the Supabase Dashboard until the Wrappers API is stabilized. You can vote your favorite Wrapper if you'd like it to be added to Supabase in the future. If you have developed a Wrapper that you want inside the Supabase Dashboard, please contribute it as a PR in the wrappers repo. Once we release Wrappers 1.0, we will support community Wrappers within the Supabase Dashboard.

More improvements and updates can be found on Wrappers release page, including support for Query Pushdown, Remote Subqueries, and Usage Statistics which we’ll explore below.

The Wrappers v0.2 framework now supports Query Pushdown.

What is Query Pushdown?#

Query pushdown is a technique that enhances query performance by executing parts of the query directly on the data source. It reduces data transfer between the database and the application, enabling faster execution and improved performance.

How to Use Query Pushdown in Wrappers#

In Wrappers, the pushdown logic is integrated into each extension. You don’t need to modify your queries to benefit from this feature. For example, the Stripe FDW automatically applies query pushdown for id within the customer object:


_10

select *

_10

from stripe.customers

_10

where id = 'cus_N5WMk7pvQPkY3B';


This approach contrasts with fetching and filtering all customers locally, which is less efficient. Query pushdown translates this into a single API call, significantly speeding up the process:


_10

https://api.stripe.com/v1/customers/cus_N5WMk7pvQPkY3B


We can use push down criteria and other query parameters too. For example, ClickHouse FDW supports order by and limit pushdown:


_10

select *

_10

from clickhouse.people

_10

order by name

_10

limit 20;


This query executes order by name limit 20 on ClickHouse before transferring the result to Postgres.

For details on where pushdown is supported, consult each FDW's documentation in the Wrappers Documentation.

Remote subqueries enable the use of prepared data on a remote server, which is beneficial for complex queries or sensitive data protection.

Static Subqueries#

In its most basic form, you can map a query on the remote server into a foreign table in Postgres. For instance:


_10

create foreign table clickhouse.people (

_10

id bigint,

_10

name text,

_10

age bigint

_10

)

_10

server clickhouse_server

_10

options (

_10

table '(select * from people where age < 25)'

_10

);


In this example, the foreign table clickhouse.people data is read from the result of the subquery select * from people where age < 25 which runs on ClickHouse server.

Dynamic Subqueries#

What if the query is not fixed and needs to be dynamic? For example, ClickHouse provides Parameterized Views which can accept parameters for a view. Wrappers v0.2 supports this by defining a column for each parameter. Let's take a look at an example:


_11

create foreign table clickhouse.my_table (

_11

id bigint,

_11

col1 text,

_11

col2 bigint,

_11

_param1 text,

_11

_param2 bigint

_11

)

_11

server clickhouse_server

_11

options (

_11

table '(select * from my_view(column1=${_param1}, column2=${_param2}))'

_11

);


You can then pass values to these parameters in your query:


_10

select id, col1, col2

_10

from clickhouse.my_table

_10

where _param1 = 'abc' and _param2 = 42;


Currently, this feature is supported by ClickHouse FDW and BigQuery FDW, with plans to expand support in the future.

Quantitative metrics play a pivotal role when working with Postgres FDWs because of their impact on performance optimisation, monitoring, and query planning across distributed databases. We introduced a FDW usage statistics table wrappers_fdw_stats in Wrappers v0.2, storing:

  • create_times - number of times the FDW instance has been created
  • rows_in - number of rows transferred from source
  • rows_out - number of rows transferred to source
  • bytes_in - number of bytes transferred from source
  • bytes_out - number of bytes transferred to source
  • metadata - additional usage statistics specific to a FDW

We can use these to identify bottlenecks, latency issues, and inefficiencies in data retrieval. Access this table on the Supabase platform using the following:


_10

select *

_10

from extensions.wrappers_fdw_stats;


We couldn't build Wrappers v0.2 without our community and we'd like to thank all the following people for their contributions:

Dom Jocubeit, 0xflotus, Glitch, Tobias Florek, Jubilee, Germán Larraín, Kavanaugh Latiolais, tedverse.

A separate shout-out belongs to the pgrx team, which allows us to write Wrappers with Rust.

Want to join the Supabase Wrappers community contributors? Check out our contribution docs. We'd love to add you to the list next time.