Hi, I dont belive this module supports PG. here is the errors upon creating a new book block.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: null value in column "custom" violates not-null constraint in /var/www/sparcs/includes/database.pgsql.inc on line 139.
* user warning: query: INSERT INTO adv_book_block (delta, title) VALUES (1, 'Sparcs User Guide') in /var/www/sparcs/sites/all/modules/advancedbookblocks/advancedbookblocks.module on line 117.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list in /var/www/sparcs/includes/database.pgsql.inc on line 139.
* user warning: query: SELECT DISTINCT b.bid FROM book b, menu_links m WHERE m.mlid = b.mlid ORDER BY m.weight ASC in /var/www/sparcs/sites/all/modules/advancedbookblocks/advancedbookblocks.module on line 444.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list in /var/www/sparcs/includes/database.pgsql.inc on line 139.
* user warning: query: SELECT DISTINCT b.bid FROM book b, menu_links m WHERE m.mlid = b.mlid ORDER BY m.weight ASC in /var/www/sparcs/sites/all/modules/advancedbookblocks/advancedbookblocks.module on line 444.
* warning: Invalid argument supplied for foreach() in /var/www/sparcs/sites/all/modules/advancedbookblocks/advancedbookblocks.module on line 160.
* warning: Invalid argument supplied for foreach() in /var/www/sparcs/sites/all/modules/advancedbookblocks/advancedbookblocks.module on line 284.
Comments
Comment #1
VeeLin commented+1
Comment #2
PixelClever commentedI don't use postgre and I don't have time to set up a server just for one bug. However if you post a patch and the community test it I will apply it. I fixed one part of the error that seemed fairly clear in the upcoming 1.4 release, but I don't know what they mean about the order by issue.
Comment #3
lamigo commentedHere is a small patch to fix query error on 6.x-1.5
Comment #4
PixelClever commentedDoes this patch work for everyone else? Since I don't have time to test postgre I will be depending on your feed back to determine if this is sufficient or if more needs to be done.
Comment #5
lamigo commentedError is trivial, postgres is very "pedant" or "strict" as you wish to call it and don´t let you order by a field that is not on select clause, that's the only content on the patch, adding order clauses to select fields, this is clean for both postgres and mysql.
Comment #6
PixelClever commentedMy only concern was that this patch doesn't address all of the order by clauses in the module. There were several other places where the field in the order by clause wasn't in the select. I have changed the rest that I found on my development installation and committed it to HEAD. If no one finds any problems then I will include it in the next official release.
Comment #7
PixelClever commentedThis should be fixed in the 1.6 release. I applied the patch and made several other changes to queries that seemed to have the same pattern. Let me know if you see this problem still.