Re: Import question - Mailing list pgadmin-support

From Scobey Weaver
Subject Re: Import question
Date
Msg-id 05eefc2e-ec4b-cbee-a7a1-c57cd41c9335@verizon.net
Whole thread Raw
In response to RE: Import question  ("Ahmed, Nawaz (Fuji Xerox Australia)" <Nawaz.Ahmed@aus.fujixerox.com>)
List pgadmin-support
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. 






pgadmin-support by date:

Previous
From: Aditya Toshniwal
Date:
Subject: Re: Import question
Next
From: Scobey Weaver
Date:
Subject: Re: Import question