I am using PostgreSQL 7.4.7 (debian stable default)- I have had a few probs, firstly the module wont upgrade cleanly:
Update #2
* Failed: ALTER TABLE {term_access} ADD grant_list TINYINT(1) UNSIGNED DEFAULT '0' NOT NULL
* Failed: UPDATE {term_access} SET grant_list = grant_view
* Failed: ALTER TABLE {term_access_defaults} ADD grant_list TINYINT(1) UNSIGNED DEFAULT '0' NOT NULL
* Failed: UPDATE {term_access_defaults} SET grant_list = grant_view
Having read the postgresql ALTER notes there are a few issues. Firstly, the update seems to have mysql types.
But also:
In the current implementation of ADD COLUMN, default and NOT NULL clauses for the new column are not supported. The new column always comes into being with all values null. You can use the SET DEFAULT form of ALTER TABLE to set the default afterward. (You may also want to update the already existing rows to the new default value, using UPDATE.) If you want to mark the column non-null, use the SET NOT NULL form after you've entered non-null values for the column in all rows.
To get round this i quickly tried running these queries:
ALTER TABLE term_access ADD COLUMN grant_list smallint;
ALTER TABLE term_access ALTER COLUMN grant_list SET DEFAULT (0)::smallint;
UPDATE term_access SET grant_list = grant_view;
ALTER TABLE term_access_defaults ADD COLUMN grant_list smallint;
ALTER TABLE term_access_defaults ALTER column grant_list SET default (0)::smallint NOT NULL;
UPDATE term_access_defaults SET grant_list = grant_view;
Which seemed to work for postgres.
However, there still seems to be problems with the use of bit_or(), which from what I can tell does not exist for with postgres 7.4.
* warning: pg_query(): Query failed: ERROR: function bit_or(smallint) does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts. in /var/www/drupal-4.7.0-rc3/includes/database.pgsql.inc on line 84.
* user warning: query: SELECT t.tid, d.vid, BIT_OR(t.grant_list) AS grant_list FROM term_access t INNER JOIN term_data d ON t.tid=d.tid WHERE t.rid in ('1') AND grant_list = 1 group by t.tid, d.vid in /var/www/drupal-4.7.0-rc3/includes/database.pgsql.inc on line 103.
* warning: pg_query(): Query failed: ERROR: invalid input syntax for integer: "" in /var/www/drupal-4.7.0-rc3/includes/database.pgsql.inc on line 84.
* user warning: query: SELECT t.* FROM term_node r INNER JOIN term_data t ON r.tid = t.tid INNER JOIN vocabulary v ON t.vid = v.vid WHERE (t.tid IN ('')) AND r.nid = 350 ORDER BY v.weight, t.weight, t.name in /var/www/drupal-4.7.0-rc3/includes/database.pgsql.inc on line 103.
* warning: pg_query(): Query failed: ERROR: invalid input syntax for integer: "" in /var/www/drupal-4.7.0-rc3/includes/database.pgsql.inc on line 84.
* user warning: query: SELECT t.* FROM term_node r INNER JOIN term_data t ON r.tid = t.tid INNER JOIN vocabulary v ON t.vid = v.vid WHERE (t.tid IN ('')) AND r.nid = 230 ORDER BY v.weight, t.weight, t.name in /var/www/drupal-4.7.0-rc3/includes/database.pgsql.inc on line 103.
* warning: pg_query(): Query failed: ERROR: invalid input syntax for integer: "" in /var/www/drupal-4.7.0-rc3/includes/database.pgsql.inc on line 84.
* user warning: query: SELECT t.* FROM term_node r INNER JOIN term_data t ON r.tid = t.tid INNER JOIN vocabulary v ON t.vid = v.vid WHERE (t.tid IN ('')) AND r.nid = 163 ORDER BY v.weight, t.weight, t.name in /var/www/drupal-4.7.0-rc3/includes/database.pgsql.inc on line 103.
Apologies as i've done this all rather quickly and without full research, but this looks like the 4.7 version taxonmy_access is incompatible with postgres 7.4?
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | taxonomy_access.install.diff.txt | 2.03 KB | poltawski |
Comments
Comment #1
keve commentedSorry, i have no ability to test Postgresql. :(
Thanks for coment, and the script, i will change hook_update in .install file.
Concerning Bit_or: Please check if script below in .install file applied well.
Can you apply this pgsql script manually? Did it solve your problem?
If this did not apply automatically in .install file, we have to check the install script. Can you help in this, to check it again, why did not this happen?
Comment #2
poltawski commentedComment #3
poltawski commentedI've made a patch
is a mysql specific thing, which I can't think of a good way to recreate in postgres, so i've kinda ignored it..
Taxonmy_access now seems to update cleanly, however with my drupal upgrade it only gets into the update.php listing if I first visit the admin/modules listing, then upgrade (but this could just be my broken install..)
Comment #4
keve commentedCommited to HEAD w/ some more corrections.
Comment #5
(not verified) commented