Pg-promise: Add support for pg-native

Created on 25 Jul 2015  路  7Comments  路  Source: vitaly-t/pg-promise

Hi, did you consider adding support for pg-native? Since it's meant to be a drop-in replacement for pg, a flag in the init phase should do the trick.

question suggestion

Most helpful comment

@andrei-cocorean

Support for Native Bindings has been added in version 3.5.0.

All 7 comments

I haven't, but what would be the advantage of supporting it, you think?

In some cases you might want the boost in performance from the native bindings and it's easier to make the switch if pg-promise supports it.

Speaking of boost in performance, I've just released v.1.8.0 to support pg-query-stream, which by the way doesn't even work with pg-native, which makes it of less value, I suppose.

I will look at testing against it though, to see if it even works...

UPDATE

I have run into a number of issues, trying to switch over to require('pg').native. It doesn't seem to be that simple. I would have to evaluate the issues and the reasons for switching over, to see if it is justified.

I would consider a PR for this this, if you want to try, but so far I haven't been able to make it work.

This also would carry a huge implication to testing. You would need pretty much every test run in two modes - native and non-native, so it would require a major addition to the tests.

Thanks for looking into this. I'll give it a try when I have some time.

@andrei-cocorean , ok, if you do, I will re-open the issue, but closing it for the time being.

@andrei-cocorean did you have a chance to look at it? I did, and found nothing but trouble, trying to use the native bindings, especially under Windows. Many of those were reported to the author of node-postgres, but every time he came back with the same lame excuse that he doesn't have a Windows machine to fix it. At some point I just stopped trying to use the native bindings, it doesn't work.

As a matter of fact, I've been thinking it over more than once - rewriting the entire low-level driver (node-postgres), because I'm not satisfied with how the existing one is supported, but I'm yet to find the time to embark on something this massive. I only know that it works in 99%, without the native bindings. The remaining 1% refers to all the known issues that have been ignored for a long time.

To make matters worse, the author of node-postgres recently black-listed my account, his biggest supporter, so I could no longer provide any more support for node-postgres. What an a-hole, truly!

@andrei-cocorean

Support for Native Bindings has been added in version 3.5.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fte-github picture Fte-github  路  4Comments

seanh1414 picture seanh1414  路  4Comments

normanfeltz picture normanfeltz  路  4Comments

illarionvk picture illarionvk  路  3Comments

msjoshi picture msjoshi  路  4Comments