comments in load scripts

Поиск
Список
Период
Сортировка
От Aurangzeb M. Agha
Тема comments in load scripts
Дата
Msg-id Pine.LNX.4.44.0208251240270.21613-100000@cinemaspace.berkeley.edu
обсуждение исходный текст
Ответы Re: comments in load scripts  (Oliver Elphick <olly@lfix.co.uk>)
Список 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@bigfoot.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


В списке pgsql-novice по дате отправления:

Предыдущее
От: Andrew McMillan
Дата:
Сообщение: Re: Security Implications
Следующее
От: Oliver Elphick
Дата:
Сообщение: Re: comments in load scripts