Skip to content
This repository
Browse code

Fix compatibility with PostgreSQL 9.x: bytea output.

The issue that hit many (most?) of PostgreSQL adapters is that libpq-8.x
is unable to unescape bytea data from results in text format received
from PostgreSQL-9.x.

But we're always passing bytea data as is to the client (either from
results in binary format when using "postgres_output binary_value"
or escaped from results in text format), so this isn't problem for us.

Patch from Yichun Zhang (agentzh).
  • Loading branch information...
commit c7d6a04e4ba9eb238e8b0a181e0953bd7bddcd5d 1 parent 7c1cde3
Piotr Sikora PiotrSikora authored

Showing 2 changed files with 2 additions and 5 deletions. Show diff stats Hide diff stats

  1. +0 3  TODO.md
  2. +2 2 t/output.t
3  TODO.md
Source Rendered
... ... @@ -1,8 +1,5 @@
1 1 Features that sooner or later will be added to `ngx_postgres`:
2 2
3   -* Make sure that we work-around `bytea` data corruption that takes place
4   - when using 9.0+ database with older client library or vice-versa.
5   -
6 3 * Add support for SSL connections to the database.
7 4
8 5 * Add support for dropping of idle keep-alived connections to the
4 t/output.t
@@ -292,8 +292,8 @@ GET /postgres
292 292 --- error_code: 200
293 293 --- response_headers
294 294 Content-Type: text/plain
295   ---- response_body chomp
296   -\001
  295 +--- response_body_like chomp
  296 +^(?:\\001|\\x01)$
297 297 --- timeout: 10
298 298
299 299

0 comments on commit c7d6a04

Please sign in to comment.
Something went wrong with that request. Please try again.