You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deno/README.md
+16-11Lines changed: 16 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1121,20 +1121,25 @@ It is also possible to connect to the database without a connection string or an
1121
1121
constsql=postgres()
1122
1122
```
1123
1123
1124
-
| Option | Environment Variables |
1125
-
| ----------------- | ------------------------ |
1126
-
|`host`|`PGHOST`|
1127
-
|`port`|`PGPORT`|
1128
-
|`database`|`PGDATABASE`|
1129
-
|`username`|`PGUSERNAME` or `PGUSER`|
1130
-
|`password`|`PGPASSWORD`|
1131
-
|`idle_timeout`|`PGIDLE_TIMEOUT`|
1132
-
|`connect_timeout`|`PGCONNECT_TIMEOUT`|
1124
+
| Option | Environment Variables |
1125
+
| ------------------ | ------------------------ |
1126
+
|`host`|`PGHOST`|
1127
+
|`port`|`PGPORT`|
1128
+
|`database`|`PGDATABASE`|
1129
+
|`username`|`PGUSERNAME` or `PGUSER`|
1130
+
|`password`|`PGPASSWORD`|
1131
+
|`application_name`|`PGAPPNAME`|
1132
+
|`idle_timeout`|`PGIDLE_TIMEOUT`|
1133
+
|`connect_timeout`|`PGCONNECT_TIMEOUT`|
1133
1134
1134
1135
### Prepared statements
1135
1136
1136
1137
Prepared statements will automatically be created for any queries where it can be inferred that the query is static. This can be disabled by using the `prepare: false` option. For instance — this is useful when [using PGBouncer in `transaction mode`](https://github.com/porsager/postgres/issues/93#issuecomment-656290493).
You can add ergonomic support for custom types, or simply use `sql.typed(value, type)` inline, where type is the PostgreSQL `oid` for the type and the correctly serialized string. _(`oid` values for types can be found in the `pg_catalog.pg_type` table.)_
@@ -1294,8 +1299,8 @@ This error is thrown if the user has called [`sql.end()`](#teardown--cleanup) an
1294
1299
1295
1300
This error is thrown for any queries that were pending when the timeout to [`sql.end({ timeout: X })`](#teardown--cleanup) was reached.
1296
1301
1297
-
##### CONNECTION_CONNECT_TIMEOUT
1298
-
> write CONNECTION_CONNECT_TIMEOUT host:port
1302
+
##### CONNECT_TIMEOUT
1303
+
> write CONNECT_TIMEOUT host:port
1299
1304
1300
1305
This error is thrown if the startup phase of the connection (tcp, protocol negotiation, and auth) took more than the default 30 seconds or what was specified using `connect_timeout` or `PGCONNECT_TIMEOUT`.
0 commit comments