Thread: Import question

Import question

From
Scobey Weaver
Date:
I'm taking a skillshare course and creating my own tables.  I tried to
import some data from a csv file and it didn't work. I thought I had
done it just like the example on the video, and also checked some other
online sources which seemed to do it the same way.

Attached is the file I'm trying to import.

The table I'm importing to was created as follows:

CREATE TABLE public.markets
(
     id integer NOT NULL,
     "Market" character varying(50) COLLATE pg_catalog."default" NOT NULL,
     CONSTRAINT markets_pkey PRIMARY KEY (id),
     CONSTRAINT unique_market UNIQUE ("Market")
)

TABLESPACE pg_default;

ALTER TABLE public.markets
     OWNER to postgres;
COMMENT ON TABBLE public.markets
     IS 'Market used as the price index (posted, Platts, Opis, Argus, 
etc...)';

The import fails with the following error:  Failed (exit code -6)

I can't find "exit code -6" anywhere.  What's wrong with my import?

I've had one reply to this that brought up encoding.  I left the
encoding blank at first, as did the instructor in the skillshare video. 
Since then I've tried the UTF8 suggested by the person who brought it
up.  I also tried BIG5, EUC_CN, SQL_ASCII and WIN1250.

All efforts ended with the same result. Is there a list of exit codes
anywhere?  What's "exit code -6"?

Thanks,

Scobey







Attachment

RE: Import question

From
"Ahmed, Nawaz (Fuji Xerox Australia)"
Date:
Are you running this import into a database in Linux environment or a Windows environment ?

I am guessing (I could be wrong), it has something to do with control characters in your datafile such as ^M or ^H,
whichare usually visible if you edit the file in a Linux host using 'vi' editor.
 

And what is the import command are you using, is it a COPY command ?

~

Nawaz


-----Original Message-----
From: Scobey Weaver <scobey49@verizon.net>
Sent: Thursday, 28 May 2020 6:11 AM
To: pgadmin-support@lists.postgresql.org
Subject: Import question

I'm taking a skillshare course and creating my own tables.  I tried to import some data from a csv file and it didn't
work.I thought I had done it just like the example on the video, and also checked some other online sources which
seemedto do it the same way.
 

Attached is the file I'm trying to import.

The table I'm importing to was created as follows:

CREATE TABLE public.markets
(
     id integer NOT NULL,
     "Market" character varying(50) COLLATE pg_catalog."default" NOT NULL,
     CONSTRAINT markets_pkey PRIMARY KEY (id),
     CONSTRAINT unique_market UNIQUE ("Market")
)

TABLESPACE pg_default;

ALTER TABLE public.markets
     OWNER to postgres;
COMMENT ON TABBLE public.markets
     IS 'Market used as the price index (posted, Platts, Opis, Argus, etc...)';

The import fails with the following error:  Failed (exit code -6)

I can't find "exit code -6" anywhere.  What's wrong with my import?

I've had one reply to this that brought up encoding.  I left the encoding blank at first, as did the instructor in the
skillsharevideo. Since then I've tried the UTF8 suggested by the person who brought it up.  I also tried BIG5, EUC_CN,
SQL_ASCIIand WIN1250.
 

All efforts ended with the same result. Is there a list of exit codes anywhere?  What's "exit code -6"?

Thanks,

Scobey







IMPORTANT NOTE: Fuji Xerox email transmission, including any attachments, is private and confidential and may contain
legallyprivileged information. It is for the addressee's attention only. If you are not the intended recipient and have
receivedthis transmission, you must not use, edit, print, copy or disclose its contents to any person or disseminate
theinformation contained herein or hereto attached, and you must notify sender immediately by return email and delete
thistransmission from your system. Any confidentiality, privilege or copyright is not waived or lost because this
e-mailhas been sent to you in error. We have used reasonable efforts to protect this transmission from computer viruses
andother malicious software, but no warranty is made and the sender takes no responsibility for any loss or damage
incurredfrom using this email or the information contained in this email.
 

Re: Import question

From
Aditya Toshniwal
Date:
Hi Scobey,

Did you click on more details on the import progress notifier ? It would give you more logs to help. 

On Thu, May 28, 2020 at 6:52 AM Ahmed, Nawaz (Fuji Xerox Australia) <Nawaz.Ahmed@aus.fujixerox.com> wrote:
Are you running this import into a database in Linux environment or a Windows environment ?

I am guessing (I could be wrong), it has something to do with control characters in your datafile such as ^M or ^H, which are usually visible if you edit the file in a Linux host using 'vi' editor.

And what is the import command are you using, is it a COPY command ?

~

Nawaz


-----Original Message-----
From: Scobey Weaver <scobey49@verizon.net>
Sent: Thursday, 28 May 2020 6:11 AM
To: pgadmin-support@lists.postgresql.org
Subject: Import question

I'm taking a skillshare course and creating my own tables.  I tried to import some data from a csv file and it didn't work. I thought I had done it just like the example on the video, and also checked some other online sources which seemed to do it the same way.

Attached is the file I'm trying to import.

The table I'm importing to was created as follows:

CREATE TABLE public.markets
(
     id integer NOT NULL,
     "Market" character varying(50) COLLATE pg_catalog."default" NOT NULL,
     CONSTRAINT markets_pkey PRIMARY KEY (id),
     CONSTRAINT unique_market UNIQUE ("Market")
)

TABLESPACE pg_default;

ALTER TABLE public.markets
     OWNER to postgres;
COMMENT ON TABBLE public.markets
     IS 'Market used as the price index (posted, Platts, Opis, Argus, etc...)';

The import fails with the following error:  Failed (exit code -6)

I can't find "exit code -6" anywhere.  What's wrong with my import?

I've had one reply to this that brought up encoding.  I left the encoding blank at first, as did the instructor in the skillshare video. Since then I've tried the UTF8 suggested by the person who brought it up.  I also tried BIG5, EUC_CN, SQL_ASCII and WIN1250.

All efforts ended with the same result. Is there a list of exit codes anywhere?  What's "exit code -6"?

Thanks,

Scobey







IMPORTANT NOTE: Fuji Xerox email transmission, including any attachments, is private and confidential and may contain legally privileged information. It is for the addressee's attention only. If you are not the intended recipient and have received this transmission, you must not use, edit, print, copy or disclose its contents to any person or disseminate the information contained herein or hereto attached, and you must notify sender immediately by return email and delete this transmission from your system. Any confidentiality, privilege or copyright is not waived or lost because this e-mail has been sent to you in error. We have used reasonable efforts to protect this transmission from computer viruses and other malicious software, but no warranty is made and the sender takes no responsibility for any loss or damage incurred from using this email or the information contained in this email.


--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"

Re: Import question

From
Scobey Weaver
Date:
Dear Nawaz,

I'm running it on a macbook pro.  I'm familiar with vi, but I'm not sure
if it's available for mac or if there's something else similar.

The file attached is the one I imported, however, so you can check it
for me if you like.  I'm assuming it wouldn't be any different to you
than it was to pgadmin.

I used the import/export wizard that's launched by right clicking on the
table name and selecting import/export.  I did see that the query it
runs is a copy, however.

Thanks,

Scobey



