Can't figure out how to use now() in default for tsrange column (PG 9.2)

From: Chris Bartlett <c(dot)bartlett(at)paradise(dot)net(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Can't figure out how to use now() in default for tsrange column (PG 9.2)
Date: 2012-07-15 10:25:43
Message-ID: p06240802cc284a239636@[192.168.200.4]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to set [now(), 2049-12-31 00:00:00) as the default for a
tsrange column (Postgres 9.2), but can't figure out how to do it. I'm
either getting syntax errors or now() is being evaluated, so that the
default becomes something like [2012-07-14 14:04:35, 2049-12-31
00:00:00), which is not what I want. Can anyone point me in the right
direction, please?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-07-15 15:19:59 Re: Can't figure out how to use now() in default for tsrange column (PG 9.2)
Previous Message Adrian Klaver 2012-07-15 00:03:31 Re: Is postgresql 9.1.* supporting plpython with python 2.*