Problems Importing table to pgadmin

Поиск
Список
Период
Сортировка
От metaresolve
Тема Problems Importing table to pgadmin
Дата
Msg-id 1481152414407-5933807.post@n3.nabble.com
обсуждение исходный текст
Ответы Re: Problems Importing table to pgadmin
Список pgsql-general
Hi,

pgAdmin 4
Windows 10

I'm brand new and struggling. I was able to create a table with the CREATE
TABLE command and set up the columns. However, when I try to "import"
nothing happens, at all. I import the table and hit Ok and nothing happens.
If I SELECT * from [table] I get no rows back. I'm not sure what I'm doing
wrong.

This is the query i used to create the table:

CREATE TABLE cc_20161207 (
status varchar(1),
precinct_num varchar(4),
congress varchar(1),
assembly varchar(2),
senate varchar(2),
commission varchar(1),
education varchar(1),
regent varchar(2),
school varchar(1),
city varchar(3),
ward varchar(3),
township varchar(3),
first_name varchar(20),
middle_name varchar(20),
last_name varchar(30),
name_suffix varchar(3),
sex varchar(1),
party_reg varchar(3),
birth_year varchar(4),
phone_num varchar(12),
res_street_num varchar(6),
res_direction varchar(2),
res_street_name varchar(25),
res_address_type varchar(4),
res_unit varchar(20),
res_city varchar(40),
res_state varchar(2),
res_zip_code varchar(5),
mail_address varchar(32),
mail_city varchar(50),
mail_state varchar(2),
mail_zip_code varchar(5),
activity_date varchar(10),
registration_date varchar(10),
registration_num varchar(9),
language_pref varchar(10),
polling_code varchar(3),
confidential_flag varchar(1),
id_not_reqd varchar(1),
affidavit varchar(45),
election1 varchar(4),
vote_type1 varchar(1),
election2 varchar(4),
vote_type2 varchar(1),
election3 varchar(4),
vote_type3 varchar(1),
election4 varchar(4),
vote_type4 varchar(1),
election5 varchar(4),
vote_type5 varchar(1),
election6 varchar(4),
vote_type6 varchar(1),
election7 varchar(4),
vote_type7 varchar(1),
election8 varchar(4),
vote_type8 varchar(1),
election9 varchar(4),
vote_type9 varchar(1),
election10 varchar(4),
vote_type10 varchar(1),
election11 varchar(4),
vote_type11 varchar(1),
election12 varchar(4),
vote_type12 varchar(1),
election13 varchar(4),
vote_type13 varchar(1),
election14 varchar(4),
vote_type14 varchar(1),
election15 varchar(4),
vote_type15 varchar(1),
election16 varchar(4),
vote_type16 varchar(1),
election17 varchar(4),
vote_type17 varchar(1),
election18 varchar(4),
vote_type18 varchar(1),
election19 varchar(4),
vote_type19 varchar(1),
election20 varchar(4),
vote_type20 varchar(1)
    );

However, when I look at the table it's got the OID fields in there. From
what I read, the default is set to off, so I don't understand why they're
creating them.

<http://postgresql.nabble.com/file/n5933807/30652992334_36a60a0fed.jpg>

I think this is the problem because the main error I'm getting is the 42601
that, when I googled, seemed to mean it was trying to import a table with a
different amount of fields.

I tried to ALTER TABLE to drop the OID columns but no luck.
When I try to COPY cc_20161207 from "file" I get this error:

<http://postgresql.nabble.com/file/n5933807/30685290943_4a7c7136ce.jpg>

When I try to right-click on the table and import, I go through the dialogue
and click "OK" but nothing ever happens.

Can someone help me with where I'm going wrong?
Thanks,
meta



--
View this message in context: http://postgresql.nabble.com/Problems-Importing-table-to-pgadmin-tp5933807.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: warning about oom_adj with PG 9.4 logger
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Problems Importing table to pgadmin