From: Jasen Betts <jasen@xnet.co.nz>
To: pgsql-sql@postgresql.org
Subject: Re: Timestamp with timezone with Default value
Date: 19 Jul 2009 12:59:31 GMT
Message-ID: <h3v5bj$q2t$1@reversiblemaps.ath.cx> (raw)
References: <24F73F01AD1B4036A4C3F461ED6759CE@PCGianvito>
On 2009-07-18, Gianvito Pio <pio.gianvito@gmail.com> wrote:
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_0017_01CA0791.49E30EB0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> Hi all,
> how can I define a column of timestamp with timezone type...with a =
> default value?
Same as any other column with a default value.
If you're inserting NULL into the column the NULL will override the
default. Postgres does what you tell it.
If you want the default value use the keyword DEFAULT (in for the
value in that column) or don't mention that column. The DEFAULT
keyword also works with UPDATE.
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: jasen@xnet.co.nz
Subject: Re: Timestamp with timezone with Default value
In-Reply-To: <h3v5bj$q2t$1@reversiblemaps.ath.cx>
* 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