PostgreSQL
Posted by Dan Langille
Re: PostgreSQL April 11, 2009 10:51PM |
Registered: 23 years ago Posts: 55 |
Re: PostgreSQL April 11, 2009 11:54PM |
Registered: 23 years ago Posts: 55 |
Re: PostgreSQL April 12, 2009 12:14AM |
Registered: 23 years ago Posts: 55 |
Quote
All I did was to reverse the order of the statements, so the update is attempted first, if it fails, attempt the insert.
I ran into the same problem and tried your fix. It didn't work. What did work is adding a check for the number of rows. If you didn't update at least one row, do the insert.
Re: PostgreSQL April 19, 2009 09:27PM |
Registered: 23 years ago Posts: 55 |
Got this trying to move a thread:
Sorry, a Phorum database error occurred.
Please try again later!
Error:
ERROR: syntax error at or near "AS" 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)
Backtrace:
Function phorum_database_error called at
{path to Phorum}/include/db/postgresql/postgresql.php:180
----
Function phorum_db_interact called at
{path to Phorum}/include/db/postgresql.php:5047
----
Function phorum_db_newflag_update_forum called at
{path to Phorum}/include/db/postgresql.php:2121
----
Function phorum_db_move_thread called at
{path to Phorum}/moderation.php:377
----
Sorry, a Phorum database error occurred.
Please try again later!
Error:
ERROR: syntax error at or near "AS" 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)
Backtrace:
Function phorum_database_error called at
{path to Phorum}/include/db/postgresql/postgresql.php:180
----
Function phorum_db_interact called at
{path to Phorum}/include/db/postgresql.php:5047
----
Function phorum_db_newflag_update_forum called at
{path to Phorum}/include/db/postgresql.php:2121
----
Function phorum_db_move_thread called at
{path to Phorum}/moderation.php:377
----
Re: PostgreSQL April 22, 2009 07:09PM |
Registered: 23 years ago Posts: 55 |
Ran into a problem with search today. I'll try to fix it myself. Meanwhile, here's the error page:
Phorum Database Error
Sorry, a Phorum database error occurred.
Please try again later!
Error:
ERROR: invalid input syntax for type boolean: "%half%" (22P02): SELECT * FROM yose5_messages WHERE status= 2 AND forum_id in (1) AND body ilike ('%half%' AND '%dome%') AND datestamp >= 1208905654 ORDER BY datestamp DESC LIMIT 30 OFFSET 0
Backtrace:
Function phorum_database_error called at
{path to Phorum}/include/db/postgresql/postgresql.php:180
----
Function phorum_db_interact called at
{path to Phorum}/include/db/postgresql.php:1767
----
Function phorum_db_search called at
{path to Phorum}/search.php:236
----
Phorum Database Error
Sorry, a Phorum database error occurred.
Please try again later!
Error:
ERROR: invalid input syntax for type boolean: "%half%" (22P02): SELECT * FROM yose5_messages WHERE status= 2 AND forum_id in (1) AND body ilike ('%half%' AND '%dome%') AND datestamp >= 1208905654 ORDER BY datestamp DESC LIMIT 30 OFFSET 0
Backtrace:
Function phorum_database_error called at
{path to Phorum}/include/db/postgresql/postgresql.php:180
----
Function phorum_db_interact called at
{path to Phorum}/include/db/postgresql.php:1767
----
Function phorum_db_search called at
{path to Phorum}/search.php:236
----
Re: PostgreSQL April 24, 2009 12:51AM |
Registered: 23 years ago Posts: 55 |
Quote
Rick
Ran into a problem with search today. I'll try to fix it myself. Meanwhile, here's the error page:
Phorum Database Error
Sorry, a Phorum database error occurred.
Please try again later!
Error:
ERROR: invalid input syntax for type boolean: "%half%" (22P02): SELECT * FROM yose5_messages WHERE status= 2 AND forum_id in (1) AND body ilike ('%half%' AND '%dome%') AND datestamp >= 1208905654 ORDER BY datestamp DESC LIMIT 30 OFFSET 0
Backtrace:
Function phorum_database_error called at
{path to Phorum}/include/db/postgresql/postgresql.php:180
----
Function phorum_db_interact called at
{path to Phorum}/include/db/postgresql.php:1767
----
Function phorum_db_search called at
{path to Phorum}/search.php:236
----
The fix is just a small change to db/postgresql.php.
Change: $match_str = "('%".implode("%' $condition '%", $tokens)."%')";
To: $match_str = "'%".implode("%' $condition body ilike '%", $tokens)."%'";
Re: PostgreSQL January 27, 2010 05:20PM |
Registered: 20 years ago Posts: 21 |
Re: PostgreSQL January 27, 2010 05:44PM |
Admin Registered: 20 years ago Posts: 8,532 |
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).
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: PostgreSQL January 28, 2010 11:47AM |
Registered: 16 years ago Posts: 14 |
Quote
domdorn
hey guys..
whats the current state of the postgresql db-layer?
is it running anywhere stable?
if so, I would suggest to finally try backporting it to the phorum source or create a repo
(e..g on github) to maintain the further development.
IF you have anything new I would love to test it.
I'm very very much interested in a working postgresql layer. I don't have the resources to take the task on wholesale but am willing to work with others on it.
I have a small amount of PHP/phorum experience and a whole lotta SQL/postgresql experience.
Re: PostgreSQL February 15, 2010 06:10PM |
Registered: 23 years ago Posts: 55 |
Sorry, only registered users may post in this forum.