Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id B330763247B for ; Sun, 19 Jul 2009 10:00:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 64625-05 for ; Sun, 19 Jul 2009 09:59:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from titania.wxnz.net (titania.wxnz.net [58.28.4.13]) by mail.postgresql.org (Postfix) with ESMTP id 37550632274 for ; Sun, 19 Jul 2009 09:59:54 -0300 (ADT) Received: from gonzo (ip-118-90-142-183.xdsl.xnet.co.nz [118.90.142.183]) by titania.wxnz.net (Postfix) with ESMTP id 31D261DB8331 for ; Mon, 20 Jul 2009 00:59:50 +1200 (NZST) Received: from news by gonzo with local (Exim 4.69) (envelope-from ) id 1MSVzH-0006zp-73 for pgsql-sql@postgresql.org; Mon, 20 Jul 2009 00:59:31 +1200 To: pgsql-sql@postgresql.org Path: not-for-mail From: Jasen Betts Newsgroups: gmane.comp.db.postgresql.sql Subject: Re: Timestamp with timezone with Default value Date: 19 Jul 2009 12:59:31 GMT Organization: Dis (not Dat) Organisation Lines: 20 Message-ID: References: <24F73F01AD1B4036A4C3F461ED6759CE@PCGianvito> NNTP-Posting-Host: localhost Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: reversiblemaps.ath.cx 1248008371 26717 127.0.0.1 (19 Jul 2009 12:59:31 GMT) X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s; a +M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W; (T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6 {T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q; 8 "9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^ User-Agent: slrn/pre1.0.0-2 (Linux) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200907/82 X-Sequence-Number: 32823 On 2009-07-18, Gianvito Pio 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.