You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now when "adding" a new row it attempts to insert a null value for the primary key. This works in MySQL when auto_increment is used. I would like to see support for a new argument (maybe called "sequence") that specifies which sequence to use to generate the primary key before the insert happens. This will help with PostgreSQL support.
In case you're not familiar with sequences the idea is that I can SELECT NEXTVAL('sequencename'); to grab the next available ID for a specific sequence. It's common for non-MySQL dbs to use sequences instead of auto_increment columns (yes I know Postgres has a "serial" option that does the same thing but I am not using it).
I may be able to work on a patch for this in the next week or so, just wanted to document it as a request.
The text was updated successfully, but these errors were encountered:
This sounds useful. I don't make big use of PostgreSQL myself, and when I have I've used 'serial' to get similar behaviour to MySQL, so I'm not very familiar with how this should be done.
If you get a chance to work on a patch that would be fantastic; alternatively a bit of guidance on the insert query that should be generated to make proper use of a sequence would be useful.
This one has sat without attention for a long time - sorry about that!
If this would still be useful to you, a little guidance on the best way to do it would be appreciated, as I'm a bit rusty when it comes to PostgreSQL, and when I have used it, I've always used 'serial' to get similar auto-increment behaviour to MySQL.
Thanks for the attention, actually this would still be useful and I will get to it at some point. The project I'm working on that needs it got placed on the back burner for the near term so it may be a few weeks. But thanks again!
Right now when "adding" a new row it attempts to insert a null value for the primary key. This works in MySQL when auto_increment is used. I would like to see support for a new argument (maybe called "sequence") that specifies which sequence to use to generate the primary key before the insert happens. This will help with PostgreSQL support.
In case you're not familiar with sequences the idea is that I can SELECT NEXTVAL('sequencename'); to grab the next available ID for a specific sequence. It's common for non-MySQL dbs to use sequences instead of auto_increment columns (yes I know Postgres has a "serial" option that does the same thing but I am not using it).
I may be able to work on a patch for this in the next week or so, just wanted to document it as a request.
The text was updated successfully, but these errors were encountered: