Re: Using an SQL function as a default value in create_table

2017-01-13 Thread Jeremy Evans
On Friday, January 13, 2017 at 6:50:04 AM UTC-8, George Millo wrote: > > I'm using postgresql, and I want to set the default value of a timestamp > column to the current time. If I was writing pure PSQL with a CREATE TABLE > I'd do something like column_name TIMESTAMP DEFAULT clock_timestamp(). I

Using an SQL function as a default value in create_table

2017-01-13 Thread George Millo
I'm using postgresql, and I want to set the default value of a timestamp column to the current time. If I was writing pure PSQL with a CREATE TABLE I'd do something like column_name TIMESTAMP DEFAULT clock_timestamp(). Is there a way I can create a table like this without having to write too muc