Re: Auto Insert date/time
От | Frank Finner |
---|---|
Тема | Re: Auto Insert date/time |
Дата | |
Msg-id | XFMail.020408205432.postgresql@finner.de обсуждение исходный текст |
Ответ на | Auto Insert date/time (impala <bhnnc@yahoo.co.uk>) |
Список | 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 по дате отправления: