From: | Björn Metzdorf <bm(at)turtle-entertainment(dot)de> |
---|---|
To: | "Alan T(dot) Miller" <amiller(at)hollywood101(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: I was spoiled by the MySQL timestamp field |
Date: | 2003-01-23 12:32:09 |
Message-ID: | 026101c2c2db$7256c230$81c206d4@office.turtleentertainment.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> As someone who is just getting started with PostygreSQL from years working
> with MySQL, it appears that the timestamp data type does not behave in the
> way it did with MySQL. I got used to just defining a column as a timestamp
> and letting the database throw the latest time stamp in there whenever a
row
> was updated. Is there anything simular in PosgreSQL? How can I accomplish
> something simular inside the database, or am I stuck populating the field
in
> some manner as in the following example
There is no such datatype in postgresql. If you just need the current time
inserted on INSERT and not on UPDATE, then you can declare that column with
"default now()". Else you will need to install a trigger, then you can have
exactly the same behaviour as with mysql.
Regards,
Bjoern
From | Date | Subject | |
---|---|---|---|
Next Message | codeWarrior | 2003-01-23 13:20:53 | Re: I was spoiled by the MySQL timestamp field |
Previous Message | Alan T. Miller | 2003-01-23 12:26:31 | I was spoiled by the MySQL timestamp field |