well not the best solution (especially it does generate only numbers, but cat be easily modified to get strings and it is written for php and can use COPY instead of INSERT, ... but ;-)))
________
pg_query($connection, 'begin');
for ($cnt = 0; $cnt < 100000; ++$cnt) {
pg_query($connection, "INSERT INTO dest_table (field1, field2, field3) VALUES ('".rand(1, 1000)."', '".random(1, 1000)."', '".rand(1, 1000)."')"
}
pg_query($connection, 'commit');
_______
this will generate fields with numbers from 1 to 1000 if text fields are needed you can make an array $letters with the letters from A to z and do $letters[rand(0, 51)]
or something like that if you need more meaningfull data ... write now I can't thing of a way
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.