Skip to content

Instantly share code, notes, and snippets.

@rafaelbernard
Created April 19, 2012 18:49
Show Gist options
  • Save rafaelbernard/2422955 to your computer and use it in GitHub Desktop.
Save rafaelbernard/2422955 to your computer and use it in GitHub Desktop.
Generate table of 1000 random rows - PostgreSQL
SELECT i, clock_timestamp() t1, random() r1, random() r2, random() r3, clock_timestamp() + (round(random()*1000)::text || ' days')::interval d1
FROM generate_series(1,1000) i(i);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment