Sorry, typo:
> CREATE TABLE book (id SERIAL NOT NULL, name VARCHAR, authorId SERIAL, CONSTRAINT book_pkey PRIMARY KEY (id));
It should of course be "authorId INTEGER" instead of "authorId SERIAL".