![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
"date" timestamp DEFAULT 'now' |
#2
| |||
| |||
|
|
In versions before 7.4beta3 I use to have tables with "date" timestamp DEFAULT 'now' It use to works properly, placing the actual date at the moment a new record was inserted. Now it always have the same date which correspond to the date at creating the table. From the 7.4 HISTORY file: |
#3
| |||
| |||
|
|
It is a good idea to through out an error during the table creation if the format is not as indicated (now()), because when I created my tables with the old format, it did not show any problem |
#4
| |||
| |||
|
|
I agree that this kind of silent backward-incompatibility isn't good, |
|
Tom, can we improve the upgrade experience in this case? |
#5
| |||
| |||
|
|
It's not like it's hard to fix post-upgrade (or pre-upgrade, for that matter): a simple "ALTER TABLE ... SET DEFAULT now()" will do it. |
#6
| |||
| |||
|
|
On Wed, 2003-10-15 at 02:08, Nayib Kiuhan wrote: In versions before 7.4beta3 I use to have tables with=20 "date" timestamp DEFAULT 'now'=20=20=20 It use to works properly, placing the actual date at the moment a new record was inserted. Now it always have the same date which correspond to the date at creating the table. =20 From the 7.4 HISTORY file: =20 'now' will no longer work as a column default, use now() (change required for prepared statements) (Tom) =20 Admittedly, this change should also be noted in the 'migration to 7.4 section' of the release notes -- I'll send a patch to this effect to pgsql-patches. =20 -Neil =20 =20 =20 |
![]() |
| Thread Tools | |
| Display Modes | |
| |