Skip to content

Commit

Permalink
Remove comparison with alternatives from readme
Browse files Browse the repository at this point in the history
lib/pq and go-pg are both in maintenance mode. No point in comparison.
  • Loading branch information
jackc committed Feb 12, 2022
1 parent 4ac1499 commit 3650fc9
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,26 +98,6 @@ There are three areas in particular where pgx can provide a significant performa
perform nearly 3x the number of queries per second.
3. Batched queries - Multiple queries can be batched together to minimize network round trips.

## Comparison with Alternatives

* [pq](http://godoc.org/github.com/lib/pq)
* [go-pg](https://github.com/go-pg/pg)

For prepared queries with small sets of simple data types, all drivers will have have similar performance. However, if prepared statements aren't being explicitly used, pgx can have a significant performance advantage due to automatic statement preparation.
pgx also can perform better when using PostgreSQL-specific data types or query batching. See
[go_db_bench](https://github.com/jackc/go_db_bench) for some database driver benchmarks.

### Compatibility with `database/sql`

pq is exclusively used with `database/sql`. go-pg does not use `database/sql` at all. pgx supports `database/sql` as well as
its own interface.

### Level of access, ORM

go-pg is a PostgreSQL client and ORM. It includes many features that traditionally sit above the database driver, such as ORM, struct mapping, soft deletes, schema migrations, and sharding support.

pgx is "closer to the metal" and such abstractions are beyond the scope of the pgx project, which first and foremost, aims to be a performant driver and toolkit.

## Testing

pgx tests naturally require a PostgreSQL database. It will connect to the database specified in the `PGX_TEST_DATABASE` environment
Expand Down

0 comments on commit 3650fc9

Please sign in to comment.