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 1hoTXO-0006vg-EI for pgsql-admin@arkaria.postgresql.org; Fri, 19 Jul 2019 14:07:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hoTXN-0000KX-9o for pgsql-admin@arkaria.postgresql.org; Fri, 19 Jul 2019 14:07:05 +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 1hoTXM-0000At-Il for pgsql-admin@lists.postgresql.org; Fri, 19 Jul 2019 14:07:04 +0000 Received: from sonic303-2.consmr.mail.bf2.yahoo.com ([74.6.131.41]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1hoTXJ-0004wa-L8 for pgsql-admin@lists.postgresql.org; Fri, 19 Jul 2019 14:07:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1563545220; bh=W5av8pNIE0CX9ydr3NJPIaPFbPRfI/09EkeistzA5FI=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=ggcOpSBCdSvnSH4Oo1pJE1ERYRARUXkLoTGUoVxCTkHEQ4y1VPpIALUN7uE7oecliz2eCojJLza1Pw8XKa4OraeBoibjwvQPoaQGg1SsmOeqWQ9bbuPHzC47rOqA6tSoBQ6tE4CdMeG+p4sAk+zjBYTJIydvfFx6d3KaMIY991h9T98g244Ob/rxxFQwhwDCEJcJOE6KDTF8EiyPGWbQQUdLfiDkA3dEdgXLP9HG88k54lijUhQI9V87KM15M6pzuHAWtsptcGnA/aWx1whdEVQtrYkkmSH4tU/dORpP5cf7Ytzw7ZE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pdrFeCpvW0QcA3 BDhhusqhSrzkEXU5.Eb6vYQbwfJUsH3epdwd751cxQjntcA43idHqgaC9enKaaDIvepV4prlu4Q9 bUhJne7bOeewDPO9NogL9TUfyC9zhWir4RObdqbU6NC3n9KKiw1SWiloeldl8G5Qwq0bqEMZtLKQ 04umLKr1yklzf4xtt9fT8JqC8eiQZp3PHnB9sS8W6yEjJDdpZcWLlfTFewuGY8m4qgxCwGspcevb bzcaU8RVFpyF74hE- Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.bf2.yahoo.com with HTTP; Fri, 19 Jul 2019 14:07:00 +0000 Date: Fri, 19 Jul 2019 14:06:59 +0000 (UTC) From: Karen Goh To: Gopi Setty Cc: pgsql-admin@lists.postgresql.org, Holger Jakobs Message-ID: <2060597060.2215764.1563545219063@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_2215763_220609410.1563545219062" Content-Length: 8432 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_2215763_220609410.1563545219062 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 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 Thanks Gopi. However, I am getting the below error. ERROR: extra data after last expected column CONTEXT: COPY dbMembershipparticulars, line 1: "-- phpMyAdmin SQL Dump" How do I resolve this error ? Unfortunately, I am not using Linux server...and just make use of whatever iH ave which is Windows 10:( 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_2215763_220609410.1563545219062 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

2. If you are using pg-admin-III right-click on the PSQL c= onsloe option or Linux server use a copy command \COPY tmp_test FROM &#= 39;test.csv' DELIMITER ',' CSV HEADER ;

image.png
Thanks Gopi. However, I am getting the below error.

ERROR: ex= tra data after last expected column
CONTEXT: COPY dbMembershipparti= culars, line 1: "-- phpMyAdmin SQL Dump"
How do I resolve this= error ?

Unfortunately, I am not using Linux server...and just make = use of whatever iH ave which is Windows 10:(


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



<= br>

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


Hi Kargen,

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

A fresh installation typically has only on= e user role named postgres. The password is asked for during the installati= on (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 d= atabase server locally to the database.

After installing the EDB= Postgres database on Windows, you have to start the client programs with t= heir complete path or add the directory where they reside (typically C:\Pro= gram 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 Window= s 10 command prompt, the error said it can't find that file but the fil= eName everything was correct.
Is there anything wrong with that quer= y?

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


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

Please = advise.

Regards,

Holger
Am 15.07.19 um 10:59 s= chrieb Karen Goh:



Hi Hoger,

I tried as you sa= id. I downloaded this psql - postgres frontend for windows and then tried p= g_dump as well as psql command prompt.

But, they asked me for pa= ssword.

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 tr= ied using windows 10 command prompt but it is not accepting any command lik= e I what type :
psql -U postgres -d mydb -a -f "Filelocation\na= me"

Please help.

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

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, i= t's a COPY command followed by the data in tab-separated format finishe= d by a line consisting of a backslash and a period. \.



A= m 15. Juli 2019 07:27:00 MESZ schrieb Karen Goh <karenworld@yahoo.com>= ;:
>Hi,
>
>I need to migrate to postgreSQL us= ing SQL flat files which contains a
>few thousands rows of data.<= br> >
>So far, I have attempted but not successful. Not sur= e 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@jak= obs.com
+49 178 9759012 oder +49 2202 817157

=20 ------=_Part_2215763_220609410.1563545219062--