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 03:11:25
Message-ID: 4915035D.60009@cheapcomplexdevices.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
>
> ISO date format is read the same regardless of recipient's datestyle,
> so pg_dump solves this by forcing the dump to be made in ISO style.
> The corresponding solution for intervals will be to dump in POSTGRES
> style, not SQL_STANDARD style, which seems a bit unfortunate.

[reading pg_dump.c now]

I wonder if it could be similar to standard_conforming_strings
where it appears to be reading the current value and setting it
to whatever the user chose in the beginning of pg_dump. Then we
could dump in whichever intervalstyle the user prefers. Or,
for 8.4+ dumps we could even force "set intervalstyle = sql_standard;"
in the top of the dump file. For dumps of 8.3 or less we'd need
the non-standard style anyway it seems.

If this seems sane, I can try experimenting with it tonight.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ron Mayer 2008-11-08 03:29:35 Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle
Previous Message Tom Lane 2008-11-08 03:08:24 Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle