views:

491

answers:

1

This doesn't work:

create table event (
...
time int default date_part('epoch', timestamp 'now'),
...
);
+1  A: 

I'm no postgresql expert but shouldn't this one work

time int default date_part('epoch', now())
jitter
Or with a bit more modern syntax - "atime INTEGER DEFAULT EXTRACT(EPOCH FROM CURRENT_TIMESTAMP)".
Milen A. Radev