From: Rob S. <rslifka@home.com>
To: pgsql-sql@postgresql.org
Subject: Default timestamp value
Date: Mon, 5 Jun 2000 00:34:47 -0700
Message-ID: <001101bfcec0$8683f1e0$39117118@cr699264-a.rct1.bc.wave.home.com> (raw)
As a precursor to this question, I read:
CREATE TABLE
Date/Time Types (and corresponding input/output)
Date/Time Functions
...but I still don't see how to have the default value of a timestamp to be
the time at which the individual record is inserted. I just get the time I
created the table. Specifically, what to put where the '?' is at.
... "TimeDate" TIMESTAMP DEFAULT ? ...
I tried 'now' and 'current' but it just makes the default value the time
when I create the table, and 'current' gives me the word 'current' back in
psql, so I imagine I'm not taking that in quite the right way =) I can see
why it does this for both of these, althought in the docs, it says current
is current time, deferred, but I dunno what that means.
Any help or pointers to a nice resource? IMHO, the PG docs are a great
reference, but not much in the way of terrific examples =)
- r
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: rslifka@home.com
Subject: Re: Default timestamp value
In-Reply-To: <001101bfcec0$8683f1e0$39117118@cr699264-a.rct1.bc.wave.home.com>
References: <001101bfcec0$8683f1e0$39117118@cr699264-a.rct1.bc.wave.home.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox