-
Notifications
You must be signed in to change notification settings - Fork 346
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
Database_PDO_Connection Bulk Insert(PostgreSql9.6.1) [ERROR: current transaction is aborted, commands ignored until end of transaction block] #2050
Comments
I think we're going to need a little bit more info before we can help. |
Sorry, that is a submit mistake. Bulk Insert Loop(1000×2回) ■postgresql-Thu.log
|
It's not real, but the sample code
|
Sorry, |
Not entirely sure what you are trying to do here. Postgres says
Instead of using
in your loop, do not re-use the same object, but create a new one. In other words, do this to initialize the object in your loop:
|
I want to do Bulk Insert. Is CREATE SEQUENCE mandatory for INSERT? Not bug? |
I understand that, my point was that you're doing multiple inserts using the same object instead of destroying the object and creating a new one. LastInsertId() will return false if there is no sequence. |
OS:Windows7 PostgreSQL 9.6 Manuals
"LastInsertId ()" executes "SELECT LASTVAL ()". Does FuelPHP 's PDO support PostgreSQL? |
Should I make a dummy sequence to avoid errors? |
Originally MySQL only. In 1.8, the database driver layer has been reworked so that specific drivers can be created. It is also possible now to create platform specific schemas (for DBUtil). I started with Sqlite, and I have DBlib (Sybase) and SqlSrv drivers in development. Someone in the forum made Informix drivers and promissed to contribute them, but never did. And for some reason or other, nobody seems to use PostgreSQL enough to help with driver development. I can try to find some time next week to have a look at it. |
Thank you. If there is an extensible method with $ result as argument, I think that it can be used for other DB.
|
No description provided.
The text was updated successfully, but these errors were encountered: