<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>PostgreSQL</title>
        <description>With reference to previous PostgreSQL work: http://www.phorum.org/phorum5/read.php?14,52795

I&#039;m ready to start in on PostgreSQL with 5.2.  The 5.1 stuff never made it to production.

There are several people who want PostgreSQL and others who would use Phorum if PostgreSQL was an option.

I&#039;ll do the coding work, but I need support from others in the form of:

- code reviewers
- testers
- other coders

I don&#039;t have a schedule, but it may appear at any time. I know I have a flight next weekend, during which I can work on this.  Perhaps I&#039;ll get an opportunity sooner.</description>
        <link>https://www.phorum.org/support/read.php?14,126510,126510#msg-126510</link>
        <lastBuildDate>Sun, 13 Sep 2026 16:19:39 -0500</lastBuildDate>
        <generator>Phorum 6.0.4</generator>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,143178#msg-143178</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,143178#msg-143178</link>
            <description><![CDATA[ This is what I have so far. I&#039;ve been using it for almost a year for two forums.]]></description>
            <dc:creator>Rick</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Mon, 15 Feb 2010 17:10:10 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,142916#msg-142916</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,142916#msg-142916</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>domdorn</strong><br />
hey guys..<br />
<br />
whats the current state of the postgresql db-layer? <br />
<br />
is it running anywhere stable? <br />
if so, I would suggest to finally try backporting it to the phorum source or create a repo <br />
(e..g on github) to maintain the further development.</div></blockquote>
<br />
IF you have anything new I would love to test it.<br />
<br />
I&#039;m very very much interested in a working postgresql layer.  I don&#039;t have the resources to take the task on wholesale but am willing to work with others on it.<br />
<br />
I have a small amount of PHP/phorum experience and a whole lotta SQL/postgresql experience.]]></description>
            <dc:creator>chas_martel</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Thu, 28 Jan 2010 10:47:52 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,142898#msg-142898</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,142898#msg-142898</link>
            <description><![CDATA[ We have a repository of our own, so no need to do it on github. If there are developers that wish to maintain the PostgreSQL port of the database layer, then we are happy to provide access to our repository to do so. However, up to now, the PostgreSQL development activity has been rather binary (either on or off).]]></description>
            <dc:creator>Maurice Makaay</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Wed, 27 Jan 2010 16:44:33 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,142897#msg-142897</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,142897#msg-142897</link>
            <description><![CDATA[ hey guys..<br />
<br />
whats the current state of the postgresql db-layer? <br />
<br />
is it running anywhere stable? <br />
if so, I would suggest to finally try backporting it to the phorum source or create a repo <br />
(e..g on github) to maintain the further development.]]></description>
            <dc:creator>domdorn</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Wed, 27 Jan 2010 16:20:03 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,137876#msg-137876</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,137876#msg-137876</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>Rick</strong><br />
Ran into a problem with search today. I&#039;ll try to fix it myself. Meanwhile, here&#039;s the error page:<br />
<br />
<span style="color:#660066">Phorum Database Error<br />
Sorry, a Phorum database error occurred.<br />
Please try again later!<br />
Error:<br />
ERROR: invalid input syntax for type boolean: &quot;%half%&quot; (22P02): SELECT * FROM yose5_messages WHERE status= 2 AND forum_id in (1) AND body ilike (&#039;%half%&#039; AND &#039;%dome%&#039;) AND datestamp &gt;= 1208905654 ORDER BY datestamp DESC LIMIT 30 OFFSET 0<br />
Backtrace:<br />
Function phorum_database_error called at<br />
{path to Phorum}/include/db/postgresql/postgresql.php:180<br />
----<br />
Function phorum_db_interact called at<br />
{path to Phorum}/include/db/postgresql.php:1767<br />
----<br />
Function phorum_db_search called at<br />
{path to Phorum}/search.php:236<br />
----</span></div></blockquote>
<br />
The fix is just a small change to db/postgresql.php.<br />
<br />
Change: $match_str = &quot;(&#039;%&quot;.implode(&quot;%&#039; $condition &#039;%&quot;, $tokens).&quot;%&#039;)&quot;;<br />
<br />
To: $match_str = &quot;&#039;%&quot;.implode(&quot;%&#039; $condition body ilike &#039;%&quot;, $tokens).&quot;%&#039;&quot;;]]></description>
            <dc:creator>Rick</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Thu, 23 Apr 2009 23:51:55 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,137860#msg-137860</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,137860#msg-137860</link>
            <description><![CDATA[ Ran into a problem with search today. I&#039;ll try to fix it myself. Meanwhile, here&#039;s the error page:<br />
<br />
<span style="color:#660066">Phorum Database Error<br />
Sorry, a Phorum database error occurred.<br />
Please try again later!<br />
Error:<br />
ERROR: invalid input syntax for type boolean: &quot;%half%&quot; (22P02): SELECT * FROM yose5_messages WHERE status= 2 AND forum_id in (1) AND body ilike (&#039;%half%&#039; AND &#039;%dome%&#039;) AND datestamp &gt;= 1208905654 ORDER BY datestamp DESC LIMIT 30 OFFSET 0<br />
Backtrace:<br />
Function phorum_database_error called at<br />
{path to Phorum}/include/db/postgresql/postgresql.php:180<br />
----<br />
Function phorum_db_interact called at<br />
{path to Phorum}/include/db/postgresql.php:1767<br />
----<br />
Function phorum_db_search called at<br />
{path to Phorum}/search.php:236<br />
----</span>]]></description>
            <dc:creator>Rick</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Wed, 22 Apr 2009 18:09:39 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,137788#msg-137788</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,137788#msg-137788</link>
            <description><![CDATA[ Got this trying to move a thread:<br />
<br />
Sorry, a Phorum database error occurred.<br />
Please try again later!<br />
Error:<br />
ERROR: syntax error at or near &quot;AS&quot; at character 34 (42601): UPDATE IGNORE dchs_user_newflags AS flags, dchs_messages AS msg SET flags.forum_id = msg.forum_id WHERE flags.message_id = msg.message_id AND flags.message_id IN (17277)<br />
Backtrace:<br />
Function phorum_database_error called at<br />
{path to Phorum}/include/db/postgresql/postgresql.php:180<br />
----<br />
Function phorum_db_interact called at<br />
{path to Phorum}/include/db/postgresql.php:5047<br />
----<br />
Function phorum_db_newflag_update_forum called at<br />
{path to Phorum}/include/db/postgresql.php:2121<br />
----<br />
Function phorum_db_move_thread called at<br />
{path to Phorum}/moderation.php:377<br />
----]]></description>
            <dc:creator>Rick</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Sun, 19 Apr 2009 20:27:27 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,137592#msg-137592</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,137592#msg-137592</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong></strong><br />All I did was to reverse the order of the statements, so the update is attempted first, if it fails, attempt the insert. </div></blockquote>
<br />
I ran into the same problem and tried your fix. It didn&#039;t work. What did work is adding a check for the number of rows. If you didn&#039;t update at least one row, do the insert.]]></description>
            <dc:creator>Rick</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Sat, 11 Apr 2009 23:14:33 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,137591#msg-137591</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,137591#msg-137591</link>
            <description><![CDATA[ A small correction to include/db/postgresql.php:<br />
<br />
@@ -1579,7 +1592,7 @@<br />
                            $forum_where&quot;;<br />
         $orderby =&quot;<br />
                   ORDER BY message_id DESC<br />
-                     LIMIT $length OFFSET start&quot;;<br />
+                     LIMIT $length OFFSET $start&quot;;<br />
         $sql  = &quot;SELECT * &quot; . $sqlbody . $orderby;<br />
         $rows = phorum_db_interact(DB_RETURN_ASSOCS, $sql);]]></description>
            <dc:creator>Rick</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Sat, 11 Apr 2009 22:54:39 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,137590#msg-137590</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,137590#msg-137590</link>
            <description><![CDATA[ Finally have the conversion working. The big problem was the SQL call to lastval(). It&#039;s not a valid thing to be doing when the insert sets the field that would normally get its value from nextval().]]></description>
            <dc:creator>Rick</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Sat, 11 Apr 2009 21:51:47 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,137589#msg-137589</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,137589#msg-137589</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong></strong><br />You might have to take the default upgrade script from the &quot;scripts&quot; directory in the Phorum distro and modify that for PostgreSQL.</div></blockquote>
<br />
I&#039;m working my way through it now. Lots of fun ;)]]></description>
            <dc:creator>Rick</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Sat, 11 Apr 2009 19:25:18 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,137588#msg-137588</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,137588#msg-137588</link>
            <description><![CDATA[ PostgreSQL does not spell auto incremental functionality different. It uses sequences for handling the auto increments. There is a simple keyword that one can use at table create time (&quot;serial&quot; IIRC), but under the hood this creates a sequence and set the field&#039;s default value to nextval(sequence). So yes, you can accomplish the same kind of thing, but it&#039;s more than a different spelling alone.<br />
<br />
When you are running Phorum 3 using PostgreSQL, then I&#039;m not sure if there is already a conversion script available. You might have to take the default upgrade script from the &quot;scripts&quot; directory in the Phorum distro and modify that for PostgreSQL. Possibly, somebody has such a script lying around already or can tell us to what extend the existing conversion script can be used. I have no experience with that.]]></description>
            <dc:creator>Maurice Makaay</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Sat, 11 Apr 2009 18:36:21 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,137587#msg-137587</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,137587#msg-137587</link>
            <description><![CDATA[ I need to convert a phorum 3 site. Am I correct in assuming I&#039;ll have to write the conversion software myself?]]></description>
            <dc:creator>Rick</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Sat, 11 Apr 2009 16:57:23 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,137586#msg-137586</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,137586#msg-137586</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong></strong><br />postgres doesn&#039;t have things like auto_increment</div></blockquote>
<br />
It does have that feature; it&#039;s just not spelled the same. <br />
<br />
<blockquote class="bbcode"><div><small>Quote<br /></small><strong></strong><br />NOW() functions that mysql also offers are lacking[/quoet]<br />
<br />
Such as?</div></blockquote>]]></description>
            <dc:creator>Rick</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Sat, 11 Apr 2009 16:29:09 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,136412#msg-136412</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,136412#msg-136412</link>
            <description><![CDATA[ Anyone?]]></description>
            <dc:creator>chas_martel</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Thu, 05 Feb 2009 11:37:49 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,136349#msg-136349</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,136349#msg-136349</link>
            <description><![CDATA[ I think the problem is that postgres doesn&#039;t have things like auto_increment and some of the NOW() functions that mysql also offers are lacking (or aren&#039;t seen as important by the psql developers). Also for interger fields you must actually put &#039;0&#039; and not &#039;&#039; like in mysql where it thinks (hey &#039;&#039;, that&#039;s 0).<br />
<br />
After porting over my database and making lots of changes to sql all over the place i kinda moved on, and instead focused efforts at caching query results for the speed boost.]]></description>
            <dc:creator>DarkKlown</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Mon, 02 Feb 2009 23:02:06 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,136348#msg-136348</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,136348#msg-136348</link>
            <description><![CDATA[ OK, here is a follow up.  I have attempted to use Postgresql with Phroum and find <br />
that upon trying to create the admin user -right after the tables are made- I get an error<br />
that seems to be saying that fields which are defined as int&#039;s can&#039;t be set because they<br />
have paren&#039;s around the values.  Below is the error displayed in my browser.<br />
<br />
I am willing to work thru this and/or other Postgresql issues and contribute fixes if warranted.  I  only ask for a little guidence.  <br />
<br />
Also, I am working from head as of a few days ago.  I have also tried the two other postgresql.php files<br />
from Dan&#039;s site, both exhibit the same behaviour.<br />
<br />
Thanks, <br />
<br />
Here is the warning<br />
======================================================================<br />
<br />
Phorum Database Error<br />
Sorry, a Phorum database error occurred.<br />
Please try again later!<br />
Error:<br />
ERROR: invalid input syntax for integer: &quot;&quot; (22P02): UPDATE ph__users SET username = &#039;&#039;, password = &#039;&#039;, email = &#039;&#039;, active = &#039;&#039;, admin = &#039;&#039;, date_added = &#039;&#039;, date_last_active = &#039;&#039;, password_temp = &#039;&#039;, display_name = &#039;&#039; WHERE user_id = 3<br />
Backtrace:<br />
Function phorum_database_error called at<br />
{path to Phorum}/include/db/postgresql/postgresql.php:168<br />
----<br />
Function phorum_db_interact called at<br />
{path to Phorum}/include/db/postgresql.php:3623<br />
----<br />
Function phorum_db_user_save called at<br />
{path to Phorum}/include/db/postgresql.php:3527<br />
----<br />
Function phorum_db_user_add called at<br />
{path to Phorum}/include/api/user.php:721<br />
----<br />
Function phorum_api_user_save called at<br />
{path to Phorum}/include/admin/install.php:191<br />
----<br />
Function require_once called at<br />
{path to Phorum}/admin.php:101<br />
----]]></description>
            <dc:creator>chas_martel</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Mon, 02 Feb 2009 22:18:50 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,135536#msg-135536</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,135536#msg-135536</link>
            <description><![CDATA[ Well, don&#039;t worry.  As soon as Drizzle is ready, Phorum will have support for it.  I am on the mailing list and am sort of a fly on the wall voice for the power users.]]></description>
            <dc:creator>Brian Moon</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Fri, 19 Dec 2008 23:47:56 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,135524#msg-135524</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,135524#msg-135524</link>
            <description><![CDATA[ adodb is indeed slow but adodb-lite is alot better, also with the php-adodb extension things speed up alot more. I understand your reasoning however, the main reason i choose phorum over other message systems was purely based on how quick it is it. <br />
<br />
I&#039;m just starting to get uncomfortable with all the people movements happening at mysql and the rumor they are going to be spending less devel time on the free version of mysql to focus on enterprise. Personally i don&#039;t have $3,000 a year to spend on a database (tho the MySQL Query Analyzer in enterprise monitor does look sexy), also table size is starting to become a issue with performance and the stats show postgres to be able to cope so it would be nice to move that way depending on how much work would be required (i&#039;m rather lazy).<br />
<br />
I&#039;ve not really had a play with PDO so i&#039;ll have a go with that.]]></description>
            <dc:creator>DarkKlown</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Fri, 19 Dec 2008 16:38:17 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,135521#msg-135521</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,135521#msg-135521</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>DarkKlown</strong><br />
Rather than trying to back phorum into just postgresql why not back it into something like adodb/adodblite and let users choose what database they wish to run. As long as the sql is kept strict it should then work in just about anything and then you don&#039;t need a dedicated &#039;postgresql&#039; programmer/supporter you just support the adodb layer? (I&#039;m currently looking at backing phorum into either oracle or postgresql and will probably do that via adodb)</div></blockquote>
<br />
Because we want it to work.  Because we want it to work faster than a snail in the snow.  Because we want to use SQL that is not super lame-o.<br />
<br />
&quot;Standard&quot; SQL is a myth.  Even if you use adodb, the SQL you write will either be crippled or will not work on other RDBS.  Phorum 3 had LOTS of &quot;if(mysql)&quot; and &quot;if(postgresql)&quot; in it.  It was quite nasty.<br />
<br />
If you are bound and determined to use something other than native functions, please, oh please, use PDO.  PDO will not kill your performance like adodb will.  Every line of code you put between your call and mysql_query, pg_query or whatever makes things slower.  <br />
<br />
See:<br />
<ul><li> [<a href="http://www.phorum.org/phorum5/read.php?14,14384,14589#msg-14589" target="_blank" >www.phorum.org</a>] </li><li> [<a href="http://www.phorum.org/phorum5/read.php?14,8973,9072#msg-9072" target="_blank" >www.phorum.org</a>] </li></ul>
<br />
While I am at it, <a href="http://krow.livejournal.com/599921.html" target="_blank"  rel="nofollow">prepared statements</a> suck too.  Just so we get that in there.<br />
<br />
Ok, my rant is over now.  I feel better.]]></description>
            <dc:creator>Brian Moon</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Fri, 19 Dec 2008 13:49:25 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,135515#msg-135515</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,135515#msg-135515</link>
            <description><![CDATA[ Rather than trying to back phorum into just postgresql why not back it into something like adodb/adodblite and let users choose what database they wish to run. As long as the sql is kept strict it should then work in just about anything and then you don&#039;t need a dedicated &#039;postgresql&#039; programmer/supporter you just support the adodb layer? (I&#039;m currently looking at backing phorum into either oracle or postgresql and will probably do that via adodb)]]></description>
            <dc:creator>DarkKlown</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Thu, 18 Dec 2008 20:23:59 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,135195#msg-135195</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,135195#msg-135195</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>DJ Maze</strong><br />
<pre class="bbcode">SET SESSION sql_mode = &#039;TRADITIONAL,ONLY_FULL_GROUP_BY,NO_AUTO_VALUE_ON_ZERO,PIPES_AS_CONCAT&#039;</pre></div></blockquote>
<br />
Or set sql_strict_mode to 1 in the config file.]]></description>
            <dc:creator>Brian Moon</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Mon, 01 Dec 2008 11:14:13 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,135157#msg-135157</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,135157#msg-135157</link>
            <description><![CDATA[ There&#039;s a trick you can use while developing in MySQL and do keep any ISO database into account.<br />
<pre class="bbcode">SET SESSION sql_mode = &#039;TRADITIONAL,ONLY_FULL_GROUP_BY,NO_AUTO_VALUE_ON_ZERO,PIPES_AS_CONCAT&#039;</pre>
It makes MySQL behave almost like all other databases that run conform ANIS/ISO SQL Standards.<br />
<br />
Will setup a testbed here]]></description>
            <dc:creator>DJ Maze</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Sun, 30 Nov 2008 06:23:21 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,133424#msg-133424</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,133424#msg-133424</link>
            <description><![CDATA[ Normally, an error makes the system stop, since errors should never occur. But in the core of the database layer, a system is used to let the core function (phorum_db_interact()) ignore certain errors. This way, the main db layer code can tell the interact function to ignore duplicate key errors (which would be needed for doing the settings updates or inserts like they are implemented now).<br />
<br />
My guess is that the functionality for ignoring duplicate key errors is not implemented correctly (maybe it&#039;s using an incorrect error code to check against for this case). The file in which this is implemented, would be include/db/postgresql/postgresql.php.<br />
<br />
Reversing the order might work, but it is incorrect. Two concurrent Phorum processes might run into a race condition:<br />
<br />
<pre class="bbcode">
 process 1           process 2

 TRY UPDATE
     |
     |               TRY UPDATE
     v                    |
UPDATE FAILS              |
     |                    v
     |              UPDATE FAILS
     v                    |
 TRY INSERT               |
     |                    v
     |                TRY INSERT
     v                    |
 INSERT OK - - - - - - - &gt;| duplicate key error
                          v
                     INSERT FAILS</pre>
<br />
When doing it the other way around, it is a safe operation:<br />
<br />
<pre class="bbcode">
 process 1           process 2

 TRY INSERT
     |
     |               TRY INSERT
     v                    |
  INSERT OK - - - - - - -&gt;| duplicate key error
                          v
                    INSERT FAILS
                          |
                          |
                          v
                      TRY UPDATE
                          |
                          |
                          v
                      UPDATE OK
</pre>]]></description>
            <dc:creator>Maurice Makaay</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Thu, 25 Sep 2008 16:37:44 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,133422#msg-133422</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,133422#msg-133422</link>
            <description><![CDATA[ I too just went through the pain of getting postgresql to work with Phorum.  Using the above I was able to get it working.  Like MythMonk mentioned things seemed to be working but the admin section settings weren&#039;t saving.  What I found was that Dan&#039;s postgresql.php file has an error in: phorum_db_update_settings() function (include/db/postgresql.php is the file).  The code attempts an insert initially and if an error is detected, it then attempts an update.  I found that once the settings exist, the insert throws and error, but it doesn&#039;t make it back to phorum_db_update_settings() so it merrily completes (without calling the update).  All I did was to reverse the order of the statements, so the update is attempted first, if it fails, attempt the insert.  This seems to be working.  I haven&#039;t had time to figure out why the error didn&#039;t make it to the caller.<br />
<br />
Mike]]></description>
            <dc:creator>nefarious</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Thu, 25 Sep 2008 16:27:45 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,133139#msg-133139</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,133139#msg-133139</link>
            <description><![CDATA[ Yeah, all you have to do is unpack the the archive from Dan&#039;s site into your Phorum install, and create your config.php appropriately.<br />
<br />
One thing I ran across while setting up a production site with this today, was that some of the admin stuff is broken - ie, everything under the &quot;Global Settings&quot; header on the admin page won&#039;t save. I&#039;m working on this issue right now. If I get it working satisfactorily, I&#039;ll post updates.]]></description>
            <dc:creator>MythMonk</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Sat, 13 Sep 2008 21:09:24 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,133001#msg-133001</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,133001#msg-133001</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>MythMonk</strong><br />
Other than that, so far it&#039;s working with Phorum 5.2.8.<br />
</div></blockquote>
<br />
Can I ask a &quot;hopefully&quot; simple question?  Do you just get the postgresql specific files from <br />
head and place them into the appropriate directories of a 5.2.8 install?]]></description>
            <dc:creator>chas_martel</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Wed, 03 Sep 2008 10:14:51 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,132552#msg-132552</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,132552#msg-132552</link>
            <description><![CDATA[ Like Maurice said, someone has to step up.<br />
<br />
I did some work quite some time ago, but I don&#039;t have the time to keep it up to date.]]></description>
            <dc:creator>Dan Langille</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Sun, 10 Aug 2008 16:23:17 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,132531#msg-132531</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,132531#msg-132531</link>
            <description><![CDATA[ If a postgresql/php developer stands up and can provide code and full time support, then I see no reason why it could not be a part of the core Phorum releases. Right now it is based on drive-by support, so there is nobody working on it full time.<br />
<br />
If one of the developers would switch to postgresql, then this would change things of course, but right now we all are using MySQL 5. The most likely dev to switch to PostgreSQL would be me, since I do a lot of my corporate database development in PostgreSQL. However, up to now I haven&#039;t seen a real need for PostgreSQL on my live Phorum installs.]]></description>
            <dc:creator>Maurice Makaay</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Sun, 10 Aug 2008 07:36:16 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?14,126510,132525#msg-132525</guid>
            <title>Re: PostgreSQL</title>
            <link>https://www.phorum.org/support/read.php?14,126510,132525#msg-132525</link>
            <description><![CDATA[ Hello,<br />
<br />
I have a question about postgresql support.  I notice in this thread there is<br />
a comment that postgresql works in 5.2.8, there is also a note about a bug<br />
fix related to the port that the DB might use. BUT, I look into SVN trunk<br />
and see the lastest version is 7 months old.  What is up with that?<br />
Where is the lates postgresql stuff?<br />
<br />
Also, will postgresql support ever be official?  That is will it ever be<br />
in a mainline release?<br />
<br />
Thanks to the community for all the hard work.  I&#039;ve spent the last month<br />
really learning about phorum and look forward to switching from phpBB.]]></description>
            <dc:creator>chas_martel</dc:creator>
            <category>Phorum Development</category>
            <pubDate>Sat, 09 Aug 2008 21:52:40 -0500</pubDate>
        </item>
    </channel>
</rss>
