diff options
author | Andreas Fischer <bantu@phpbb.com> | 2009-08-05 13:05:55 +0000 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2009-08-05 13:05:55 +0000 |
commit | 4e117116749ad47c1cfcc24cd2cb24c7271aad1c (patch) | |
tree | d71cbab28be540b08f1750308520466cd40a1def /phpBB/includes/acp | |
parent | f3a2c096e7f502e877ada6924d1fedffde59d431 (diff) | |
download | forums-4e117116749ad47c1cfcc24cd2cb24c7271aad1c.tar forums-4e117116749ad47c1cfcc24cd2cb24c7271aad1c.tar.gz forums-4e117116749ad47c1cfcc24cd2cb24c7271aad1c.tar.bz2 forums-4e117116749ad47c1cfcc24cd2cb24c7271aad1c.tar.xz forums-4e117116749ad47c1cfcc24cd2cb24c7271aad1c.zip |
Fix Bug #48955 - Correctly extract column default value when exporting PostgreSQL tables.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9928 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r-- | phpBB/includes/acp/acp_database.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php index bf02a58dce..b25518e1c4 100644 --- a/phpBB/includes/acp/acp_database.php +++ b/phpBB/includes/acp/acp_database.php @@ -1157,16 +1157,17 @@ class postgres_extractor extends base_extractor AND (c.oid = d.adrelid) AND d.adnum = " . $row['attnum']; $def_res = $db->sql_query($sql_get_default); + $def_row = $db->sql_fetchrow($def_res); + $db->sql_freeresult($def_res); - if (!$def_res) + if (empty($def_row)) { unset($row['rowdefault']); } else { - $row['rowdefault'] = $db->sql_fetchfield('rowdefault', false, $def_res); + $row['rowdefault'] = $def_row['rowdefault']; } - $db->sql_freeresult($def_res); if ($row['type'] == 'bpchar') { |