|
From: Paul S. O. <ps...@us...> - 2002-02-11 12:46:21
|
Update of /cvsroot/phpbb/phpBB2/db
In directory usw-pr-cvs1:/tmp/cvs-serv31009/db
Modified Files:
postgres7.php
Log Message:
Fix bugs #515461 and #515460, limit and nextid issues.
Index: postgres7.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/db/postgres7.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** postgres7.php 28 Jan 2002 17:24:45 -0000 1.17
--- postgres7.php 11 Feb 2002 12:46:18 -0000 1.18
***************
*** 124,128 ****
$this->num_queries++;
! $query = preg_replace("/LIMIT ([0-9]+),([ 0-9]+)/", "LIMIT \\2, \\1", $query);
if( $transaction == BEGIN_TRANSACTION )
--- 124,128 ----
$this->num_queries++;
! $query = preg_replace("/LIMIT ([0-9]+),([ 0-9]+)/", "LIMIT \\2 OFFSET \\1", $query);
if( $transaction == BEGIN_TRANSACTION )
***************
*** 343,348 ****
if( preg_match("/^INSERT[\t\n ]+INTO[\t\n ]+([a-z0-9\_\-]+)/is", $this->last_query_text[$query_id], $tablename) )
{
! $query = "SELECT last_value
! FROM " . $tablename[1] . "_id_seq";
$temp_q_id = @pg_exec($this->db_connect_id, $query);
if( !$temp_q_id )
--- 343,347 ----
if( preg_match("/^INSERT[\t\n ]+INTO[\t\n ]+([a-z0-9\_\-]+)/is", $this->last_query_text[$query_id], $tablename) )
{
! $query = "SELECT currval('" . $tablename[1] . "_id_seq') AS last_value";
$temp_q_id = @pg_exec($this->db_connect_id, $query);
if( !$temp_q_id )
|