Re: Time Stamp auto Field

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: deepak pal <deepak(dot)05pal(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Time Stamp auto Field
Date: 2006-12-06 15:29:36
Message-ID: 20061206152936.GB12499@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Dec 05, 2006 at 17:31:53 +0530,
deepak pal <deepak(dot)05pal(at)gmail(dot)com> wrote:
> hi can we make a field auto incrementing field using Time Stamp data type

You can use a column default that uses current_timestamp for its expression.
If you also want to handle updates or override cases where people supply
values for that column, then you should look at using before triggers.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bernhard Weisshuhn 2006-12-06 15:32:10 Re: Error in installing compat-postgresql-libs rpm
Previous Message Tom Lane 2006-12-06 15:26:40 Re: Array shift equivalent?