Kijk in postgresql-documentatie van datatype serial. Serie is slechts korte hand.
CREATE TABLE tablename (
colname SERIAL
);
is gelijk aan het specificeren van:
CREATE SEQUENCE tablename_colname_seq;
CREATE TABLE tablename (
colname integer NOT NULL DEFAULT nextval('tablename_colname_seq')
);
ALTER SEQUENCE tablename_colname_seq OWNED BY tablename.colname;