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 1hoTe7-0007E3-Oc for pgsql-admin@arkaria.postgresql.org; Fri, 19 Jul 2019 14:14:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hoTe6-00060f-LZ for pgsql-admin@arkaria.postgresql.org; Fri, 19 Jul 2019 14:14:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hoTe6-00060N-9n for pgsql-admin@lists.postgresql.org; Fri, 19 Jul 2019 14:14:02 +0000 Received: from sonic313-13.consmr.mail.bf2.yahoo.com ([74.6.133.123]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1hoTe3-000527-Hg for pgsql-admin@lists.postgresql.org; Fri, 19 Jul 2019 14:14:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1563545638; bh=Fqf5LAWy0CDytzoc74zu0QQMVMmLtn41ISr6yOlQW8c=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=B3eM7rU1cCrB9nftl1HIjDFdDG3u5IOSr/khmDSMK6P0coXCT+ZJ1wrVmD0kFo6gSnz/4ZfOfEnqtkRHajtNrOa03R9PtYZPbprbHKRzByjOANeFTmbjxeMLNHgGocYbiYD2/KuRx4e0Nvds0QUxHEfZLJ2DyQyyb6PYB7VhKoB4axLfX2YVtjy41xKxMgwqMzuB0liCz9mqciy9+hCMXIQ2VPiJa5wno/c2EzD7Rx1PugWZtyGf+tDh21DOcAAKj5jw9XDUWaOwmjzJ0fioCypN4chy3mhu5NScPIUYABnM5lfU6d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7JbMBKpYtCxs9hFAD0nJRtVrbBTltF8VoFA51JXhZ UTEOEMpfx0wMQfiVWDSRL5hxcdvShJgStn1JeA4XsIAm9IhrL3y5ZmmsdSOiiUUamLEtE550urZL TBXSkbw7hhrH2pNrZ5wLuzE_sxw4wcDzygE_K.nQAMCl2Bfw8kTIIqnRcZXuTwqKllx21tE0q0Kf Isi5GpQCjKhOwb0WsAWLLmDJFu6RXgI7uF1S7FMZ67tbgW9IAQkXKyXKuGbVkv6DPajmRiTMh87v N7Y2nPn9PJfGmAg-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.bf2.yahoo.com with HTTP; Fri, 19 Jul 2019 14:13:58 +0000 Date: Fri, 19 Jul 2019 14:13:57 +0000 (UTC) From: Karen Goh To: Gopi Setty Cc: pgsql-admin@lists.postgresql.org, Holger Jakobs Message-ID: <1144163382.2229263.1563545637672@mail.yahoo.com> In-Reply-To: References: <1586344675.694544.1563168420153@mail.yahoo.com> <81AFFC3D-FD7B-4C11-93EE-210A8B1C752D@jakobs.com> <325397478.730265.1563181161656@mail.yahoo.com> <43c3af86-ec16-ae22-de9f-b01622ab5f44@jakobs.com> <1290115266.2200954.1563539379544@mail.yahoo.com> Subject: Re: How do I import a sql file into pgAdmin4 ? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2229262_1764399514.1563545637670" Content-Length: 8309 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_2229262_1764399514.1563545637670 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On Friday, July 19, 2019, 9:52:42 PM GMT+8, Gopi Setty wrote: 1. Simple file import method (Right-click in table and import/export option) image.png Hi Gopi, Further to my last message regarding the error, can I know if I have to create the columns before I import or just the table will do ? Now, I tried using csv format file, still receiving the same error : error extra data after last expected column 2. If you are using pg-admin-III right-click on the PSQL consloe option or Linux server use a copy command \COPY tmp_test FROM 'test.csv' DELIMITER ',' CSV HEADER ; image.png On Fri, Jul 19, 2019 at 7:29 AM Karen Goh wrote: On Monday, July 15, 2019, 9:44:24 PM GMT+8, Holger Jakobs wrote: 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. OK. Now I found my password from my notebook. Using Windows 10 command prompt, the error said it can't find that file but the fileName everything was correct. Is there anything wrong with that query? I also read this thread but I can't find any file open to get pgAdmin4 to open my file. https://www.postgresql.org/message-id/287946147.391841.1515085145687%40mail.yahoo.com Please advise. 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 ------=_Part_2229262_1764399514.1563545637670 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable





On Friday, July 19, 2019, 9:52:42 = PM GMT+8, Gopi Setty <gsp06268@gmail.com> wrote:


1. Simple= file import method (Right-click in table and import/export option)

= image.png

Hi Gopi,
Further to my last message regarding the error= , can I know if I have to create the columns before I import or just the ta= ble will do ?

Now, I tried using csv format file, still receiving th= e same error :
error extra data after last expected column

2. I= f you are using pg-admin-III right-click on the PSQL consloe option or Lin= ux server use a copy command \COPY tmp_test FROM 'test.csv' DELI= MITER ',' CSV HEADER ;

image.png

On Fri, Jul 19, 2019= at 7:29 AM Karen Goh <karenworld@yahoo.com> wrote:





On Monday, July 15, 2019, 9:44:24 PM GMT+8, Holger Jakobs <= ;holger@jakobs.com> wrote:


Hi Kargen,

The pass= word is the one which was set for the respective user (here: postgres) in t= he database backend.

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

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

OK. Now I found my password from my notebook.

Using Windows= 10 command prompt, the error said it can't find that file but the file= Name everything was correct.
Is there anything wrong with that query= ?

I also read this thread but I can't find any file open to = get pgAdmin4 to open my file.


https://www.postgresql.org/mes= sage-id/287946147.391841.1515085145687%40mail.yahoo.com

Please a= dvise.

Regards,

Holger
Am 15.07.19 um 10:59 sc= hrieb Karen Goh:



Hi Hoger,

I tried as you sai= d. I downloaded this psql - postgres frontend for windows and then tried pg= _dump as well as psql command prompt.

But, they asked me for pas= sword.

May I know what kind of password it is referring to ?
=
When I downloaded POSTGRESQL, it is saved in the program files in w= indows 10 but there isn't any command line tool available.
I tri= ed using windows 10 command prompt but it is not accepting any command like= I what type :
psql -U postgres -d mydb -a -f "Filelocation\nam= e"

Please help.

Thanks.
On Monday, July 1= 5, 2019, 1:32:08 PM GMT+8, Holger Jakobs <holger@jakobs.com> wrote:

The easiest way would be using psql on the command line.
<= br> 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 usi= ng 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<= br> - sent from mobile, therefore short -


--

= Holger Jakobs, Bergisch Gladbach
instant messaging: xmpp:holger@jako= bs.com
+49 178 9759012 oder +49 2202 817157

=20 ------=_Part_2229262_1764399514.1563545637670--