I need to create a table with a sequence associated to the gid
column that would start from a given value, say 300. I'd like to know if there is a shorter way to achieve that:
CREATE TABLE mytable (gid INTEGER NOT NULL, size INTEGER);
CREATE SEQUENCE mytable_gid_seq MINVALUE 300;
ALTER TABLE mytable ALTER COLUMN gid SET DEFAULT nextval('mytable_gid_seq'::regclass);
Thanks for help!