X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 816B4475F1B for ; Tue, 29 Apr 2003 07:31:34 -0400 (EDT) Received: from anchor-post-35.mail.demon.net (anchor-post-35.mail.demon.net [194.217.242.85]) by postgresql.org (Postfix) with ESMTP id D4ECC4762E1 for ; Tue, 29 Apr 2003 07:30:58 -0400 (EDT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-35.mail.demon.net with esmtp (Exim 3.36 #2) id 19ATK5-0000ib-0Z; Tue, 29 Apr 2003 12:30:58 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id E14F816B58; Tue, 29 Apr 2003 12:30:55 +0100 (BST) Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id 56DB416435; Tue, 29 Apr 2003 12:30:55 +0100 (BST) Content-Type: text/plain; charset="utf-8" From: Richard Huxton Organization: Archonet Ltd To: Rado Petrik , PostgreSQL-mailinglist Subject: Re: ALERT column Date: Tue, 29 Apr 2003 12:31:21 +0100 User-Agent: KMail/1.4.3 References: <1051607665.777.12.camel@caj> In-Reply-To: <1051607665.777.12.camel@caj> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200304291231.21951.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Spam-Status: No, hits=-37.0 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,NO_DNS_FOR_FROM, QUOTED_EMAIL_TEXT,REFERENCES,REPLY_WITH_QUOTES, UPPERCASE_25_50,USER_AGENT_KMAIL autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/425 X-Sequence-Number: 13126 On Tuesday 29 Apr 2003 10:14 am, Rado Petrik wrote: > Hi , > > > I have column dt_created type "timestamptz" > > and I need set default value "now()" in exist database. No new !! > > This example is not good . > > ALTER TABLE user ALERT COLUMN dt_created SET DEFAULT=3Dnow(); Correct syntax is: ALTER TABLE user ALTER COLUMN dt_created SET DEFAULT now(); See the SQL Commands reference chapter in the manual for full details. --=20 Richard Huxton