for some odd reason when i try to change a table fromserial to just
plain "int with a default" postgres seems to ignore me.
when i dump the schema i get ...
CREATE TABLE custom (
id serial NOT NULL,
name text,
email text,
);
then i run...
alter table custom alter id type int;
alter table custom alter id set default
((nextval('custom_seq'::regclass) * 100) + ((random() * (100)::double
precision))::integer);
after running these 2 alter table commands... i dump the schema ...
and voila... nothing happened....
CREATE TABLE custom (
id serial NOT NULL,
name text,
email text,
);
or did it? the change actually works... i see the new slightly
randomized ids going in nicely
my only problem is that backups aren't going to restore correctly
since the schema dumps wrong