Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hn1H2-0004et-Ci for pgsql-admin@arkaria.postgresql.org; Mon, 15 Jul 2019 13:44:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hn1H0-0002qB-US for pgsql-admin@arkaria.postgresql.org; Mon, 15 Jul 2019 13:44:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hn1H0-0002pW-JW for pgsql-admin@lists.postgresql.org; Mon, 15 Jul 2019 13:44:10 +0000 Received: from jakobs.com ([85.214.83.89] helo=rs.plausibolo.de) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hn1Gy-0004tC-BC for pgsql-admin@lists.postgresql.org; Mon, 15 Jul 2019 13:44:10 +0000 Received: from localhost (localhost [127.0.0.1]) by rs.plausibolo.de (Postfix) with ESMTP id 2FBE5BE08C5; Mon, 15 Jul 2019 15:44:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at rs.plausibolo.de Received: from rs.plausibolo.de ([IPv6:::1]) by localhost (h2367442.stratoserver.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id C8WIIrSNxQLw; Mon, 15 Jul 2019 15:44:02 +0200 (CEST) Received: from [192.168.104.107] (unknown [145.253.118.26]) by rs.plausibolo.de (Postfix) with ESMTPSA id BAE84BE070D; Mon, 15 Jul 2019 15:44:02 +0200 (CEST) Subject: Re: How do I import a sql file into pgAdmin4 ? To: Karen Goh , pgsql-admin@lists.postgresql.org References: <1586344675.694544.1563168420153@mail.yahoo.com> <81AFFC3D-FD7B-4C11-93EE-210A8B1C752D@jakobs.com> <325397478.730265.1563181161656@mail.yahoo.com> From: Holger Jakobs Openpgp: preference=signencrypt Autocrypt: addr=holger@jakobs.com; prefer-encrypt=mutual; keydata= mQGiBEG8IA8RBAC6WqUzEPTjest7MvFca5WlI47EgtKzOy1D1X9gSEmPj0sQrilNGEitY/+Q kPnCvI3odz1XXf/MZQtXwlxJA4lPmx8/K7MqBj9vh0J5jRznpE7l+SBDmmDobIqBAgl6BZvH 1C7e2y72h5T1/plrXonLUGzthqBtsvWl0ogoyTJqiwCg6AOhYX+Xbcl8/AXy4F4qbUq4LXsD /j6yCKRkyleN688y9YpuS5J6/ZZ/OBCM74pa2iNge3GmXn1JeUowF693QFCGHkpswmDIoGhL 5iM6GHj9HFB6rTXW5H3sR1y6ta7vXwoNBGkgiM89B1a/KsLT5L6MZgZ5AV0tj6vxwAsuLixS SDiNVNAd8vp2FfqdLlOgThsgVIwKBACsCzZa1VxpdoNSYnkTOSZhEjZkbWApdneQ2bTxXJgW +fWgVeLiojCp6I1AmQqzwHz8UN1nrsQjH8Rnxt2J/C5H/Ek9jlOFakFQXlPMZw3tNeTA1P3B 3zPyq6hKFPZHFklUquE3gHVjnX9qxSW0xvFirf6xAMCMYWRnCQHRgiXoAbQhSG9sZ2VyIEph a29icyA8aG9sZ2VyQGpha29icy5jb20+iGQEExECACQCGwMGCwkIBwMCAxUCAwMWAgECHgEC F4AFAlZ7KnEFCSeLDWIACgkQileck7MZYbpbxgCgxM54+4qx/sfGwq01x93pWr2QghwAoIfD Of6Uoc43y98+xR5/Iu9Z1RH8uQENBEG8IBAQBACiGkoX8HKCocdCwRdMzc9siDs1w0YNayhT PnK9Ii3wzzS2R9NSyWsPQVyx6hkVfSmK6CE5RzfuDUzrYEgyaV/2vT3JD9Gko+RuFnjeQvVo 8hc19bmBSn95ATki+hFy/68MqpMlsG7YyCluRSpXh2qxlhbh2FzTIQmiEQAR4kFCEwADBQP/ Z1Y6nwoXw/5JmLJLFcvZZlFfn4g9TjyMSwH50/AXqOApccy9JSzoTFY87ItmGkhD0qj18PJB St2uqASGrk2/55XK596RWnoeyL9mzj5r6woDqPNRXIbK85foGVIMRrb/EufgSOP5H6VHybvB PD4CppEw4Q0fRsMCaOcvibkjHoqITwQYEQIADwIbDAUCVnsqcQUJJ4sNYQAKCRCKV5yTsxlh urunAJ9avyijdRls7l6XPc2cBMys3xu/sgCeOVJE6DzwBBRUd6S6mtf2eG4FPXg= Message-ID: <43c3af86-ec16-ae22-de9f-b01622ab5f44@jakobs.com> Date: Mon, 15 Jul 2019 15:44:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: <325397478.730265.1563181161656@mail.yahoo.com> Content-Type: multipart/alternative; boundary="------------CB5D2B3135010188E5E785E4" Content-Language: de-DE List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------CB5D2B3135010188E5E785E4 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 > 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 >: > >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@jakobs.com +49 178 9759012 oder +49 2202 817157 --------------CB5D2B3135010188E5E785E4 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

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@jakobs.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@yahoo.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@jakobs.com
+49 178 9759012 oder +49 2202 817157

--------------CB5D2B3135010188E5E785E4--