Running Postgres 9.6.6. I created a table as follows:
create table person (
id serial primary key,
name text,
role integer references role (id),
phonenumber text);
When I try to insert data as follows:
insert into person values ('This Person',2,'+15105551111');
I get this message:
ERROR: invalid input syntax for integer: 'This Person'
which suggests that Postgres is expecting a value for id
. But if id
is a serial primary key, shouldn't it be autopopulating and autoincrementing?