MyBB Community Forums

Full Version: Is PostgreSQL support experimental?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have just installed 1.6 and it seems anywhere I go I have a SQL error.
I'm talking about basic stuff, such as creating an user group :/

I did fix one, and wrote how to fix second bug on redmine, but there are more and more... how much testing was there with PostgreSQL?
I believe not much testing has been done. But would be nice if you could report all those issues to the dev site so it can get fixed in the next maintenance release and you can finally enjoy an error free forum running PostgreSQL Toungue
Expect lots of problems with anything but MySQL. Not only about MyBB, but also plugins that make database queries.
After 3 hours of playing with admin CP I'm up to 7 bugs which prevent normal forum use. I have already patched all 7, but that were quick & dirty fixes - I will be submitting some decent patches next week.
Quick grep on the files revealed at least 60 places that potentially require fixes: remember LIMIT x,y doesn't work in either PostgreSQL or SQLite - use OFFSET x LIMIT y - it works in all 3 supported databases (yes, that works in MySQL).

I am currently working on full text search with PostgreSQL using tseach2 and I am seeing some nice results :-)
(2010-08-20, 05:39 PM)frostschutz Wrote: [ -> ]Expect lots of problems with anything but MySQL. Not only about MyBB, but also plugins that make database queries.
I have tried 5 different plugins and not a single one worked out of the box
I don't think that PgSQL was really meant to be used, and it was experimental.
Might be good if you could help out in finding all the bugs when using a PgSQL database for MyBB.
I've seen PostgreSQL and SQLite use the very same query in multiple places and both don't have SQL extensions MySQL has - odds are that things that don't work for PostgreSQL don't work for SQLite as well.
Argh!
After numerous hours spent struggling with every bloody thing failing with PostgreSQL I am giving up on MyBB. While I am pretty sure is it a wonderful piece of software with MySQL the statement that it supports PostgreSQL is mostly false - sure you can install it on PostgreSQL, you can post some messages and most of the admin CP works, but it's so bugged and full of SQL errors that even if you don't need more advanced features you will encounter a few.

The sad thing is that 95% of the errors I have found are the result of the bad SQL coding practices and disregard for databases other than MySQL:
Is it so hard to write NULL instead of '', is it impossible to write OFFSET x LIMIT y instead of LIMIT x,y? Just this simple change would make most of the MySQL queries work in SQLite and PostgreSQL...
That's why I told you as much in my first reply, not sure why you went and spent hours of frustration regardless...

When I decided on MyBB I did so mainly for its usability, the like of which I haven't found in any other forum software; the users don't care if it's written in PHP or something else, and what kind of database it uses, so if you want MyBB, just install PHP and MySQL to go with it. If you want to use other PHP software too you're unlikely to be able to get around MySQL anyhow.
A possible fix for this would be to handle the requirement of using OFFSET via the db control module. Whenever a query is about to be run, if LIMIT is present & OFFSET is not, then OFFSET is added to the query test. If I knew what other problems he had I could suggest other fixes Smile
(2010-08-22, 10:44 AM)frostschutz Wrote: [ -> ]That's why I told you as much in my first reply, not sure why you went and spent hours of frustration regardless...

When I decided on MyBB I did so mainly for its usability, the like of which I haven't found in any other forum software; the users don't care if it's written in PHP or something else, and what kind of database it uses, so if you want MyBB, just install PHP and MySQL to go with it. If you want to use other PHP software too you're unlikely to be able to get around MySQL anyhow.
I was not dead set on MyBB, I have chosen it because it seemed to be a good forums software AND it had (or I was supposed to have) PostgreSQL support - exactly what I required for a deep integration with an already existing, large psql app.

(2010-08-22, 02:54 PM)Dylan M. Wrote: [ -> ]A possible fix for this would be to handle the requirement of using OFFSET via the db control module. Whenever a query is about to be run, if LIMIT is present & OFFSET is not, then OFFSET is added to the query test. If I knew what other problems he had I could suggest other fixes Smile

LIMIT x OFFSET y syntax is universal - it works fine with PostgreSQL, SQLite and MySQL (since 4.0.x) so there is no need for external handling, unless you are planning MSSQL support.
It's exactly the same with '' vs NULL.
Pages: 1 2