44 Commits

Author SHA1 Message Date
Prasad
f5c90a5484
docs: fix typo in pool docs (#3530) 2025-08-20 06:48:50 -05:00
Johan Fagerberg
0ada72e608
docs: add maxLifetimeSeconds to Pool docs (#3484)
Wording taken from https://github.com/brianc/node-postgres/issues/3298#issuecomment-2305207256
2025-06-12 09:24:03 -05:00
Noritaka Kobayashi
9cf2184d09
refactor: remove unused import & fix typos in docs (#3471) 2025-05-25 11:30:11 -05:00
Brian C
26fa32c133
Update theme.config.js (#3468) 2025-05-15 19:40:03 -05:00
Herman J. Radtke III
e8fde07227
chore: document keepAliveInitialDelayMillis option (#3460) 2025-05-12 01:15:55 -05:00
maltewirz
e30b41d481
Update connecting.mdx (#3266)
Changes tested myself and inspired by documention on aws rds signer https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-rds-signer/
2025-05-10 22:23:27 -05:00
francesco
264e30f424
docs: require to import (#3448) 2025-04-29 11:06:32 -05:00
Davide Violante
93aa1ba2f1
chore: replace var with const in md files (#3446) 2025-04-28 09:54:46 +00:00
Brian C
7a009381e6
Update pool docs (#3442)
* Update docs for pool

* Letting my robot overlords proofread for me

---------

Co-authored-by: Brian Carlson <brian.carlson@getcruise.com>
2025-04-25 15:21:44 -05:00
Brian C
0c1629bea2
Update docs - add ESM info
* Update docs - start

* Add logo & discord

* Start updating docs for esm style imports

* Update docs with logo & info on pooling

* Update more import statements

---------

Co-authored-by: Brian Carlson <brian.carlson@getcruise.com>
2025-04-23 16:46:21 -05:00
Herman J. Radtke III
9cc7d8eb94
docs: add missing parameters on pg.Client Config (#3422)
- client_encoding
- fallback_application_name
- options
2025-04-22 11:04:17 -05:00
Charmander
a9fd34fb42
Revert "docs: fix bug in transaction example (#3414)"
This reverts commit dcb4257898d1d8d37110a4364922206dad33f9fe.

The change doesn’t fix the bug it claims to (`finally` always runs) and introduces a resource leak if the `ROLLBACK` query fails. The related bug that a broken client can be returned to the pool remains unaffected either way.
2025-04-03 15:10:49 -07:00
lucaesposto
dcb4257898
docs: fix bug in transaction example (#3414)
Throwing error will not allow "finally" execution, so client.release() must be invoked before it.
2025-04-01 15:38:14 -05:00
George MacKerron
b4022aa5c0
Add support for SCRAM-SHA-256-PLUS i.e. channel binding (#3356)
* Added support for SCRAM-SHA-256-PLUS i.e. channel binding

* Requested tweaks to channel binding

* Additional tweaks to channel binding

* Fixed lint complaints

* Update packages/pg/lib/crypto/sasl.js

Co-authored-by: Charmander <~@charmander.me>

* Update packages/pg/lib/crypto/sasl.js

Co-authored-by: Charmander <~@charmander.me>

* Update packages/pg/lib/client.js

Co-authored-by: Charmander <~@charmander.me>

* Tweaks to channel binding

* Now using homegrown certificate signature algorithm identification

* Update ssl.mdx with channel binding changes

* Allow for config object being undefined when assigning enableChannelBinding

* Fixed a test failing on an updated error message

* Removed - from hash names like SHA-256 for legacy crypto (Node 14 and below)

* Removed packageManager key from package.json

* Added some SASL/channel binding unit tests

* Added a unit test for continueSession to check expected SASL session data

* Modify tests: don't require channel binding (which cannot then work) if not using SSL

---------

Co-authored-by: Charmander <~@charmander.me>
2025-03-10 13:13:32 -05:00
Alex Anderson
d1548d6e77
docs/apis.result: fix typo (#3238)
Co-authored-by: alxndrsn <alxndrsn>
2024-06-05 10:59:45 -05:00
Alex Anderson
ba07d19459
docs: fix typos in announcements (#3236)
Co-authored-by: alxndrsn <alxndrsn>
2024-06-05 10:49:28 -05:00
Alex Anderson
ff47a97f28
Add option to force use of Extended Queries (#3214)
This feature can be used as follows:

```
client.query({ text: 'SELECT 1', queryMode: 'extended' })
```

This will force the query to be sent with parse/bind/execute even when it has no parameters and disallows multiple statements being executed.  This can be useful in scenarios where you want to enforce more security & help prevent sql injection attacks...particularly by library authors.

---------

Co-authored-by: alxndrsn <alxndrsn>
Co-authored-by: Brian Carlson <brian.m.carlson@gmail.com>
2024-06-04 11:14:04 -05:00
Wes Lord
81e2ff0524
Update reference in docs from done to release (#3211) 2024-05-15 17:04:16 -05:00
Juan GP
0096856e2e
reorder user-password-host-port-database appearences (#3207) 2024-05-10 12:03:11 -05:00
Joan Miquel Torres
c3bd279953
Documented lock_timeout in client.mdx (#3199)
Added 'lock_timeout' option in Config object documentation since it's explicitly declared in node-postgres (packages/pg/lib/connection-parameters.js)

I also checked it works as documented in PostgreSQL Docs:

https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-LOCK-TIMEOUT
2024-04-30 09:49:39 -05:00
Italo A
3cde785e38
Update queries.mdx link to markdown (#3192)
If we use `<a>` here, the template does not visually identify it as a link, so I have switched to the markdown link format.
2024-04-05 18:07:31 -07:00
Brian C
408bebd990
Fix import syntax for commonJS in documentation (#3191) 2024-04-05 16:48:44 -05:00
Jakob Runge
aedae81c75
Fix broken link in docs (#3155)
* Fix broken link to /apis/types in docs

* Adjust slugs in docs pages
2024-03-14 22:54:57 -07:00
Matthew Richmond
0ee010e5a0
Update project-structure.md (#3166)
Small path update
2024-03-13 12:42:59 -05:00
Akash
2a8efbee09
Minor typo correction (#3135) 2024-02-09 21:27:50 -08:00
FB
6cd0aeb212
Uppercase LTS in docs home page (#3103)
Changed 'lts' to 'LTS' for better readability, so people get it stands for Long-Term-Support
2023-11-29 22:52:36 -08:00
Kyle Gray
a733b40f99
docs: Link to current PostgreSQL data types page (#3097)
The data types link pointed at PostgreSQL 9.5. Update the link to always point to the latest version of PostgreSQL.
2023-11-19 17:05:44 -06:00
Alex Anderson
16322c2d50
Fix eslint violations (#3078)
Co-authored-by: alxndrsn <alxndrsn>
2023-10-19 10:27:25 -05:00
Riku Rauhala
970804b6c1
Update pg-connection-string url in connecting.mdx (#3005) 2023-07-07 17:47:35 -05:00
Arian Mirahmadi
735683c5cb
Fix typo in project-structure.md (#3008) 2023-06-13 14:22:04 -07:00
Filipe Correa
46cfb25baf
Remove await from client release (#3006)
Co-authored-by: Filipe Correa <f.avelino-correa@klarna.com>
2023-06-12 12:50:40 -07:00
Jason Ford
4dbf1af069
Add note about case sensitivity of result of pg.escapeIdentifier (#2993) 2023-06-01 01:03:50 -05:00
Rijk van Zanten
20d2c08027
Make async/await the primary examples in the docs (#2932)
* Correctly capitalize GitHub

* Add note on callbacks to index

* Add note on error handling

* Update client examples to use promises

* Update pooling examples

* Fix readme link

* Update cursor docs

* Update connecting examples

* Update Queries

* Update examples in pooling

* Update trx examples

* Update SSL example

* Update example

* Use ESM instead of CJS

* Update docs/pages/apis/cursor.mdx

Co-authored-by: Charmander <~@charmander.me>

* Update docs/pages/apis/cursor.mdx

Co-authored-by: Charmander <~@charmander.me>

* Update docs/pages/apis/pool.mdx

Co-authored-by: Charmander <~@charmander.me>

* Update docs/pages/apis/pool.mdx

Co-authored-by: Charmander <~@charmander.me>

* Update docs/pages/apis/pool.mdx

Co-authored-by: Charmander <~@charmander.me>

* Update docs/pages/features/connecting.mdx

Co-authored-by: Charmander <~@charmander.me>

* Update docs/pages/features/connecting.mdx

Co-authored-by: Charmander <~@charmander.me>

* Update docs/pages/features/ssl.mdx

Co-authored-by: Charmander <~@charmander.me>

---------

Co-authored-by: Charmander <~@charmander.me>
2023-05-31 11:25:24 -05:00
Shane
65406985b9
Fix typo in types.mdx (#2989) 2023-05-29 12:07:05 -07:00
Conner
249182ea9f
Document client.escapeIdentifier and client.escapeLiteral (#2954)
* Document client.escapeIdentifier and client.escapeLiteral

Per #1978 it seems that these client APIs are undocumented. Added documentation for these functions along with some examples and relevant links.

* Fix typos in new docs

* Migrate escapeIdentifier and escapeLiteral from Client to PG

These are standalone utility functions, they do not need a client instance to function.

Changes made:
- Refactored escapeIdentifer and escapeLiteral from client class to functions in utils
- Update PG to export  escapeIdentifier and escapeLiteral
- Migrated tests for Client.escapeIdentifier and Client.escapeLiteral to tests for utils
- Updated documentation, added a "utilities" page where these helpers are discussed

**note** this is a breaking change. Users who used these functions (previously undocumented) on instances of Client, or via Client.prototype.

* Export escapeIdentifier and escapeLiteral from PG

These are standalone utility functions, they should not depend on a client instance.

Changes made:
- Refactored escapeIdentifer and escapeLiteral from client class to functions in utils
- Re-exported functions on client for backwards compatibility
- Update PG to export  escapeIdentifier and escapeLiteral
- Updated tests to validate the newly exported functions from both entry points
- Updated documentation, added a "utilities" page where these helpers are discussed

* Ensure escape functions work via Client.prototype

Updated changes such that escapeIdentifier and escapeLiteral are usable via the client prototype
Updated tests to check for both entry points in client
2023-05-02 07:55:59 -05:00
Felix Rath
d63c761be8
docs(api/result): clarify that result.rowCount can be null (#2967)
`result.rowCount` is initialized to `null`, but only set to an `int`-value if the returned command tag consists of more than one word, which is not the case in general.

For example, the `LOCK` command will return a command tag of simply the form `LOCK`, and thus `result.rowCount` will stay `null`.
2023-05-01 09:15:55 -05:00
Jan Piotrowski
b357e1884a
fix(theme.config.js): Replace default meta description and social title (#2952)
Currently still nextra default.

Those are shown in Slack and other social apps when sharing the website.
2023-04-20 16:03:59 +02:00
Samuel Durante
92351b5f3e
docs(client): improve the Client instance example (#2935) 2023-03-30 10:49:28 -05:00
Ryan B. Harvey
65ca2458fd
Add release event to Pool API docs (#2928) 2023-03-16 11:34:50 -05:00
Aram Zegerius
8804e5caaf
Fix typo in URL (#2913) 2023-03-06 12:30:37 -06:00
Meron Ogbai
3e34816f6f
Update title (#2886)
This will change the title of the docs from Next.js Static Site Generator to node-postgres
2022-12-30 22:45:42 -06:00
Brian C
27d612a2ac
Update docs (#2867)
- fix config warnings
- add search bar
- add google analytics
2022-11-23 21:50:36 -06:00
Brian C
12b9a69776
update docs - clean up interface (#2863)
* update docs - clean up interface

* Remove node v8.x from test matrix
2022-11-23 15:08:09 -06:00
Brian C
1aa08274a5
Migrate docs repo into monorepo (#2823)
* Move files over

* Finish initial port of content
2022-10-10 12:20:46 -05:00