Re: how to load a sql-file???? - Mailing list pgsql-general

From Marek Pętlicki
Subject Re: how to load a sql-file????
Date
Msg-id 20010329001731.B11788@marek.almaran.home
Whole thread Raw
In response to how to load a sql-file????  (markus jais <mjais@web.de>)
Responses Re: how to load a sql-file????  (will trillich <will@serensoft.com>)
List pgsql-general
On Tuesday, March, 2001-03-27 at 21:42:39, markus jais 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.

very similar:

    psql dbname username < file.sql

should work

(you can well omit username if it is the same as your login name)

regards

--
Marek Pętlicki <marpet@buy.pl>


pgsql-general by date:

Previous
From: Daniel ?erud
Date:
Subject: Re: Re: Tables grow in size when issuing UPDATEs! Why??
Next
From: will trillich
Date:
Subject: joins and indexes -- a=b or b=a?