On 5/27/20 9:22 PM, Ahmed, Nawaz (Fuji Xerox Australia) wrote:
> Are you running this import into a database in Linux environment or a Windows environment ?
>
> I am guessing (I could be wrong), it has something to do with control characters in your datafile such as ^M or ^H,
whichare usually visible if you edit the file in a Linux host using 'vi' editor. 
>
> And what is the import command are you using, is it a COPY command ?
>
> ~
>
> Nawaz
>
>
> -----Original Message-----
> From: Scobey Weaver <scobey49@verizon.net>
> Sent: Thursday, 28 May 2020 6:11 AM
> To: pgadmin-support@lists.postgresql.org
> Subject: Import question
>
> I'm taking a skillshare course and creating my own tables.  I tried to import some data from a csv file and it didn't
work.I thought I had done it just like the example on the video, and also checked some other online sources which
seemedto do it the same way. 
>
> Attached is the file I'm trying to import.
>
> The table I'm importing to was created as follows:
>
> CREATE TABLE public.markets
> (
>       id integer NOT NULL,
>       "Market" character varying(50) COLLATE pg_catalog."default" NOT NULL,
>       CONSTRAINT markets_pkey PRIMARY KEY (id),
>       CONSTRAINT unique_market UNIQUE ("Market")
> )
>
> TABLESPACE pg_default;
>
> ALTER TABLE public.markets
>       OWNER to postgres;
> COMMENT ON TABBLE public.markets
>       IS 'Market used as the price index (posted, Platts, Opis, Argus, etc...)';
>
> The import fails with the following error:  Failed (exit code -6)
>
> I can't find "exit code -6" anywhere.  What's wrong with my import?
>
> I've had one reply to this that brought up encoding.  I left the encoding blank at first, as did the instructor in
theskillshare video. Since then I've tried the UTF8 suggested by the person who brought it up.  I also tried BIG5,
EUC_CN,SQL_ASCII and WIN1250. 
>
> All efforts ended with the same result. Is there a list of exit codes anywhere?  What's "exit code -6"?
>
> Thanks,
>
> Scobey
>
>
>
>
>
>
>
> IMPORTANT NOTE: Fuji Xerox email transmission, including any attachments, is private and confidential and may contain
legallyprivileged information. It is for the addressee's attention only. If you are not the intended recipient and have
receivedthis transmission, you must not use, edit, print, copy or disclose its contents to any person or disseminate
theinformation contained herein or hereto attached, and you must notify sender immediately by return email and delete
thistransmission from your system. Any confidentiality, privilege or copyright is not waived or lost because this
e-mailhas been sent to you in error. We have used reasonable efforts to protect this transmission from computer viruses
andother malicious software, but no warranty is made and the sender takes no responsibility for any loss or damage
incurredfrom using this email or the information contained in this email. 






Re: Import question

From
Scobey Weaver
Date:
Dear Aditya,

I did click on more details. I've attached a screen shot of the result.

Thanks,

Scobey

On 5/28/20 12:06 AM, Aditya Toshniwal wrote:
Hi Scobey,

Did you click on more details on the import progress notifier ? It would give you more logs to help. 

On Thu, May 28, 2020 at 6:52 AM Ahmed, Nawaz (Fuji Xerox Australia) <Nawaz.Ahmed@aus.fujixerox.com> wrote:
Are you running this import into a database in Linux environment or a Windows environment ?

I am guessing (I could be wrong), it has something to do with control characters in your datafile such as ^M or ^H, which are usually visible if you edit the file in a Linux host using 'vi' editor.

And what is the import command are you using, is it a COPY command ?

~

Nawaz


-----Original Message-----
From: Scobey Weaver <scobey49@verizon.net>
Sent: Thursday, 28 May 2020 6:11 AM
To: pgadmin-support@lists.postgresql.org
Subject: Import question

I'm taking a skillshare course and creating my own tables.  I tried to import some data from a csv file and it didn't work. I thought I had done it just like the example on the video, and also checked some other online sources which seemed to do it the same way.

Attached is the file I'm trying to import.

The table I'm importing to was created as follows:

CREATE TABLE public.markets
(
     id integer NOT NULL,
     "Market" character varying(50) COLLATE pg_catalog."default" NOT NULL,
     CONSTRAINT markets_pkey PRIMARY KEY (id),
     CONSTRAINT unique_market UNIQUE ("Market")
)

TABLESPACE pg_default;

ALTER TABLE public.markets
     OWNER to postgres;
COMMENT ON TABBLE public.markets
     IS 'Market used as the price index (posted, Platts, Opis, Argus, etc...)';

The import fails with the following error:  Failed (exit code -6)

I can't find "exit code -6" anywhere.  What's wrong with my import?

I've had one reply to this that brought up encoding.  I left the encoding blank at first, as did the instructor in the skillshare video. Since then I've tried the UTF8 suggested by the person who brought it up.  I also tried BIG5, EUC_CN, SQL_ASCII and WIN1250.

All efforts ended with the same result. Is there a list of exit codes anywhere?  What's "exit code -6"?

Thanks,

Scobey







IMPORTANT NOTE: Fuji Xerox email transmission, including any attachments, is private and confidential and may contain legally privileged information. It is for the addressee's attention only. If you are not the intended recipient and have received this transmission, you must not use, edit, print, copy or disclose its contents to any person or disseminate the information contained herein or hereto attached, and you must notify sender immediately by return email and delete this transmission from your system. Any confidentiality, privilege or copyright is not waived or lost because this e-mail has been sent to you in error. We have used reasonable efforts to protect this transmission from computer viruses and other malicious software, but no warranty is made and the sender takes no responsibility for any loss or damage incurred from using this email or the information contained in this email.


--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


Attachment

Re: Import question

From
Aditya Toshniwal
Date:
Hi Scobey,

Can you please share the table DDL with some sample records CSV to simulate the issue at our end ?

On Thu, May 28, 2020 at 11:13 AM Scobey Weaver <scobey49@verizon.net> wrote:
Dear Aditya,

I did click on more details. I've attached a screen shot of the result.

Thanks,

Scobey

On 5/28/20 12:06 AM, Aditya Toshniwal wrote:
Hi Scobey,

Did you click on more details on the import progress notifier ? It would give you more logs to help. 

On Thu, May 28, 2020 at 6:52 AM Ahmed, Nawaz (Fuji Xerox Australia) <Nawaz.Ahmed@aus.fujixerox.com> wrote:
Are you running this import into a database in Linux environment or a Windows environment ?

I am guessing (I could be wrong), it has something to do with control characters in your datafile such as ^M or ^H, which are usually visible if you edit the file in a Linux host using 'vi' editor.

And what is the import command are you using, is it a COPY command ?

~

Nawaz


-----Original Message-----
From: Scobey Weaver <scobey49@verizon.net>
Sent: Thursday, 28 May 2020 6:11 AM
To: pgadmin-support@lists.postgresql.org
Subject: Import question

I'm taking a skillshare course and creating my own tables.  I tried to import some data from a csv file and it didn't work. I thought I had done it just like the example on the video, and also checked some other online sources which seemed to do it the same way.

Attached is the file I'm trying to import.

The table I'm importing to was created as follows:

CREATE TABLE public.markets
(
     id integer NOT NULL,
     "Market" character varying(50) COLLATE pg_catalog."default" NOT NULL,
     CONSTRAINT markets_pkey PRIMARY KEY (id),
     CONSTRAINT unique_market UNIQUE ("Market")
)

TABLESPACE pg_default;

ALTER TABLE public.markets
     OWNER to postgres;
COMMENT ON TABBLE public.markets
     IS 'Market used as the price index (posted, Platts, Opis, Argus, etc...)';

The import fails with the following error:  Failed (exit code -6)

I can't find "exit code -6" anywhere.  What's wrong with my import?

I've had one reply to this that brought up encoding.  I left the encoding blank at first, as did the instructor in the skillshare video. Since then I've tried the UTF8 suggested by the person who brought it up.  I also tried BIG5, EUC_CN, SQL_ASCII and WIN1250.

All efforts ended with the same result. Is there a list of exit codes anywhere?  What's "exit code -6"?

Thanks,

Scobey







IMPORTANT NOTE: Fuji Xerox email transmission, including any attachments, is private and confidential and may contain legally privileged information. It is for the addressee's attention only. If you are not the intended recipient and have received this transmission, you must not use, edit, print, copy or disclose its contents to any person or disseminate the information contained herein or hereto attached, and you must notify sender immediately by return email and delete this transmission from your system. Any confidentiality, privilege or copyright is not waived or lost because this e-mail has been sent to you in error. We have used reasonable efforts to protect this transmission from computer viruses and other malicious software, but no warranty is made and the sender takes no responsibility for any loss or damage incurred from using this email or the information contained in this email.


--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"




--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"

Re: Import question

From
Aditya Toshniwal
Date:
Oh wait, you've already sent. Will try at our end.

On Thu, May 28, 2020 at 11:15 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Scobey,

Can you please share the table DDL with some sample records CSV to simulate the issue at our end ?

On Thu, May 28, 2020 at 11:13 AM Scobey Weaver <scobey49@verizon.net> wrote:
Dear Aditya,

I did click on more details. I've attached a screen shot of the result.

Thanks,

Scobey

On 5/28/20 12:06 AM, Aditya Toshniwal wrote:
Hi Scobey,

Did you click on more details on the import progress notifier ? It would give you more logs to help. 

On Thu, May 28, 2020 at 6:52 AM Ahmed, Nawaz (Fuji Xerox Australia) <Nawaz.Ahmed@aus.fujixerox.com> wrote:
Are you running this import into a database in Linux environment or a Windows environment ?

I am guessing (I could be wrong), it has something to do with control characters in your datafile such as ^M or ^H, which are usually visible if you edit the file in a Linux host using 'vi' editor.

And what is the import command are you using, is it a COPY command ?

~

Nawaz


-----Original Message-----
From: Scobey Weaver <scobey49@verizon.net>
Sent: Thursday, 28 May 2020 6:11 AM
To: pgadmin-support@lists.postgresql.org
Subject: Import question

I'm taking a skillshare course and creating my own tables.  I tried to import some data from a csv file and it didn't work. I thought I had done it just like the example on the video, and also checked some other online sources which seemed to do it the same way.

Attached is the file I'm trying to import.

The table I'm importing to was created as follows:

CREATE TABLE public.markets
(
     id integer NOT NULL,
     "Market" character varying(50) COLLATE pg_catalog."default" NOT NULL,
     CONSTRAINT markets_pkey PRIMARY KEY (id),
     CONSTRAINT unique_market UNIQUE ("Market")
)

TABLESPACE pg_default;

ALTER TABLE public.markets
     OWNER to postgres;
COMMENT ON TABBLE public.markets
     IS 'Market used as the price index (posted, Platts, Opis, Argus, etc...)';

The import fails with the following error:  Failed (exit code -6)

I can't find "exit code -6" anywhere.  What's wrong with my import?

I've had one reply to this that brought up encoding.  I left the encoding blank at first, as did the instructor in the skillshare video. Since then I've tried the UTF8 suggested by the person who brought it up.  I also tried BIG5, EUC_CN, SQL_ASCII and WIN1250.

All efforts ended with the same result. Is there a list of exit codes anywhere?  What's "exit code -6"?

Thanks,

Scobey







IMPORTANT NOTE: Fuji Xerox email transmission, including any attachments, is private and confidential and may contain legally privileged information. It is for the addressee's attention only. If you are not the intended recipient and have received this transmission, you must not use, edit, print, copy or disclose its contents to any person or disseminate the information contained herein or hereto attached, and you must notify sender immediately by return email and delete this transmission from your system. Any confidentiality, privilege or copyright is not waived or lost because this e-mail has been sent to you in error. We have used reasonable efforts to protect this transmission from computer viruses and other malicious software, but no warranty is made and the sender takes no responsibility for any loss or damage incurred from using this email or the information contained in this email.


--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"




--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"

