From: Bricklen Anderson <banderson@presinet.com>
To: Ken Winter <ken@sunward.org>
Cc: PostgreSQL pg-sql list <pgsql-sql@postgresql.org>
Subject: Re: Defaulting a column to 'now'
Date: Wed, 14 Dec 2005 10:15:08 -0800
Message-ID: <43A0612C.2010605@presinet.com> (raw)
In-Reply-To: <003501c600d9$b799a1c0$6603a8c0@kenxp>
References: <003501c600d9$b799a1c0$6603a8c0@kenxp>
Ken Winter wrote:
> How can a column’s default be set to ‘now’, meaning ‘now’ as of when
> each row is inserted?
>
>
>
> For example, here’s a snip of DDL:
>
>
>
> create table personal_data (…
>
> effective_date_and_time TIMESTAMP WITH TIME ZONE not null default 'now',…
>
try with now(), instead of now
...
effective_date_and_time TIMESTAMPTZ not null default now()...
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: banderson@presinet.com, ken@sunward.org
Subject: Re: Defaulting a column to 'now'
In-Reply-To: <43A0612C.2010605@presinet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox