Skip to content

Use hpgsql-simple-compat instead of postgresql-simple#227

Draft
mzabani wants to merge 5 commits into
masterfrom
use-hpgsql-simple-compat
Draft

Use hpgsql-simple-compat instead of postgresql-simple#227
mzabani wants to merge 5 commits into
masterfrom
use-hpgsql-simple-compat

Conversation

@mzabani
Copy link
Copy Markdown
Owner

@mzabani mzabani commented May 11, 2026

This is a branch to show how many changes were necessary to migrate codd from postgresql-simple and postgresql-libpq to hpgsql-simple-compat (from https://github.com/mzabani/hpgsql).

If you are coming here from hpgsql, I recommend reading each commit individually to see what it took to get codd to migrate to hpgsql-simple-compat. Only the last commit disables building related parts of the pipeline because hpgsql isn't in nixpkgs yet.

This is not to be merged yet because hpgsql lacks many authentication methods libpq provides.

mzabani added 4 commits May 11, 2026 14:43
… `Maybe a` values are necessary

The error one gets is:

```
No instance for ‘hpgsql-0.1.6:HPgsql.Encoding.ToPgField ObjName
```

hpgsql-simple-compat needs a ToPgField instance for custom user types
`a` if a `Maybe a` appears encoded as a query argument.
The reason is without a typeOid postgres has to infer values, but `NULL`
without a typeOid can't be inferred for every query.
…Exception anymore

hpgsql-simple-compat will never throw an IOException
@mzabani mzabani force-pushed the use-hpgsql-simple-compat branch from 0686c43 to 6e03b9a Compare May 11, 2026 19:15
hpgsql isn't in nixpkgs yet, so they fail
@mzabani mzabani force-pushed the use-hpgsql-simple-compat branch from 6e03b9a to 1263568 Compare May 11, 2026 19:40
@mzabani mzabani changed the title Use hpgsql-simple-compat Use hpgsql-simple-compat instead of postgresql-simple May 11, 2026
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.

1 participant