Skip to content

Add pgsql-http Extension - #23

Merged
adsharma merged 6 commits into
mainfrom
pg_http2
Oct 6, 2026
Merged

adsharma merged 6 commits into
mainfrom
pg_http2

Conversation

@adsharma

@adsharma adsharma commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

@jeffrey82221 work cherry-picked from #19

Adds pgsql-http (v1.7.2, https://github.com/pramsey/pgsql-http) as an
optional separate extension package, following the pgembed-pgvector
split-wheel pattern. The base pgembed wheel is unchanged in size.

  • New module: pgembed-http (src/pgembed_pgsql_http/) — import name
    pgembed_pgsql_http, registry key pgsql_http, SQL name http.
  • pgembed core only registers/discover it (EXTENSION_PACKAGES /
    SO_FILES / NAMES / create-name); binaries ship in the split wheel.
  • Buildable explicitly via make EXTENSIONS=pgsql_http (same pattern as
    pg_search); not in the default EXTENSIONS set or CI wheel matrix.

Usage:

   pip install pgembed pgembed-http

   import pgembed
   assert pgembed.has_extension("pgsql_http")
   server.create_extension("http")   # CREATE EXTENSION http

…map, control filename, keyword typo

- Remove pgsql_http from Makefile EXTENSIONS defaults and CI matrix so
  http.so is not grafted into the pgembed wheel (separate pgembed-http
  wheel only, built via explicit make EXTENSIONS=pgsql_http)
- Revert unrelated pyproject version bump 0.2.1 -> 0.2.0
- postgres_server.create_extension: map http -> pgsql_http
- pgembed_pgsql_http share path: look up http.control via EXTENSION_CREATE
- Fix pgsl-http keyword typo; add test_pgsql_http regression test
- Install/available-extensions/platform/build sections updated
- Notes libcurl build-time requirement
@adsharma

adsharma commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

@jeffrey82221 please add some test coverage in another PR.

@adsharma adsharma mentioned this pull request Oct 5, 2026
…ing workflow

- Restructure shim as nested package so setuptools finds it; fixed
  packages.find (was where=[src], matched nothing), real README for the
  readme field, package-data for the staged http.so/control/sql
- setup.py forces platform wheel tags (prebuilt .so must never ship as
  py3-none-any)
- publish-pgembed-http.yml mirrors build-and-test (same runners, same plain
  make so PG major tracks base; only EXTENSIONS differs), restores the base
  postgres cache, stages binaries via pg_config paths, smoke-tests CREATE
  EXTENSION http, publishes pgembed-http-v* tags via trusted publishing
The nested package dir broke 'pip install -e .' from the repo root:
without a top-level __init__.py the shim imported as an empty namespace
package and import pgembed crashed in _detect_extensions. Repo keeps the
flat layout (same as the other shims); the publish workflow assembles the
nested build-pgembed-http/ tree instead.
@adsharma

adsharma commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Ignoring the CI failures on publish because the first publish on pypi has to be manual.

@adsharma
adsharma merged commit 1abab3d into main Oct 6, 2026
6 of 9 checks passed
@adsharma
adsharma deleted the pg_http2 branch October 6, 2026 04:13
@jeffrey82221

jeffrey82221 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

I cannot install the package pgembed and pgembed-http properly.
I clone into the project repo and do the following installation commands:

python3.12 -m venv .venv
source .venv/bin/activate
pip install -e . pgembed
cd src/pgembed_pgsql_http
pip install -e . pgembed-http

After the installation, pgembed.has_extension("pgsql_http") still == False.

import pgembed
pgembed.has_extension("pgsql_http")

False

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants