pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedimport question
5+ messages / 3 participants
[nested] [flat]
* import question
@ 2020-05-26 16:54 Scobey Weaver <scobey49@verizon.net>
2020-05-26 17:10 ` RE: import question Dave Bolt <dave@davebolt.co.uk>
0 siblings, 1 reply; 5+ messages in thread
From: Scobey Weaver @ 2020-05-26 16:54 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
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.
It gave the following error: Failed (exit code -6)
I've checked what I've done and everything seems to be the same as the
video and everything else I've found on doing an import from csv, but I
can't make it work. I've also searched everywhere I could think of for
"exit code -6"
What is exit code -6?
Thanks,
Scobey
^ permalink raw reply [nested|flat] 5+ messages in thread
* RE: import question
2020-05-26 16:54 import question Scobey Weaver <scobey49@verizon.net>
@ 2020-05-26 17:10 ` Dave Bolt <dave@davebolt.co.uk>
2020-05-26 22:39 ` RE: import question Dave Bolt <dave@davebolt.co.uk>
0 siblings, 1 reply; 5+ messages in thread
From: Dave Bolt @ 2020-05-26 17:10 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
Hi Scobey
I have done imports from CSV in the past (not often), without trouble.
Can you give a little more detail of how you are running the import and the version of PostgreSQL
Regards
Dave
-----Original Message-----
From: Scobey Weaver [mailto:scobey49@verizon.net]
Sent: 26 May 2020 17:54
To: pgsql-admin@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.
It gave the following error: Failed (exit code -6)
I've checked what I've done and everything seems to be the same as the
video and everything else I've found on doing an import from csv, but I
can't make it work. I've also searched everywhere I could think of for
"exit code -6"
What is exit code -6?
Thanks,
Scobey
^ permalink raw reply [nested|flat] 5+ messages in thread
* RE: import question
2020-05-26 16:54 import question Scobey Weaver <scobey49@verizon.net>
2020-05-26 17:10 ` RE: import question Dave Bolt <dave@davebolt.co.uk>
@ 2020-05-26 22:39 ` Dave Bolt <dave@davebolt.co.uk>
2020-05-26 22:59 ` Re: import question David G. Johnston <david.g.johnston@gmail.com>
2020-05-26 23:02 ` Re: import question David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Dave Bolt @ 2020-05-26 22:39 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
Hi Scobey
I tried a quick and dirty test using phpPgAdmin on PostgreSQL 9.6 and it failed, not surprised.
I did get an error indicating that "1" is not a valid field name, which was what I was half expecting.
I inserted a line at the beginning of the file
id,market
In other words, the target field names. This time it objected to record id 12, which is a duplicate of number 5.
Deleted one of them and it worked just fine.
I'm afraid I don't have immediate access to PostgreSQL 12 at the moment, but hope this helps.
(I used lower case field names in my test. I believe you have to double-quote if you include capitals, but you should check the docs).
Also, you should respond to the list so everyone can benefit and chip in. Everyone subscribed to the list will see the thread.
Regards
Dave
-----Original Message-----
From: Scobey Weaver [mailto:scobey49@verizon.net]
Sent: 26 May 2020 21:51
To: Dave Bolt
Subject: Re: import question
Hi Dave,
I'm using pgadmin 4.21 on postreSQL 12 on a macbook pro running macOS 10.12.6.
I ran it by right clicking on the table I wanted to fill and selecting import/export to run the wizard.
The file I'm uploading is attached.
The table I'm importing to was created as:
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 TABLE public.markets
IS 'Market used as the price index (posted, Platts, Opis, Argus, etc...)';
I actually created it using the wizard, also, but it created this SQL query which I'm assuming is the same.
Thanks,
Scobey
On 5/26/20 1:10 PM, Dave Bolt wrote:
> Hi Scobey
> I have done imports from CSV in the past (not often), without trouble.
> Can you give a little more detail of how you are running the import
> and the version of PostgreSQL Regards Dave
>
> -----Original Message-----
> From: Scobey Weaver [mailto:scobey49@verizon.net]
> Sent: 26 May 2020 17:54
> To: pgsql-admin@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.
>
> It gave the following error: Failed (exit code -6)
>
> I've checked what I've done and everything seems to be the same as the
> video and everything else I've found on doing an import from csv, but
> I can't make it work. I've also searched everywhere I could think of
> for "exit code -6"
>
> What is exit code -6?
>
> Thanks,
>
> Scobey
>
>
>
>
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: import question
2020-05-26 16:54 import question Scobey Weaver <scobey49@verizon.net>
2020-05-26 17:10 ` RE: import question Dave Bolt <dave@davebolt.co.uk>
2020-05-26 22:39 ` RE: import question Dave Bolt <dave@davebolt.co.uk>
@ 2020-05-26 22:59 ` David G. Johnston <david.g.johnston@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: David G. Johnston @ 2020-05-26 22:59 UTC (permalink / raw)
To: Dave Bolt <dave@davebolt.co.uk>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
On Tue, May 26, 2020 at 3:39 PM Dave Bolt <dave@davebolt.co.uk> wrote:
> I'm using pgadmin 4.21 on postreSQL 12 on a macbook pro running macOS
> 10.12.6.
>
> I ran it by right clicking on the table I wanted to fill and selecting
> import/export to run the wizard.
>
For future reference pgAdmin is created by a third-party that provides
their own support channels [1]. This mailing list, pgsql_admin, is not for
questions concerning their product but rather questions pertaining to the
general administration of the PostgreSQL server (even though in practice
this list should be discontinued as it gets more mis-postings about pgAdmin
than it does on-topic postings...). This topic is off-topic for this list.
[1] https://www.pgadmin.org/support/list/
David J.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: import question
2020-05-26 16:54 import question Scobey Weaver <scobey49@verizon.net>
2020-05-26 17:10 ` RE: import question Dave Bolt <dave@davebolt.co.uk>
2020-05-26 22:39 ` RE: import question Dave Bolt <dave@davebolt.co.uk>
@ 2020-05-26 23:02 ` David G. Johnston <david.g.johnston@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: David G. Johnston @ 2020-05-26 23:02 UTC (permalink / raw)
To: Dave Bolt <dave@davebolt.co.uk>; Scobey Weaver <scobey49@verizon.net>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
It is customary to inline or bottom-post on these lists.
On Tue, May 26, 2020 at 3:39 PM Dave Bolt <dave@davebolt.co.uk> wrote:
> Also, you should respond to the list so everyone can benefit and chip in.
> Everyone subscribed to the list will see the thread.
>
Actually its reply-all here, the OP in particular may not be subscribed and
thus may not see a response sent only to the list.
David J.
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2020-05-26 23:02 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 16:54 import question Scobey Weaver <scobey49@verizon.net>
2020-05-26 17:10 ` Dave Bolt <dave@davebolt.co.uk>
2020-05-26 22:39 ` Dave Bolt <dave@davebolt.co.uk>
2020-05-26 22:59 ` David G. Johnston <david.g.johnston@gmail.com>
2020-05-26 23:02 ` David G. Johnston <david.g.johnston@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox