Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle

From: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>, Brendan Jurd <direvus(at)gmail(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle
Date: 2008-11-08 19:39:31
Message-ID: 4915EAF3.5020202@cheapcomplexdevices.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> writes:
>
>> (3) Put something into the dump file that will make the old
>> server reject the file rather than successfully loading
>> wrong data? (Some "if intervalstyle==std and version<8.3
>> abort loading the restore" logic?)
>
> There isn't any way to do that, unless you have a time machine in
> your hip pocket. The trouble with putting
> set intervalstyle = something;
> into the dump script is that older servers will (by default) report
> an error on that line and keep right on chugging.

Not necessarily. Couldn't we put

select * from (select substring(version() from '[0-9\.]+') as version) as a
join (select generate_series(0,100000000000)) as b on(version<'8.4');

set intervalstyle = something;

Or something similar in the dump file.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-11-08 19:42:26 Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle
Previous Message Tom Lane 2008-11-08 19:39:23 Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle