Skip site navigation (1) Skip section navigation (2)

Re: default timestamp in postresql

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: azah azah <izza76(at)gmail(dot)com>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: default timestamp in postresql
Date: 2004-07-29 07:30:59
Message-ID: 4108A7B3.2080602@familyhealth.com.au (view raw or flat)
Thread:
Lists: pgsql-php
> 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


In response to

Responses

pgsql-php by date

Next:From: azah azahDate: 2004-07-29 07:58:36
Subject: Re: default timestamp in postresql
Previous:From: Michael GlaesemannDate: 2004-07-29 07:22:27
Subject: Re: default timestamp in postresql

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group