From: | Jason Earl <jdearl(at)yahoo(dot)com> |
---|---|
To: | markus jais <mjais(at)web(dot)de>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: how to load a sql-file???? |
Date: | 2001-03-28 18:34:43 |
Message-ID: | 20010328183443.70763.qmail@web10004.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
psql <database_name> -U postgres -f loadfile.sql
Should do what you want. Or if you are already in
psql take a look at the \i command.
Jason
--- markus jais <mjais(at)web(dot)de> wrote:
> hi,
> maybe this is somewhere in the docs but I couldn't
> find
> it.
> I am a beginner to postgresql and do not know much
> till now.
> I have bought a book on SQL and now I want to
> import the sample databases into postgresql
> they are provided as *.sql.
>
> in MySQL I can type something like in Bash on my
> linux box:
>
> $ mysql -u root -p < file.sql
>
> then the file file.sql is read.
>
> can you tell me how to do this with postgresql???
> thanks a lot.
>
> markus
>
>
> --
> Markus Jais
> http://www.mjais.de
> info(at)mjais(dot)de
> The road goes ever on and on - Bilbo Baggins
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the
> unregister command
> (send "unregister YourEmailAddressHere" to
majordomo(at)postgresql(dot)org)
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-03-28 18:46:50 | Re: undefined symbol in create new function |
Previous Message | Joel Dudley | 2001-03-28 18:25:38 | undefined symbol in create new function |