Skip to content

Commit c7d6a04

Browse files
committed
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).
1 parent 7c1cde3 commit c7d6a04

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

TODO.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
Features that sooner or later will be added to `ngx_postgres`:
22

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-
63
* Add support for SSL connections to the database.
74

85
* Add support for dropping of idle keep-alived connections to the

t/output.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ GET /postgres
292292
--- error_code: 200
293293
--- response_headers
294294
Content-Type: text/plain
295-
--- response_body chomp
296-
\001
295+
--- response_body_like chomp
296+
^(?:\\001|\\x01)$
297297
--- timeout: 10
298298
299299

0 commit comments

Comments
 (0)