Re: Import question

From
Aditya Toshniwal
Date:
Hi Scobey,

I created the table and imported the file provided by you. Please note I've set the headers option on as you've a header record in the CSV file. It successfully loaded for me.
Screenshot 2020-05-28 at 11.53.25 AM.pngScreenshot 2020-05-28 at 11.53.36 AM.png


On Thu, May 28, 2020 at 11:25 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Oh wait, you've already sent. Will try at our end.

On Thu, May 28, 2020 at 11:15 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Scobey,

Can you please share the table DDL with some sample records CSV to simulate the issue at our end ?

On Thu, May 28, 2020 at 11:13 AM Scobey Weaver <scobey49@verizon.net> wrote:
Dear Aditya,

I did click on more details. I've attached a screen shot of the result.

Thanks,

Scobey

On 5/28/20 12:06 AM, Aditya Toshniwal wrote:
Hi Scobey,

Did you click on more details on the import progress notifier ? It would give you more logs to help. 

On Thu, May 28, 2020 at 6:52 AM Ahmed, Nawaz (Fuji Xerox Australia) <Nawaz.Ahmed@aus.fujixerox.com> wrote:
Are you running this import into a database in Linux environment or a Windows environment ?

I am guessing (I could be wrong), it has something to do with control characters in your datafile such as ^M or ^H, which are usually visible if you edit the file in a Linux host using 'vi' editor.

And what is the import command are you using, is it a COPY command ?

~

Nawaz


-----Original Message-----
From: Scobey Weaver <scobey49@verizon.net>
Sent: Thursday, 28 May 2020 6:11 AM
To: pgadmin-support@lists.postgresql.org
Subject: Import question

I'm taking a skillshare course and creating my own tables.  I tried to import some data from a csv file and it didn't work. I thought I had done it just like the example on the video, and also checked some other online sources which seemed to do it the same way.

Attached is the file I'm trying to import.

The table I'm importing to was created as follows:

CREATE TABLE public.markets
(
     id integer NOT NULL,
     "Market" character varying(50) COLLATE pg_catalog."default" NOT NULL,
     CONSTRAINT markets_pkey PRIMARY KEY (id),
     CONSTRAINT unique_market UNIQUE ("Market")
)

TABLESPACE pg_default;

ALTER TABLE public.markets
     OWNER to postgres;
COMMENT ON TABBLE public.markets
     IS 'Market used as the price index (posted, Platts, Opis, Argus, etc...)';

The import fails with the following error:  Failed (exit code -6)

I can't find "exit code -6" anywhere.  What's wrong with my import?

I've had one reply to this that brought up encoding.  I left the encoding blank at first, as did the instructor in the skillshare video. Since then I've tried the UTF8 suggested by the person who brought it up.  I also tried BIG5, EUC_CN, SQL_ASCII and WIN1250.

All efforts ended with the same result. Is there a list of exit codes anywhere?  What's "exit code -6"?

Thanks,

Scobey







IMPORTANT NOTE: Fuji Xerox email transmission, including any attachments, is private and confidential and may contain legally privileged information. It is for the addressee's attention only. If you are not the intended recipient and have received this transmission, you must not use, edit, print, copy or disclose its contents to any person or disseminate the information contained herein or hereto attached, and you must notify sender immediately by return email and delete this transmission from your system. Any confidentiality, privilege or copyright is not waived or lost because this e-mail has been sent to you in error. We have used reasonable efforts to protect this transmission from computer viruses and other malicious software, but no warranty is made and the sender takes no responsibility for any loss or damage incurred from using this email or the information contained in this email.


--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"




--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"
Attachment

Failed (exit code -6)

From
Scobey Weaver
Date:
Hi Aditya,

I think that's just about the worst possible news for me.  What you've proved is there is nothing wrong with my table or the file I'm uploading.  That means there is something wrong with my pgadmin/postgres install, or my laptop.  It also leaves the question of what the heck is "exit code -6".  I'm used to there being a list of exit codes to check, but couldn't find a list.  What's the use of an exit code if it doesn't help you fix the problem?

