本文へスキップ
記事初級

Cloudflare Workers から PostgreSQL に接続する

TCP Sockets と Hyperdrive で Cloudflare Worker を PostgreSQL に接続し、商品テーブルの検索と追加を行います。

最終更新
2026年10月12日
元の記事を読む

この紹介文は現在英語版のみです。

Create a Workers application that talks to an existing PostgreSQL database using TCP Sockets, then speed up connections with Hyperdrive. The Worker reads from and writes to a products table.

What you’ll learn

  • Add a PostgreSQL client library to a Worker
  • Configure and open the database connection
  • Query and insert rows
  • Deploy, then add Hyperdrive for pooled, faster connections

Cloudflare products used

Workers, Hyperdrive.

Follow the full, step-by-step tutorial in Cloudflare’s documentation.

さらに学ぶ