Closed (fixed)
Project:
Views random seed
Version:
6.x-1.0
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2009 at 00:45 UTC
Updated:
2 Oct 2009 at 21:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
swentel commentedHey Juanzo, completely right on both cases, except that it's not really necessary for cron to run - of course, if you are using page caching, it would be necessary to clear that cache for anonymous users and this module doesn't take care of that - and never will too.
Comment #2
artatac commentedI am getting the following errorr on rand seed, although random global is ok
Comment #3
swentel commentedHmm, postgres seems to have a problem with integer then, I'll have to setup a server on my local machine first to start debugging. I'll report back later
Comment #4
develcuy commentedPostgresql reference manual says:
random(): random value between 0.0 and 1.0
setseed(dp): set seed for subsequent random() calls (value between 0 and 1.0)
http://www.postgresql.org/docs/8.3/interactive/functions-math.html
Conclusion 1: random(dp) is not provided by postgresql. Just random which is completely different
Testing setseed(dp) and then random():
=> select setseed(0.1); select random();
setseed
---------
(1 row)
random
-------------------
0.727818949148059 <<== This value is constant
(1 row)
Conclusion 2: Is necessary to add a custom function random(dp)
Blessings!
Comment #5
swentel commented@develCuy
So basically, if I'd change
to
and add db_query('select setseed('. $seed .')') things would work ?
Comment #6
swentel commented@artatac and develCuy
can you guys try out the attached patch ? Completely untested here, I hope I can setup a postgres server next week too, but feedback from others is welcome :)
Comment #7
swentel commentedOk got a postgres server running myself and that didn't work, looking for other solutions.
Comment #8
artatac commentedhappy to test the revised version when you have it but could you also attached the zipped patched module as I have tried in vain to get a handle on patching with no success!
Comment #9
swentel commentedChanging title, to be honest, my knowledge of postgres isn't that good, so for now, I'm going to mark this as postponed and try to talk with people at the next drupalcon in Paris and see if I can learn something from them :)
Comment #10
develcuy commentedNice patch, sorry for not being subscribed ... will check and went back
Comment #11
swentel commentedOk, it should work now. I committed a fix on the drupal 6 branch, so the next built will have support for PostgreSQL finally :) I'm going to test it myself for a few days, also see if I didn't break MySQL support of course :)
Comment #12
swentel commentedActually, after some testing on both MySQL and PostgreSQL, all went fine and a new release is out!