I have a table which is:
CREATE SEQUENCE id_seq;
CREATE TABLE public.\"UserInfo\"
(
id bigint NOT NULL DEFAULT nextval(\'id_seq\'),
phone text,
passwor
When generating an artificial primary key of this type it's important to clearly understand that the value of the primary key has no meaning. I'll emphasize that point again - THE VALUE OF THE KEY HAS NO MEANING, and any "meaning" which is ascribed to it by developers, managers, or users is incorrect. It's a value which is unique, non-null, and unchanging - that's it. It does not matter what the number is. It does not matter if it's in some "order" relative to other keys in the table. Do not fall into the trap of believing that these values need to be ordered, need to be increasing, or must in some other manner conform to some external expectations of "how they should look".
Unique. Non-null. Unchanging. That's all you know, and all you need know.
Best of luck.