A quick and dirty solution would be something like (untested):
while read line; do
psql dbname -c "update table ... use 'line' as your id and data"
sleep 5
done < filename
where "filename" is the file with the ids in it. "dbname" is the name of your DB (of
course!)
I am not su
stmaster
> once at the top of the script, and then re-use it with a transaction block
> for each group of 10/20. Then shut it down at the end. This way I do not
> suffer any additional protocol overhead each time I want to use it.
>
> - brian
>
>
> On Thu, 18 Oct 2
s == 10)
> {
> do_update() ;
> sleep 5 ;
> @updates = () ; # Redundant
> }
> }
> do_update if (@updates) ;
>
> sub do_update
> {
> open PSQL, "| psql dbname" ;
> print PSQL "begin transaction ;\n"