Thread: maximum size of psql query file
Hello world, I'm building a program that will convert out current database (foxpro tables with encrypted content) to postgresql. The program will read each .DBF file and create SQL statements in a textfile that I can feed into postgresql with 'dos2unix; pgsql -f statements.sql'. The database is something like 500Mb on disk and testruns have showed that the files containing the SQL statements will be larger than that. I can choose to create a lot of relatively small .SQL files, or create one huge one. Any recommendations? Will 'pgsql -f' choke on a > 500Mb textfile? TIA for any pointers / help. -- Jules Alberts.
Jules, > I'm building a program that will convert out current database (foxpro > tables with encrypted content) to postgresql. The program will read > each .DBF file and create SQL statements in a textfile that I can feed > into postgresql with 'dos2unix; pgsql -f statements.sql'. Have you considered using COPY instead? You can have your Foxpro script dump to tab-delimited text files, and a 500mb COPY load is less crash-prone than 500mb of SQL commands. -- -Josh Berkus Aglio Database Solutions San Francisco
Hi all, I have written a trigger in which i am updating few rows of another table (AFTER insert in MAIN table). Now, i want to know how many rows of another table are updated ??? Is there any variable available like we have SQL%COUNT in Oracle ??? Does Postgres creates any INTERNAL CURSOR like Oracle ?? Any help will be appreciated... Thanx Denis
On Thu, 25 Jul 2002 denis@coralindia.com wrote: > Hi all, > > I have written a trigger in which i am updating few rows of another table > (AFTER insert in MAIN table). So you read the nicely written docs? > Is there any variable available like we have SQL%COUNT in Oracle ??? Does > Postgres creates any INTERNAL CURSOR like Oracle ?? Sure, this is *right* in the spot in the manual about coding triggers (which you already read once). It's something like GET DIAGNOSTICS rc = ROW_COUNT; or such. But verify that by reading the man page. Joshua b. Jore ; http://www.greentechnologist.org
Thanx.... Josh.. and sorry for delay.. I had a bit older document... Will update those now... Denis ----- Original Message ----- From: "Josh Jore" <josh@greentechnologist.org> To: <denis@coralindia.com> Cc: <pgsql-novice@postgresql.org> Sent: Thursday, July 25, 2002 5:24 PM Subject: Re: [NOVICE] Trigger question > On Thu, 25 Jul 2002 denis@coralindia.com wrote: > > > Hi all, > > > > I have written a trigger in which i am updating few rows of another table > > (AFTER insert in MAIN table). > > So you read the nicely written docs? > > > Is there any variable available like we have SQL%COUNT in Oracle ??? Does > > Postgres creates any INTERNAL CURSOR like Oracle ?? > > Sure, this is *right* in the spot in the manual about coding triggers > (which you already read once). It's something like > > GET DIAGNOSTICS rc = ROW_COUNT; > > or such. But verify that by reading the man page. > > Joshua b. Jore ; http://www.greentechnologist.org