From 827ecf9f30b73943e4736043c33578f2b3acdecf Mon Sep 17 00:00:00 2001 From: David M Date: Sat, 16 Jun 2007 14:18:27 +0000 Subject: #11927 git-svn-id: file:///svn/phpbb/trunk@7769 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/convertors/functions_phpbb20.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'phpBB/install/convertors/functions_phpbb20.php') diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index 5c7bf2f903..ec282c8f46 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -92,8 +92,6 @@ function phpbb_insert_forums() $db->sql_query('SET IDENTITY_INSERT ' . FORUMS_TABLE . ' ON'); break; } - - $cats_added = array(); while ($row = $src_db->sql_fetchrow($result)) @@ -281,6 +279,10 @@ function phpbb_insert_forums() switch ($db->sql_layer) { + case 'postgres': + $db->sql_query("SELECT SETVAL('" . FORUMS_TABLE . "_seq',(select case when max(forum_id)>0 then max(forum_id)+1 else 1 end from " . FORUMS_TABLE . '));'); + break; + case 'mssql': case 'mssql_odbc': $db->sql_query('SET IDENTITY_INSERT ' . FORUMS_TABLE . ' OFF'); -- cgit v1.2.1