Re: huge file to insert into postgres db

From: Date: Tue, 22 Apr 2003 11:11:27 +0000
Subject: Re: huge file to insert into postgres db
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-144806@lists.php.net to get a copy of this message
Mark Douglas wrote:
If I understand correctly, your ASP page generates a PHP file that has 10000 mysql insert statements? Why not have the ASP file generate a delimited .txt file that a php script could read in a while loop... this might save you from crashing. Or do I have things all wrong?
Or, depending on the your database design and if you have command line access to the postgres DB itself you could do either of these: #1 use postgres' copy command to insert a text file (tab delimited I think is the default) directly into a table. #2 or if you are capable of generating all the needed SQL insert statements into a text file use this on the command line: $ psql -c dbName < sqltextfile.txt HTH, Jean-Christian Imbeault

« previous php.general (#144806) next »