Re: [GENERAL] schema error upgrading from 7.1 to 7.2
Re: [GENERAL] schema error upgrading from 7.1 to 7.2
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Vivek Khera writes: > "owner_lastbilled" date DEFAULT 'CURRENT_DATE' NOT NULL, The above was never correct. I believe that 7.1's rather lax date parser might have interpreted the literal as being 'current'. 7.2's date parser would reject it, even if 'current' were still an allowed value, which it is not. On the other hand, invoking the function CURRENT_DATE "owner_lastbilled" date DEFAULT CURRENT_DATE NOT NULL, was and remains valid. > This is not documented in the list of changes to the Schema > Manipulation. Because it is not one: it is a datatype behavioral change. regards, tom lane
Re: [GENERAL] schema error upgrading from 7.1 to 7.2
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Vivek Khera writes:
> Then how come pg_dump outputs it that way? Is it because that's how I
> did it when creating the schema in the first place?
Presumably.
> TL> Because it is not one: it is a datatype behavioral change.
> It isn't documented in the HISTORY file in any way shape or form.
HISTORY says, under "Migration to version 7.2":
* The date/time value 'current' is no longer available. You will need to
rewrite your applications.
regards, tom lane
Re: [GENERAL] schema error upgrading from 7.1 to 7.2
От:
Vivek Khera <khera@kcilink.com>
Дата:
>>>>> "TL" == Tom Lane writes: TL> Vivek Khera writes: >> "owner_lastbilled" date DEFAULT 'CURRENT_DATE' NOT NULL, TL> The above was never correct. I believe that 7.1's rather lax date TL> parser might have interpreted the literal as being 'current'. 7.2's Then how come pg_dump outputs it that way? Is it because that's how I did it when creating the schema in the first place? I guess I extended putting the quotes around that because of the warnings about putting quotes around 'NOW()' as a default. My mistake... TL> Because it is not one: it is a datatype behavioral change. It isn't documented in the HISTORY file in any way shape or form. Where else should I look for potential traps in validating my app under 7.2? Thanks.
Re: [GENERAL] schema error upgrading from 7.1 to 7.2
От:
Vivek Khera <khera@kcilink.com>
Дата:
>>>>> "TL" == Tom Lane writes: TL> HISTORY says, under "Migration to version 7.2": TL> * The date/time value 'current' is no longer available. You TL> will need to rewrite your applications. I see now. Thanks. I didn't make the connection between "current" and "CURRENT_DATE".