From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | impala <bhnnc(at)yahoo(dot)co(dot)uk> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Auto Insert date/time |
Date: | 2002-04-08 07:30:05 |
Message-ID: | 20020408173005.A2600@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sun, Apr 07, 2002 at 11:06:54PM -0700, impala wrote:
> What 'serial' does for auto incrementation of intgers,
> are there something similar in PSQL where the db can
> autoinsert the correct date/time data each time you
> add a new row , without have to specify the code e.g.
> Date() class in a java/C++ file? If well, how do I
> manage to make this work? Is there maybe an PSQL
> function which can do it? AN example will be nice :)
At a guess, you would set the default value of the column to now(). I
beleive this is in the docs somewhere...
HTH,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Ignorance continues to thrive when intelligent people choose to do
> nothing. Speaking out against censorship and ignorance is the imperative
> of all intelligent people.
From | Date | Subject | |
---|---|---|---|
Next Message | Denis Gasparin | 2002-04-08 07:54:50 | Re: binary data storage |
Previous Message | Samuele Brignoli | 2002-04-08 07:16:11 | I: Migrating a very large db |