postgresql - ALTER table column to timestamp now() properties -


i created table in postgres samples found on internet. definition of column stored is:

stored  | timestamp without time zone | default '2014-04-11 21:19:20.144487'::timestamp without time zone 

how alter "normal" timestamp now() type? stamp current date-time when inserting data?

thank in advance!

if you're trying change default value . . .

alter table your-table-name alter column stored set default current_timestamp 

Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -