Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle - Mailing list pgsql-hackers

From Ron Mayer
Subject Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle
Date
Msg-id 4915035D.60009@cheapcomplexdevices.com
Whole thread Raw
In response to Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle
Next
From: Ron Mayer
Date:
Subject: Re: Patch for SQL-Standard Interval output and decoupling DateStyle from IntervalStyle