Re: How do I import a sql file into pgAdmin4 ?

From: Holger Jakobs <holger(at)jakobs(dot)com>
To: Karen Goh <karenworld(at)yahoo(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: How do I import a sql file into pgAdmin4 ?
Date: 2019-07-15 13:44:02
Message-ID: 43c3af86-ec16-ae22-de9f-b01622ab5f44@jakobs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Kargen,

The password is the one which was set for the respective user (here:
postgres) in the database backend.

A fresh installation typically has only one user role named postgres.
The password is asked for during the installation (in case of Windows).
On Linux servers the role has no password, but is authenticated by peer,
which means that you connect from a session on the database server
locally to the database.

After installing the EDB Postgres database on Windows, you have to start
the client programs with their complete path or add the directory where
they reside (typically C:\Program Files\Postgresql\versionNumber\bin) to
the environment variable %PATH%. Please check with your system
administrators on how to do this.

Regards,

Holger

Am 15.07.19 um 10:59 schrieb Karen Goh:
>
>
>
> Hi Hoger,
>
> I tried as you said. I downloaded this psql - postgres frontend for
> windows and then tried pg_dump as well as psql command prompt.
>
> But, they asked me for password.
>
> May I know what kind of password it is referring to ?
>
> When I downloaded POSTGRESQL, it is saved in the program files in
> windows 10 but there isn't any command line tool available.
> I tried using windows 10 command prompt but it is not accepting any
> command like I what type :
> psql -U postgres -d mydb -a -f "Filelocation\name"
>
> Please help.
>
> Thanks.
> On Monday, July 15, 2019, 1:32:08 PM GMT+8, Holger Jakobs
> <holger(at)jakobs(dot)com> wrote:
>
>
> The easiest way would be using psql on the command line.
>
> Dump a little database using pg_dump with the option --data-only to
> see what the format digestible by psql looks like.
>
> Basically, it's a COPY command followed by the data in tab-separated
> format finished by a line consisting of a backslash and a period.  \.
>
>
>
> Am 15. Juli 2019 07:27:00 MESZ schrieb Karen Goh <karenworld(at)yahoo(dot)com
> <mailto:karenworld(at)yahoo(dot)com>>:
> >Hi,
> >
> >I need to migrate to postgreSQL using SQL flat files which contains a
> >few thousands rows of data.
> >
> >So far, I have attempted but not successful.  Not sure if it can't be
> >done using pgAdmin4.
> >
> >And posting to Stackoverflow superUser doesn't help as there is no
> >reply at all.
> >
> >Hence, I hope to get some help here.
> >
> >Thanks & regards,
> >Karen
>
>
> --
> Holger Jakobs, Bergisch Gladbach
> +49 178 9759012
> - sent from mobile, therefore short -
>
>
--

Holger Jakobs, Bergisch Gladbach
instant messaging: xmpp:holger(at)jakobs(dot)com
+49 178 9759012 <tel:+491789759012> oder +49 2202 817157
<tel:+492202817157>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Venkataramana Aitla 2019-07-16 06:39:26 Unable to connect DB...?
Previous Message Holger Jakobs 2019-07-15 11:50:00 Re: How do I import a sql file into pgAdmin4 ?