diff --git a/README.md b/README.md index 96fd671..5fcdf69 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,17 @@ var Pool = pg.Pool // good! a pool bound to the native client var Client = pg.Client // good! this client uses libpq bindings ``` -node-postgres abstracts over the pg-native module to provide exactly the same interface as the pure JavaScript version. Care has been taken to keep the number of api differences between the two modules to a minimum; however, it is recommended you use either the pure JavaScript or native bindings in both development and production and don't mix & match them in the same process - it can get confusing! +#### API differences + +node-postgres abstracts over the pg-native module to provide the same interface as the pure JavaScript version. Care has been taken to keep the number of api differences between the two modules to a minimum. +However, currently some differences remain, especially : +* the error object in pg-native is different : notably, the information about the postgres error code is not present in field `code` but in the field `sqlState` , and the name of a few other fields is different (see https://github.com/brianc/node-postgres/issues/938, https://github.com/brianc/node-postgres/issues/972). +So for example, if you rely on error.code in your application, your will have to adapt your code to work with native bindings. +* the notification object has a few less properties (see https://github.com/brianc/node-postgres/issues/1045) +* column objects have less properties (see https://github.com/brianc/node-postgres/issues/988) +* the modules https://github.com/brianc/node-pg-copy-streams and https://github.com/brianc/node-pg-query-stream do not work with native bindings (you will have to require 'pg' to use them). + +Thus, it is recommended you use either the pure JavaScript or native bindings in both development and production and don't mix & match them in the same process - it can get confusing! ## Features