I know the very basics of databases. I worked in the past with MySQL and recently switched to PostgreSQL (9.1) with PostGIS 2.0.1.

At the moment I'm designing a new database and I use the tool pgModeler for that. In MySQL I could use autoincrement for my primary keys, but PostgreSQL doesn't have that. Some searching showed me that I should use serial instead. There are some small lookup tables in my design which have a smallint as primary key. So I switched them to smallserial, which is an option in pgModeler. Now I'm trying to execute my query and it returns with the error: ERROR: type "smallserial" does not exist

According to the documentation I see now that smallserial is not listed in table 8.2 but later on in the document (8.1.4) it is mentioned. Is this an small error in the documentation or am I missing something like some setting somewhere?


Smallserial has been introduced in core with Postgres 9.2. In earlier version you could emulate it as it is only a short form. Documentation of 9.2 gives a hint for it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.