Re: Auto Insert date/time - Mailing list pgsql-general

From Frank Finner
Subject Re: Auto Insert date/time
Date
Msg-id XFMail.020408205432.postgresql@finner.de
Whole thread Raw
In response to Auto Insert date/time  (impala <bhnnc@yahoo.co.uk>)
List pgsql-general
Hi,

something like "INSERT INTO mytable (row1,row2,rowdate) VALUES
('value1','value2',CURRENT_TIMESTAMP)" does that work for me.
The function CURRENT_TIMESTAMP gives exactly, what it´s name says: The
actual timestamp at the time of executing the query.

mfg Frank.


On 08-Apr-02 impala sat down, thought for a long time and then 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 :)
>
> Big Thanks
> Smith
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to
> majordomo@postgresql.org)

--
Frank Finner

Thus we are all responsible for one another, through all the myriad
dimensions of time and space that make up the multiverse . . .
                              (M. Moorcock, "The Revenge Of The Rose")

pgsql-general by date:

Previous
From: Clinton Adams
Date:
Subject: Re: Do I just not understand count()
Next
From: "Gregory Wood"
Date:
Subject: Re: Do I just not understand count()?