X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4D54ED1B192 for ; Thu, 29 Jul 2004 04:58:45 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 00964-10 for ; Thu, 29 Jul 2004 07:58:37 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.203]) by svr1.postgresql.org (Postfix) with ESMTP id 9769CD1B1C9 for ; Thu, 29 Jul 2004 04:58:34 -0300 (ADT) Received: by mproxy.gmail.com with SMTP id 73so311rnk for ; Thu, 29 Jul 2004 00:58:36 -0700 (PDT) Received: by 10.38.208.34 with SMTP id f34mr3226rng; Thu, 29 Jul 2004 00:58:36 -0700 (PDT) Message-ID: <235b1a2804072900586733ae40@mail.gmail.com> Date: Thu, 29 Jul 2004 15:58:36 +0800 From: azah azah To: Christopher Kings-Lynne Subject: Re: default timestamp in postresql Cc: pgsql-php@postgresql.org In-Reply-To: <4108A7B3.2080602@familyhealth.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <235b1a280407290016621836b4@mail.gmail.com> <4108A7B3.2080602@familyhealth.com.au> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.9 tagged_above=0.0 required=5.0 tests=FROM_ENDS_IN_NUMS X-Spam-Level: X-Archive-Number: 200407/40 X-Sequence-Number: 2865 thanks all, it solve now. On Thu, 29 Jul 2004 15:30:59 +0800, Christopher Kings-Lynne wrote: > > Previously in mysql table field as below , will be add automatic in > > database when execute insert statement. > > > > = submittime timestamp NOT NULL > > > > But in postresql the timestamp cannot insert automatic when execute > > insert statement. > > How can I solve this problem instead of change the php code? > > Make it: > > submittime timestamp not null default current_timestamp > > Chris > >