I would like to force the auto increment field of a table to some value, unfortunately my query seems to fail
ALTER SEQUENCE categories_categoryid_seq RESTART WITH 1;
ERROR: relation "your_sequence_name" does not exist
My table categories
has the following columns:
- categoryid
- functions
- name
Edit: my Create query:
-- Table: public.categories
-- DROP TABLE public.categories;
CREATE TABLE public.categories
(
categoryid bigint NOT NULL,
functions character varying(255) COLLATE pg_catalog."default" NOT NULL,
name character varying(255) COLLATE pg_catalog."default" NOT NULL,
CONSTRAINT categories_pkey PRIMARY KEY (categoryid)
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;
ALTER TABLE public.categories
OWNER to postgres;