Commit Graph

1704 Commits

Author SHA1 Message Date
Brian M. Carlson
9bcf55dda9 Fix vulnerability 2017-08-12 16:31:32 -05:00
Brian Carlson
bc0b03e0b0 Bump version 2017-07-13 22:29:42 -05:00
2Pacalypse-
e52512cedb Adjust the test for arrays of buffers to work across all node versions. 2017-07-13 22:24:52 -05:00
2Pacalypse-
e44d83f02f Add the test for arrays of buffers. 2017-07-13 22:24:52 -05:00
2Pacalypse-
c2af53a24e Properly insert buffers in arrays.
Before this commit, when someone tried to insert a Buffer into an array,
the library would try to escape it (by calling the `escapeElement` on
it), which would fail because buffers don't have a `replace` method.
2017-07-13 22:24:52 -05:00
Karl Böhlmark
dbf3bd3304 use consistent syntax for semver ranges 2017-06-26 15:11:53 -04:00
Brian M. Carlson
a0a050702e Bump version 2017-06-21 12:33:43 -05:00
Brian M. Carlson
7636f3630b Update changelog 2017-06-21 12:33:33 -05:00
Brian M. Carlson
055e708dc6 Bump version 2017-06-21 12:29:57 -05:00
Eder Ávila Prado
860cccd531 fix for server enconding when using SQL_ASCII and latin1 enconding 2017-06-21 12:23:06 -05:00
Brian Carlson
afe249896f Bump version 2017-06-20 09:30:59 -05:00
Brian Carlson
e4469340ae Fix deprecation warnings in native driver 2017-06-20 09:28:44 -05:00
Brian C
842803c7ef Fix over-eager deprecation warnings (#1333)
* WIP

* Remove console.log messages
2017-06-20 08:59:07 -05:00
Brian M. Carlson
f7a946155f Bump version 2017-06-19 16:08:23 -05:00
Brian M. Carlson
1e04fdb7e0 Add changes for v6.3.0 2017-06-19 16:07:12 -05:00
Brian M. Carlson
b5b49eb895 Add deprecations
This adds deprecations in preparation for `pg@7.0`

- deprecate using event emitters on automatically created results from client.query.
- deprecate query.promise() - it should never have been a public method and it's not documented. I need to do better about using _ prefix on private methods in the future.
- deprecate singleton pool on the `pg` object. `pg.connect`, `pg.end`, and `pg.cancel`.
2017-06-19 16:00:37 -05:00
Brian C
bbb759fba4 Create LICENSE 2017-06-12 10:14:31 -05:00
Amila Welihinda
5421e9dc0f Added MIT License 2017-06-12 10:14:31 -05:00
Brian M. Carlson
58691218af Bump version 2017-06-09 12:33:55 -05:00
Brian Carlson
76c59a01f2 Emit error when backend unexpectedly disconnects 2017-06-09 12:27:47 -05:00
Brian C
f2b87e02f1 Add client connectionString tests (#1310)
* Remove redundant tests

* Add client connectionString test

Add test to ensure { connectionString } is respected as an argument to the client constructor

* Add test for connection string property

Also fixed some legacy require statements.
2017-06-07 22:58:03 -05:00
Brian M. Carlson
3757ff7300 Bump version 2017-05-24 09:05:31 -05:00
Raul Ochoa
4cd56cc4f8 Make pool name consistent on missing config params (#1279)
* Going red: using a config object creates two pools when missing some params

It should only create a pool in a consistent way, even if some params
are not provided in the first place.

* Delay the pool name generation to make it consistent between calls

* Don't fallback to empty object as config is already defined
2017-05-24 09:04:50 -05:00
T.J. Schuck
e5f0e5d36a s/2016/2017/ (#1291) 2017-05-17 16:47:07 -05:00
Brian M. Carlson
c32316df77 Bump version 2017-05-15 12:21:32 -05:00
Sehrope Sarkuni
ee8193673c Libpq connection string escaping (#1285)
* Fix escaping of libpq connection string properties

Fix handlings of libpq connection properties to properly escape single
quotes and backslashes. Previously the values were surrounded in single
quotes which handled whitespace within the property value, but internal
single quotes and backslashes would cause invalid connection strings to
be generated.

* Update expected output in test to be quoted

Update the expect host output in the connection parameter test
to expect it to be surrounded by single quotes.

* Add test for configs with quotes and backslashes
2017-05-15 12:19:13 -05:00
Brian M. Carlson
4659d5d75f Bump version 2017-05-15 09:54:09 -05:00
Brian C
db5f4ae1ab Upgrade packet reader (#1287) 2017-05-15 09:36:18 -05:00
Brian Carlson
f42924bf05 Bump version 2017-04-24 13:34:03 -05:00
Brian Carlson
80d136a531 Add test & documentation for replicationStart message 2017-04-24 13:33:38 -05:00
Kibae Shin
4f790deb73 Support for logical streaming replication (#1271)
* Support for logical streaming replication

* Wrong compare expr in getLibpqConnectionString

* Simplify codes for replication parameter
2017-04-24 13:24:30 -05:00
Ary Purnomoz
4505ae98d9 support ssl params for pg-native (#1169)
Make pg-native able to pass sslmode, sslca, sslkey and sslcert params to libpq
2017-04-19 09:55:56 -05:00
Kenneth Schnall
0e2625b74e Add semicolons to Pooling example in README.md (#1266) 2017-04-17 11:43:09 -05:00
javiertury
71a136488b Improve Readme.md for not so advanced users (#1235)
* Improve Readme.md for not so advanced users

1. Add brief description about the 3 possible ways of executing queries: passing the query to a pool, borrowing a client from a pool or obtaining an exclusive client. Give examples for the 3 of them.

2. Use the examples to teach how to reuse a pool in all of your project. This should be helpful for not so advanced users and prevents mistakes.

3. Open a troubleshooting section.

* Shrink Troubleshooting and Point to Examples

1. Troubleshooting/FAQ section will only contain a reference to the wiki FAQ. I've already moved the content to the wiki.

2. At the end of "Pooling example" point to the wiki example page. Also indicate that there they can find how to use node-postgres with promises and async/await. I've already created that content in the wiki.
2017-03-27 22:21:04 -05:00
Rocky
7504c20745 Fix README.md (#1250) 2017-03-27 22:20:27 -05:00
Brian Carlson
3de22ba991 Bump version 2017-03-20 12:01:56 -05:00
Magnus Hiie
197f86f90d Fix ECONNRESET error emitted after failed connect (#1230)
On Windows, after a connect attempt has failed, an error event with
ECONNRESET is emitted after the real connect error is propagated to the
connect callback, because the connection is not in ending state
(connection._ending) where ECONNRESET is ignored. This change ends the
connection when connect has failed.

This fixes #746.
2017-03-20 12:01:41 -05:00
Ryan Hamilton
549404e21e Update README.md (#1247)
grammar fix
2017-03-20 12:00:57 -05:00
Brian M. Carlson
4fae7a9a7f Bump version 2017-03-09 15:06:29 -06:00
Linus Unnebäck
ce8f215c88 Fix throw in type parsers when in prepared statement (#1242) 2017-03-09 15:05:26 -06:00
Brian Carlson
ff5ceb4304 Bump version 2017-03-06 11:06:08 -06:00
Linus Unnebäck
5cb38f5892 Handle throws in type parsers (#1218)
* Handle throws in type parsers

* Fix throw in type parsers test for Node 0.x
2017-03-06 11:04:16 -06:00
Charmander
41017814d3 Avoid infinite loop on malformed message (#1208)
* Avoid infinite loop on malformed message

If handling of such messages is deemed unimportant, `indexOf` is still faster (~40%) and cleaner than a manual loop.

Addresses #1048 to an extent.

* Use indexOf fallback for Node ≤0.12
2017-02-21 11:19:03 -06:00
Charmander
5b6d883723 Remove broken tests with external dependency (#1209)
Yikes.
2017-02-12 22:23:09 -06:00
Patai Adam
6e63f0e217 Update readme (#1210)
* Fix sample code in README

* Fix typo
2017-02-12 22:20:41 -06:00
Alexander Mochalin
f6c40b9331 parse int8[] (#1152)
* parse int8[]

* missing semicolon

* test

* test fixed

* test fixed

* test fixed. again.
2016-12-16 09:44:19 -06:00
Brian Carlson
2c636c750f Bump version 2016-12-13 11:53:57 -06:00
Brian C
7f35240a5c Fix for utf-8 characters in md5 passwords (#1183)
This is the same fix as supplied in 1178 but includes a test.

Closes #1178
2016-12-13 11:51:36 -06:00
Charmander
981960b445 Remove confusing conditions (#1159)
* Remove unreachable code

* Remove redundant condition

Every path with `!this.values` results in `false` regardless of `this.binary`.
2016-12-13 07:50:07 -06:00
Charmander
48a9738a0b Run inbound parser tests (#1182)
They were disabled by 4cdd7a116b without comment; it seems that this might have been unintentional?

In any case, they should probably be enabled, updated, or removed.
2016-12-13 07:36:13 -06:00