How can I get the following snippet to work in postgres:
ALTER TABLE mytable
ADD COLUMN create_time_utc bigint not null
DEFAULT (now() at time zone 'utc');
I want the new column create_time_utc
to be the unix time in milliseconds (i.e number of milliseconds since Unix epoch January 1 1970).
I know I need to convert the postgres timestamp
to a bigint, but I'm not sure how to do that.