summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2013-08-06 01:12:43 -0400
committerDavid Rothstein <drothstein@gmail.com>2013-08-06 01:12:43 -0400
commit4202d1518bba63cfd8d4ebc03fb7fdafa09159fe (patch)
tree211fb4573a762f8cc6451c4a5945e4e831d4841d
parent81e607406c04078df18776b8898f83b1dfc9e618 (diff)
downloadbrdo-4202d1518bba63cfd8d4ebc03fb7fdafa09159fe.tar.gz
brdo-4202d1518bba63cfd8d4ebc03fb7fdafa09159fe.tar.bz2
Issue #1759144 by rondp, Josh Waihi, jweowu, David_Rothstein | plachance: Fixed taxonomy_update_7005 on pgsql returns error 'column 'td' of relation 'taxonomy_update_7005' does not exist'.
-rw-r--r--CHANGELOG.txt2
-rw-r--r--modules/taxonomy/taxonomy.install8
2 files changed, 10 insertions, 0 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 56a572495..ecd38a35c 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,8 @@
Drupal 7.23, xxxx-xx-xx (development version)
-----------------------
+- Fixed a fatal error on PostgreSQL databases when updating the Taxonomy module
+ from Drupal 6 to Drupal 7.
- The default ordering of CSS files has changed for sites using right-to-left
languages, to consistently place the right-to-left override file immediately
after the CSS it is overriding (API change: https://drupal.org/node/2058463).
diff --git a/modules/taxonomy/taxonomy.install b/modules/taxonomy/taxonomy.install
index c353c9c8c..2d44d3db3 100644
--- a/modules/taxonomy/taxonomy.install
+++ b/modules/taxonomy/taxonomy.install
@@ -682,6 +682,14 @@ function taxonomy_update_7005(&$sandbox) {
$query->orderBy('tn.vid');
$query->orderBy('td.weight');
$query->orderBy('tn.tid');
+
+ // Work around a bug in the PostgreSQL driver that would result in fatal
+ // errors when this subquery is used in the insert query below. See
+ // https://drupal.org/node/2057693.
+ $fields = &$query->getFields();
+ unset($fields['td.weight']);
+ unset($fields['tn.tid']);
+
db_insert('taxonomy_update_7005')
->from($query)
->execute();