Closed m4tm4t closed 13 years ago
oh, so someone is still using postgre?.. yes, please, provide a fix for postgre if you can
Strange, it used long time in master version directly in code and none one report porblems when some other porblems has been reported about posgre use.
"If it's a good fix I can make patch for all queries"
No-no, this is not right way...
We have some other syntax diff in queries for mysql/posgre and have special defines for provide alternative syntax. If you confirm that this work right i can add like define for in all places use instead direct UNIX_TIMESTAMP But we also use FROM_UNIXTIME(time). Is it ok case?
Tested as postgres function and work then what the best, postgres functions or core modification?
Hmm, intresting sollution, if function psosible then maybe better have its. As i understand then need do add its query in posrgre database connection init? it need do for each connection or single time. in any case this need do then in PostgreSQLConnection::Initialize possible. Can you test this way? And maybe provide patch if work....
Function replacement need to be added one time at each database using FROM_UNIXTIME and UNIX_TIMESTAMP http://www.picdo.net/fichiers/2011/2/12/05ca3557-7ecb-4e0d-b24d-e9a14261671b_pgfunctions.tiff
Fixed in [11155] in suggested way. Please look is i ok write because can't do real test in PostgreSQL.
it works but you have forget the function FROM_UNIXTIME https://gist.github.com/824546
Oh, thank you :) Fixed in [11160]
DBErrors.log: https://gist.github.com/823261
I have fix realmd related queries and work fine https://gist.github.com/823286
UNIX_TIMESTAMP() simply replaced by round(date_part('epoch',now()))
If it's a good fix I can make patch for all queries