The following may be useful for test data or if you need to get data into a table that has a timestamp column included in the primary key requirement.
Create a function that will allow you to specify a random number range (taken from the http://wiki.postgresql.org/wiki/Random_Range):
CREATE OR REPLACE FUNCTION random(numeric, numeric
RETURNS numeric AS $$
SELECT ($1 + [...]