Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Postgres Incompatibility #44
We're using knex for our queries and are in the process of moving from mysql to postgres. Great library!
We ran into a compatibility problem when creating an empty record. In knex.js's runQuery method, this.toSql() generates the following for creating a new empty record:
but based on a quick (Google search)[http://www.postgresql.org/message-id/Pine.BSF.email@example.com], it should be:
BTW, mysql generates acceptable code:
and I haven't tested sqlite3.
Is this something you could create a patch for? (I'm in crunch period and unfortunately do not have the time today to write a test, test on all sql variants, etc). If not, I can try to find time over the weekend.
added a commit
Aug 22, 2013
That was quick! Thank you...
I don't seem to be getting back the ids anymore in postgres, mysql seems to work....
but res is  on postgres and contains an id on mysql. Maybe there was a side effect from some of the changes? I'll comb through your changes and will see if I can spot anything.
In postgres, you need to make sure you're passing the second parameter in the