Re: [HACKERS] Floating point timestamps

2016-03-10 Thread Alvaro Herrera
Stephen Frost wrote: > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > Thomas Munro writes: > > > Is the plan to remove support for floating point timestamps at some > > > stage? If so, what is that waiting on, and would it provide > > > sufficient warning if (say) 9.6 were documented as the last majo

Re: [HACKERS] Floating point timestamps

2016-03-10 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Thomas Munro writes: > > Is the plan to remove support for floating point timestamps at some > > stage? If so, what is that waiting on, and would it provide > > sufficient warning if (say) 9.6 were documented as the last major > > release to support that b

Re: [HACKERS] Floating point timestamps

2016-03-10 Thread Tom Lane
Thomas Munro writes: > Is the plan to remove support for floating point timestamps at some > stage? If so, what is that waiting on, and would it provide > sufficient warning if (say) 9.6 were documented as the last major > release to support that build option? AFAIK there is no particular plan t

[HACKERS] Floating point timestamps

2016-03-10 Thread Thomas Munro
Hi, Is the plan to remove support for floating point timestamps at some stage? If so, what is that waiting on, and would it provide sufficient warning if (say) 9.6 were documented as the last major release to support that build option? Thanks! -- Thomas Munro http://www.enterprisedb.com --

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-25 Thread Robert Haas
On Mon, Oct 25, 2010 at 4:35 PM, James Cloos wrote: >> "TL" == Tom Lane writes: > > JC> That said, the possiblity of hex i/o format for the float datatypes > JC> would be welcome. > > TL> It's unportable, for two different reasons: > > TL> 2. The printf specifiers you want us to rely on are n

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-25 Thread James Cloos
> "TL" == Tom Lane writes: JC> That said, the possiblity of hex i/o format for the float datatypes JC> would be welcome. TL> It's unportable, for two different reasons: TL> 2. The printf specifiers you want us to rely on are not standard. They are in C99. TL> 1. pg_dump output would becom

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-25 Thread Tom Lane
James Cloos writes: > That said, the possiblity of hex i/o format for the float datatypes > would be welcome. It's unportable, for two different reasons: 1. pg_dump output would become platform-specific. This is highly undesirable. 2. The printf specifiers you want us to rely on are not standa

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-25 Thread James Cloos
> "JD" == Jeff Davis writes: JD> 2. Fix the input/output functions in a special mode for dump/reload, JD> to make them true inverses. JC> That can be done by supporting the %A printf(3)/scanf(3) format. JD> I don't happen to see a %A format in the man page, but I doubt the JD> output would

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-25 Thread Jeff Davis
On Mon, 2010-10-25 at 13:54 -0400, James Cloos wrote: > > "JD" == Jeff Davis writes: > > JD> 2. Fix the input/output functions in a special mode for dump/reload, > JD>to make them true inverses. > > That can be done by supporting the %A printf(3)/scanf(3) format. I don't happen to see a

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-25 Thread James Cloos
> "JD" == Jeff Davis writes: JD> 2. Fix the input/output functions in a special mode for dump/reload, JD>to make them true inverses. That can be done by supporting the %A printf(3)/scanf(3) format. -JimC -- James Cloos OpenPGP: 1024D/ED7DAEA6 -- Sent via pgsql-hackers mailin

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-21 Thread Robert Haas
On Thu, Oct 21, 2010 at 10:24 PM, Tom Lane wrote: > Bruce Momjian writes: >> Greg Stark wrote: >>> Did we have a solution for the problem that understanding which >>> columns are timestamps requires having a tuple descriptor and parsing >>> the every tuple? That seems like it would a) be slow and

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-21 Thread Greg Stark
On Thu, Oct 21, 2010 at 7:24 PM, Tom Lane wrote: >  Would we be willing to make such assumptions to > support in-place upgrade of timestamps? > If something like that is true (I'm not sure it is) then we could consider doing the equivalent of what we were talking about doing for changes that requ

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-21 Thread Tom Lane
Bruce Momjian writes: > Greg Stark wrote: >> Did we have a solution for the problem that understanding which >> columns are timestamps requires having a tuple descriptor and parsing >> the every tuple? That seems like it would a) be slow and b) require a >> lot of high level code in the middle of

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-21 Thread Bruce Momjian
Greg Stark wrote: > On Thu, Oct 21, 2010 at 4:49 PM, Bruce Momjian wrote: > > One thing we have talked about is converting the page on read-in from > > the backend. ?Since the timestamps are the same size as float or > > integer, that might be possible. > > Did we have a solution for the problem

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-21 Thread Greg Stark
On Thu, Oct 21, 2010 at 4:49 PM, Bruce Momjian wrote: > One thing we have talked about is converting the page on read-in from > the backend.  Since the timestamps are the same size as float or > integer, that might be possible. Did we have a solution for the problem that understanding which colum

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-21 Thread Bruce Momjian
Robert Haas wrote: > On Mon, Oct 18, 2010 at 2:29 PM, Jeff Davis wrote: > > A reasonable conversion path might be to offer integer timestamps using > > a different type name (e.g. inttimestamp) that always means integer > > timestamps. Then, they could convert using ALTER TABLE, then do an > > in-

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-18 Thread Jeff Davis
On Mon, 2010-10-18 at 14:49 -0400, Tom Lane wrote: > whereas an int-timestamp build sees these inputs as all the same. > Thus, to get into trouble you'd need to have a unique index on data that > conflicts at the microsecond scale but not at the tenth-of-a-microsecond > scale. This seems implausib

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-18 Thread Robert Haas
On Mon, Oct 18, 2010 at 2:29 PM, Jeff Davis wrote: > A reasonable conversion path might be to offer integer timestamps using > a different type name (e.g. inttimestamp) that always means integer > timestamps. Then, they could convert using ALTER TABLE, then do an > in-place upgrade. We could even

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-18 Thread Tom Lane
Robert Haas writes: > A more interesting question is whether and how we can ease the > migration path from float timestamps to integer timestamps. Even > without range types, if someone does have a UNIQUE index on a > timestamp column, could they get an error if they dump from a > float-timestamp

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-18 Thread Jeff Davis
On Mon, 2010-10-18 at 14:06 -0400, Robert Haas wrote: > Right. I think your argument that we should "do nothing" upthread is > exactly right. OK. > A more interesting question is whether and how we can ease the > migration path from float timestamps to integer timestamps. Even > without range

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-18 Thread Robert Haas
On Mon, Oct 18, 2010 at 1:12 PM, Tom Lane wrote: > IOW I don't think the range argument holds much water for keeping float > timestamps alive.  The on-disk-compatibility argument does, though. Right. I think your argument that we should "do nothing" upthread is exactly right. Deprecating float

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-18 Thread Tom Lane
Andrew Dunstan writes: > On 10/17/2010 04:40 PM, Tom Lane wrote: >> ... That's assuming that we think there are >> no users who are depending on float timestamps for functionality (they >> have a wider range than int timestamps don't they?). > Yes, they do. > Maybe we need to look at providing a

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-17 Thread Joshua D. Drake
On Sun, 2010-10-17 at 15:52 -0700, Greg Stark wrote: > On Sun, Oct 17, 2010 at 12:03 PM, Joshua D. Drake > wrote: > > The only major distribution that I know of that ships the deprecated > > configuration is RedHat/Fedora. I don't know when that will change. > > > > If only we knew someone in Re

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-17 Thread Greg Stark
On Sun, Oct 17, 2010 at 12:03 PM, Joshua D. Drake wrote: > The only major distribution that I know of that ships the deprecated > configuration is RedHat/Fedora. I don't know when that will change. > If only we knew someone in Redhat :) iirc the issue was binary upgrades. So I suspect the answe

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-17 Thread Joshua D. Drake
On Sun, 2010-10-17 at 16:27 -0400, Tom Lane wrote: > "Joshua D. Drake" writes: > > The only major distribution that I know of that ships the deprecated > > configuration is RedHat/Fedora. I don't know when that will change. > > Red Hat switched to integer datetimes as of 8.4 ... just like upstrea

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-17 Thread Andrew Dunstan
On 10/17/2010 04:40 PM, Tom Lane wrote: At the earliest, we could consider dropping them when we drop support for in-place upgrade from 8.3 --- not only direct upgrade, but through multiple pg_upgrade steps. That's assuming that we think there are no users who are depending on float timestamps

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-17 Thread Tom Lane
Jeff Davis writes: > On Sun, 2010-10-17 at 16:17 -0400, Tom Lane wrote: >> There is maybe some argument for removing the float timestamp code >> altogether, but I think that that's probably premature. They were >> still the default in 8.3, and we are still supporting in-place upgrade >> from 8.3.

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-17 Thread Jeff Davis
On Sun, 2010-10-17 at 16:17 -0400, Tom Lane wrote: > I'm for that one. Anybody working with fractional float timestamps > should already understand that they aren't exact. I can't see the value > of expending any great amount of effort on this. OK. > There is maybe some argument for removing th

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-17 Thread Tom Lane
"Joshua D. Drake" writes: > The only major distribution that I know of that ships the deprecated > configuration is RedHat/Fedora. I don't know when that will change. Red Hat switched to integer datetimes as of 8.4 ... just like upstream. Please don't imagine that you can complain that Red Hat is

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-17 Thread Tom Lane
Jeff Davis writes: > What should be done? I see a few options: > 1. Do nothing. Floating-point timestamps aren't the default, and the bug > reports are likely to be few and far between (but those that encounter > the bug are likely to be very frustrated). I'm for that one. Anybody working with

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-17 Thread Joshua D. Drake
On Sun, 2010-10-17 at 10:00 -0700, David E. Wheeler wrote: > On Oct 17, 2010, at 9:56 AM, Jeff Davis wrote: > > > 3. Somehow deprecate floating point timestamps or make them unusable in > > conjunction with Range Types. I'm not sure if there is demand to keep > > them alive or not. > This seems

Re: [HACKERS] Floating-point timestamps versus Range Types

2010-10-17 Thread David E. Wheeler
On Oct 17, 2010, at 9:56 AM, Jeff Davis wrote: > 3. Somehow deprecate floating point timestamps or make them unusable in > conjunction with Range Types. I'm not sure if there is demand to keep > them alive or not. +1 David -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)

[HACKERS] Floating-point timestamps versus Range Types

2010-10-17 Thread Jeff Davis
I'm working on the design for Range Types for 9.1: http://wiki.postgresql.org/wiki/RangeTypes But I think that floating-point timestamps may pose a problem. In this thread: http://archives.postgresql.org/pgsql-bugs/2010-08/msg00378.php I pointed out that floating-point timestamps can become