comments in load scripts

From: "Aurangzeb M(dot) Agha" <aagha(at)bigfoot(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: comments in load scripts
Date: 2002-08-25 20:39:13
Message-ID: Pine.LNX.4.44.0208251240270.21613-100000@cinemaspace.berkeley.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I have two questions regarding using load scripts to create and populate
my DB.

I use the following command to create my DB with a script which has a lot
of create statements in it:

%> psql testDB < loadTestDB.sql

Question 1: Is this the best way to create my DB? I know there's a pg_dump
command, but is there some kind of a pgload I should be using instead?

(I got the above command from "9.1.1 Restoring the Dump" from the Admin
guide.

Secondly, my create and populate scripts are very long. When running the
populate script, I get a ton of output with Insert OID statements:

...
INSERT 30094 1
INSERT 30095 1
INSERT 30096 1
INSERT 30097 1
INSERT 30098 1
...

Is there any way I can put comments into my load scripts so that I can get
an indication of the progress the load is making. I'd like to see
something like:

Populating Users Table
INSERT 30094 1
INSERT 30095 1

Populating Role Table
INSERT 30096 1
...

I'd like this functionality for debugging purposes. I've looked through
the archives and the docs and not found a possible solution.

Thx in Advance,
Aurangzeb

--
Aurangzeb M. Agha | Email : aagha(at)bigfoot(dot)com
| Home : +3 010 8959.558
34 Nafsika St. | Direct: +3 010 8995.875
Voula 16673 | Mobile: TBD
Greece | Voice : 415 412 4234 (US Only)
| e-Fax : 978 246.0770
PGP ID: 0x68B3A763 |

"Those who would give up essential liberty to purchase a little
temporary safety deserve neither liberty nor safety."

- Benjamin Franklin

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Oliver Elphick 2002-08-26 09:06:17 Re: comments in load scripts
Previous Message Andrew McMillan 2002-08-24 12:18:24 Re: Security Implications