Forum: Ruby on Rails postgresql timeStamp and ruby Time.now???

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7efa1e84afccfab2ab6c528afae4d2aa?d=identicon&s=25 sayoyo (Guest)
on 2007-02-07 23:28
Hi,

I have a postgresql DB table which has "timeStamp" field, I wonder if it
is a good way to store time with ruby-rails "Time.now" with a
"timeStamp" field??? or will it better to store the "Time.now" into a
"varchar" or "text"???

does anyone have an idea?

Thanks you very much

Sayoyo
72eb65fa089082d3bd8b38a5596ad331?d=identicon&s=25 Keynan Pratt (keynan)
on 2007-02-07 23:30
I vote timestamp if you ever want to alter it. but varchar if it is read
only
C041c0b87f840fe5b9145a0e9961d6ec?d=identicon&s=25 Ahmad (Guest)
on 2007-02-08 09:02
(Received via mailing list)
I use timestamp column type. Also, if you name your columns as
created_on and updated_on you don't have to populate it, Rails will do
it automatically for you.
7efa1e84afccfab2ab6c528afae4d2aa?d=identicon&s=25 sayoyo (Guest)
on 2007-02-08 15:59
I will definitively use timeStamp:)

Thanks you very much for the information!!!!

sayoyo


Ahmad wrote:
> I use timestamp column type. Also, if you name your columns as
> created_on and updated_on you don't have to populate it, Rails will do
> it automatically for you.
This topic is locked and can not be replied to.