Skip to content

Commit e89eb5f

Browse files
committed
Bring back unrelated changes that were reverted in last commit.
1 parent 2893476 commit e89eb5f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ postgres_pass
4646
-------------
4747
* **syntax**: `postgres_pass upstream`
4848
* **default**: `none`
49-
* **context**: `location`
49+
* **context**: `location`, `if location`
5050

5151
Set name of an upstream block that will be used for the database connections
5252
(it can include variables).
@@ -56,7 +56,7 @@ postgres_query
5656
--------------
5757
* **syntax**: `postgres_query [methods] query`
5858
* **default**: `none`
59-
* **context**: `http`, `server`, `location`
59+
* **context**: `http`, `server`, `location`, `if location`
6060

6161
Set query string (it can include variables). When methods are specified then
6262
query is used only for them, otherwise it's used for all methods.
@@ -68,7 +68,7 @@ postgres_rewrite
6868
----------------
6969
* **syntax**: `postgres_rewrite [methods] condition [=]status_code`
7070
* **default**: `none`
71-
* **context**: `http`, `server`, `location`
71+
* **context**: `http`, `server`, `location`, `if location`
7272

7373
Rewrite response `status_code` when given condition is met (first one wins!):
7474

@@ -90,7 +90,7 @@ postgres_output
9090
---------------
9191
* **syntax**: `postgres_output none|value|row|rds [row] [column]`
9292
* **default**: `rds`
93-
* **context**: `http`, `server`, `location`
93+
* **context**: `http`, `server`, `location`, `if location`
9494

9595
Set output format:
9696

src/ngx_postgres_processor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ ngx_postgres_upstream_connect(ngx_http_request_t *r, ngx_connection_t *pgxc,
165165
* This cannot happen, PQconnectPoll would return
166166
* PGRES_POLLING_FAILED in that case.
167167
*/
168-
dd("connecting (unknown state: %d)", (int) PQstatus(pgdt->pgconn));
168+
dd("connecting (unknown state:%d)", (int) PQstatus(pgdt->pgconn));
169169

170170
dd("returning NGX_ERROR");
171171
return NGX_ERROR;

t/loc-if.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Content-Type: application/x-resty-dbd-stream
8080
8181
8282
83-
=== TEST 1: postgres_pass and postgres_query work in location if blocks
83+
=== TEST 2: postgres_pass and postgres_query work in location if blocks
8484
--- http_config
8585
upstream database {
8686
postgres_server 127.0.0.1:$TEST_NGINX_POSTGRESQL_PORT dbname=ngx_test

0 commit comments

Comments
 (0)