I am working on a new website for myself and decided to move away from mysql and to postgresql. However after installing the forum, and click on the first forum it gives me this sql error.
MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
42803 - ERROR: column "t.fid" must appear in the GROUP BY clause or be used in an aggregate function
Query:
SELECT t.*, p.displaystyle AS threadprefix, CASE WHEN t.numratings=0 THEN 0 ELSE t.totalratings/t.numratings::numeric END AS averagerating, r.uid AS rated, t.username AS threadusername, u.username FROM mybb_threads t LEFT JOIN mybb_users u ON (u.uid = t.uid) LEFT JOIN mybb_threadratings r ON(r.tid=t.tid AND r.uid='1') LEFT JOIN mybb_threadprefixes p ON (p.pid = t.prefix) WHERE t.fid='2' AND (t.visible='1' OR t.visible='0') GROUP BY t.tid ORDER BY t.sticky DESC, t.lastpost desc LIMIT 20 OFFSET 0
I have not yet done anything yet but install the board, so I was wondering if I should report this as a bug as well as get help to fix it?
MyBB is not fully compatible with PgSQL, so you may want to report this bug on the tracker (I think this one has been reported and fixed)
Oh, it's already there. awesome. I guess I will just wait for that fix to come.
(2011-03-28, 06:59 AM)HolyPhoenix Wrote: [ -> ]I am working on a new website for myself and decided to move away from mysql and to postgresql.
Bad decision. MySQL is not the best database but it's the only choice when it comes to MyBB and many other PHP based applications. You will find that MyBB itself has problems with anything but MySQL, not to mention plugins that haven't ever been tested with anything else.
Go back to MySQL unless you have no other choice.
(2011-03-28, 03:02 PM)frostschutz Wrote: [ -> ] (2011-03-28, 06:59 AM)HolyPhoenix Wrote: [ -> ]I am working on a new website for myself and decided to move away from mysql and to postgresql.
Bad decision. MySQL is not the best database but it's the only choice when it comes to MyBB and many other PHP based applications. You will find that MyBB itself has problems with anything but MySQL, not to mention plugins that haven't ever been tested with anything else.
Go back to MySQL unless you have no other choice.
Good decision. If I choose to support other databases then I can help report bugs in scripts like mybb which are suppose to support these databases and make them work(not to mention push for plugin support of all databases). My own scripts that I write I have decided to use postgresql. I would prefer to just push to move over completely. Now, if I remember correctly most plugins use the built in mybb db class, which should run postgresql if that is my selected db. If not, and I have license to edit it to fix it for my own site, I will. If I don't have the rights to do that then I will just program my own plugin to do what I want that does support it. More time consuming, but much more of an achievement than conforming to using mysql.
(2011-03-28, 08:20 AM)StefanT Wrote: [ -> ]This has nothing to do with compatibility, this is just a bug: http://dev.mybb.com/issues/1510
Actually I already reported it in the previous patch (
http://dev.mybb.com/issues/1357 ) so I hope the fix actually makes a next update (although I presume 1.6.2 was just a security hotfix, breaking the forumview on a supposedly supported database doesn't look good).
(2011-03-28, 10:40 PM)SeaEagle1 Wrote: [ -> ] (2011-03-28, 08:20 AM)StefanT Wrote: [ -> ]This has nothing to do with compatibility, this is just a bug: http://dev.mybb.com/issues/1510
Actually I already reported it in the previous patch (http://dev.mybb.com/issues/1357 ) so I hope the fix actually makes a next update (although I presume 1.6.2 was just a security hotfix, breaking the forumview on a supposedly supported database doesn't look good).
I am seeing the same error with MyBB 1.6.3 installed with PostgreSQL 8.3.11. So Bug #1357 should be reopened, in my opinion.
Is there anything I can do to workaround this please?
It will be fixed on next maintenance release.
(2011-05-23, 06:50 PM)StefanT Wrote: [ -> ]It will be fixed on next maintenance release.
Thanks, but is there a fix that I can apply by editing a .php file manually?
I want to use MyBB now, rather than wait for the next release.