I'm going to uninstall and reinstall pgadmin/postgres and see if that does it.

Thanks,

Scobey

On 5/28/20 2:26 AM, Aditya Toshniwal wrote:
Hi Scobey,

I created the table and imported the file provided by you. Please note I've set the headers option on as you've a header record in the CSV file. It successfully loaded for me.
Screenshot 2020-05-28 at 11.53.25 AM.pngScreenshot 2020-05-28 at 11.53.36 AM.png


On Thu, May 28, 2020 at 11:25 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Oh wait, you've already sent. Will try at our end.

On Thu, May 28, 2020 at 11:15 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Scobey,

Can you please share the table DDL with some sample records CSV to simulate the issue at our end ?

On Thu, May 28, 2020 at 11:13 AM Scobey Weaver <scobey49@verizon.net> wrote:
Dear Aditya,

I did click on more details. I've attached a screen shot of the result.

Thanks,

Scobey

On 5/28/20 12:06 AM, Aditya Toshniwal wrote:
Hi Scobey,

Did you click on more details on the import progress notifier ? It would give you more logs to help. 

On Thu, May 28, 2020 at 6:52 AM Ahmed, Nawaz (Fuji Xerox Australia) <Nawaz.Ahmed@aus.fujixerox.com> wrote:
Are you running this import into a database in Linux environment or a Windows environment ?

I am guessing (I could be wrong), it has something to do with control characters in your datafile such as ^M or ^H, which are usually visible if you edit the file in a Linux host using 'vi' editor.

And what is the import command are you using, is it a COPY command ?

~

Nawaz


-----Original Message-----
From: Scobey Weaver <scobey49@verizon.net>
Sent: Thursday, 28 May 2020 6:11 AM
To: pgadmin-support@lists.postgresql.org
Subject: Import question

I'm taking a skillshare course and creating my own tables.  I tried to import some data from a csv file and it didn't work. I thought I had done it just like the example on the video, and also checked some other online sources which seemed to do it the same way.

Attached is the file I'm trying to import.

The table I'm importing to was created as follows:

CREATE TABLE public.markets
(
     id integer NOT NULL,
     "Market" character varying(50) COLLATE pg_catalog."default" NOT NULL,
     CONSTRAINT markets_pkey PRIMARY KEY (id),
     CONSTRAINT unique_market UNIQUE ("Market")
)

TABLESPACE pg_default;

ALTER TABLE public.markets
     OWNER to postgres;
COMMENT ON TABBLE public.markets
     IS 'Market used as the price index (posted, Platts, Opis, Argus, etc...)';

The import fails with the following error:  Failed (exit code -6)

I can't find "exit code -6" anywhere.  What's wrong with my import?

I've had one reply to this that brought up encoding.  I left the encoding blank at first, as did the instructor in the skillshare video. Since then I've tried the UTF8 suggested by the person who brought it up.  I also tried BIG5, EUC_CN, SQL_ASCII and WIN1250.

All efforts ended with the same result. Is there a list of exit codes anywhere?  What's "exit code -6"?

Thanks,

Scobey







IMPORTANT NOTE: Fuji Xerox email transmission, including any attachments, is private and confidential and may contain legally privileged information. It is for the addressee's attention only. If you are not the intended recipient and have received this transmission, you must not use, edit, print, copy or disclose its contents to any person or disseminate the information contained herein or hereto attached, and you must notify sender immediately by return email and delete this transmission from your system. Any confidentiality, privilege or copyright is not waived or lost because this e-mail has been sent to you in error. We have used reasonable efforts to protect this transmission from computer viruses and other malicious software, but no warranty is made and the sender takes no responsibility for any loss or damage incurred from using this email or the information contained in this email.


--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"




--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


Attachment