-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node-postgres version 7 incompatibilities #7998
Comments
You didn't try the tests before #7888 was merged? |
@felixfbecker The issue was timing 😅 I only submitted that PR to remove the deprecation warning. I wasn't expecting breaking changes other than the ones listed in their migration guide. I followed the guide thoroughly. After I migrated and submitted the PR version 7 was released. I didn't expect other breaking changes. It's partly my fault. But since I worked on that part of the code I can handle the fix. We should reach a consensus on my question first though. |
I think we should maintain whatever behaviour we had with v6 |
@felixfbecker take a look at brianc/node-postgres#508 It was corrupting the results before. They've fixed it so instead of joining all rows from all results into a single row ( which is wrong on so many levels ) it now returns a multi dimensional array. I can add a new query type: MULTIPLE. The outcome would be this:
Do you think that makes sense? |
Yes. I am just worried about how to type a different return type depending on setting a nested option. Sounds a bit hard for IDEs to figure out. Then again, pg's way is even harder. |
@felixfbecker Hmmmm very good question. Maybe just add a new method? something like
|
Since there are such serious issues with pg7, might I suggest you guys implement some means to prevent use of sequelize with pg7? I would even prefer a violent crash on app startup with a message saying this is not supported, over finding an error deep in logs and spending an hour debugging. |
@konrad-garus I think that will do for now 👍 👍 Care to submit a PR? 😅 |
What is a good way to detect this, though? The only one I found so far is looking for a function removed in pg7, like:
|
Just read the package.json? |
I'm not aware of a Node API to do it, and I find scanning the file system pretty dirty and fragile. Does it even guarantee to give you correct results 100% of the time? But hey, hopefully it's a temporary hack. What do you think about this:
|
You can't assume the package is in
|
cwd - that was my problem. I wasn't aware of
How about:
|
Please pin a note at the top of the readme stating that Sequelize is currently incompatible with |
lol, wow. 😓 |
Sequelize currently does not work with version 7 of pg. See sequelize/sequelize#7998. Fixes #1.
I'm encountering this issue, running Sequelize with pg7. Multi-statement methods like I can of course downgrade to pg6, but would be nice to have this working with pg7. Any progress on this issue would be greatly appreciated :) |
I'm currently using pg 6.4.1. I was wondering what the status of this issue is. It seems I can't use pg7 with the newest version of of sequelize. |
I am still encountering issues running pg7, specifically encountering issue #8078 which was closed :( |
Is there anything left to do now that pg7 is officially supported? |
@gabegorelick just refactor work, not blocking |
What exactly needs to be done here? In other words, what kind of refactor are you looking for, @sushantdhiman ? |
@papb I wanted to support real multiple statements where you can pass But currently we are using some hacks to support upsert and query generator code is not ready for this refactor, not sure if all dialect support what I planned. As we already support |
Any version of sequelize is incompatible with version 7. The main reason is that pg7 returns multiple result objects instead of one with joined results from multiple statements. Therefore, any multiple statement query breaks the postgre's query runner.
I have tested sequelize with pg7 and I see a dozen failed tests. We should decide how we should handle multiple statements. I see these options:
Before this is fixed, there is no choice but to use pg ^6.
Dialect: postgres
Database version: any
Sequelize version: any
The text was updated successfully, but these errors were encountered: