Re: [GENERAL] auto-increment field : in a simple way

2012-10-11 Thread JC de Villa
st(a smallserial); NOTICE: CREATE TABLE will create implicit sequence "test_a_seq" for serial column "test.a" CREATE TABLE Table "public.test" Column | Type |Modifiers ----+------+-- a | smallint | not null default nextval('test_a_seq'::regclass) -- JC de Villa

Re: [GENERAL] Auto Adjust Age

2011-04-06 Thread JC de Villa
g with a view that calls > date_trunc('year', now() - dob). > > If you must store the age then you have to run a daily batch to make the > bulk update. Theres also the age() function SELECT age(dob); Should give you age - 31 years 5 m