Well, this was the first time I tried postgresql... With the current version, postgresql reported error on executing the schema - the exact one described in this thread. So I have changed SERIAL definitions as suggested here and everything is OK now...