Selectively Filling PostgreSQL Lookup Table -


i followed tutorial create postgresql lookup table following schema:

create table public.link_categories (  id integer not null default   nextval('link_categories_id_seq'::regclass),  name character varying(16) not null,  description text,  constraint link_categories_pkey primary key (id) ) (  oids=false ); alter table public.link_categories  owner postgres; 

as understand it, first field numerical "sequence" key doesn't need populated; automatically fills numerals add or delete rows.

i want fill second field data spreadsheet, , have nothing put in third field @ moment.

so copied 1 field want import new spreadsheet, added field on either side of it. have three-column table data in center column only. saved csv file.

when try import it, following error:

warning: null value in column "id" violates non-null constraint

how can fill table data 1 csv file, using postgresql 9.5 , pgadmin iii?

i assume using copy?

you can specify columns insert. in case, need specify 3 columns in csv (in same order). otherwise assume columns.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -