clockworklabs / clockworklabs/SpacetimeDB

Handle `COPY OUT` requests over PG Wire

Open
#3,928 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

ClickHouse has an external PostgreSQL database engine. It uses COPY (SELECT … FROM …) TO STDOUT statements to fetch data.

SpacetimeDB can support exporting data to CH just by implementing COPY OUT statements in combination with pgwire's copy module.

Currently, this seems to require an architectural rework of sql—core—pg communication to distinguish between query responses and copies, so I'm not taking on it without discussing the design first.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the sql-core-pg communication path and pgwire's copy module. Clarify how query responses and COPY responses should be distinguished, then confirm the design supports COPY (SELECT … FROM …) TO STDOUT for the PostgreSQL integration used by ClickHouse.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, rust
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.