Re: [HACKERS] money type overflow checks

2016-08-11 Thread Peter Eisentraut
On 8/5/16 1:14 PM, Tom Lane wrote: > No, I don't think it's sufficient after a multiplication by 10. That > would be enough to shift some bits clear out of the word, but there's > no certainty that the new sign bit would be 1. > > The scheme used in scanint8 is safe. But I think it was written t

Re: [HACKERS] money type overflow checks

2016-08-05 Thread Tom Lane
Peter Eisentraut writes: > The input function of the money type has no overflow checks: Ugh. > (Is checking for < 0 a valid overflow check? No, I don't think it's sufficient after a multiplication by 10. That would be enough to shift some bits clear out of the word, but there's no certainty th

[HACKERS] money type overflow checks

2016-08-05 Thread Peter Eisentraut
The input function of the money type has no overflow checks: => select '12345678901234567890'::money; money - -$13,639,628,150,831,692.72 (1 row) The tests in the regression test file money.sql are bogus because they only test the overflow checks of the bi

Re: [HACKERS] Money type clarity

2007-10-08 Thread Euler Taveira de Oliveira
Joshua D. Drake wrote: > The docs since 7.3 have declared the money type deprecated.. that is an > awful long time. Can we get some clarity on the issue? > IMHO it's not but it certainly need some more work on the storage (numeric?) and locale part as already discussed. -- Euler Taveira de

[HACKERS] Money type clarity

2007-10-08 Thread Joshua D. Drake
Hello, The docs since 7.3 have declared the money type deprecated.. that is an awful long time. Can we get some clarity on the issue? If it isn't deprecated cool, I will submit a patch to docs. Sincerely, Joshua D. Drake -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Su

Re: [HACKERS] Money type todos?

2007-03-21 Thread August Zajonc
Shane Ambler wrote: > August Zajonc wrote: >> For balance sheet accounts, their value at a given point in time in a >> home currency is of course dependent on exchange rates which creates the >> currency gain or loss on the P&L side, the account that captures >> exchange rate movements. But this i

Re: [HACKERS] Money type todos?

2007-03-21 Thread Brian Hurt
Shane Ambler wrote: August Zajonc wrote: Agreed with Tom on this one. Full usage of money is beyond tagged types etc. For example, when you earn money in another currency, it is the time at which you earn it that describes its value. So for P&L accounts there is generally no change in exchange

Re: [HACKERS] Money type todos?

2007-03-21 Thread Shane Ambler
August Zajonc wrote: Agreed with Tom on this one. Full usage of money is beyond tagged types etc. For example, when you earn money in another currency, it is the time at which you earn it that describes its value. So for P&L accounts there is generally no change in exchange rates over time and yo

Re: [HACKERS] Money type todos?

2007-03-21 Thread August Zajonc
Andrew Dunstan wrote: > August Zajonc wrote: >> The only other nice thing would be user defined precision, but >> can live without that as most currencies work under nnn.mm. > > That's useless for our system at least. The minimum scale we use for > money values is 5. I guess we can just continue

Re: [HACKERS] Money type todos?

2007-03-21 Thread D'Arcy J.M. Cain
On Wed, 21 Mar 2007 02:13:54 -0700 August Zajonc <[EMAIL PROTECTED]> wrote: > Agreed with Tom on this one. Full usage of money is beyond tagged types > etc. For example, when you earn money in another currency, it is the > time at which you earn it that describes its value. So for P&L accounts > th

Re: [HACKERS] Money type todos?

2007-03-21 Thread D'Arcy J.M. Cain
On Wed, 21 Mar 2007 02:31:44 -0400 Tom Lane <[EMAIL PROTECTED]> wrote: > Dennis Bjorklund <[EMAIL PROTECTED]> writes: > > Tom Lane skrev: > >> Whether it is actually ever going to disappear is not agreed upon. > > > What is the reason to keep it? > > The words-of-one-syllable answer is that D'Arc

Re: [HACKERS] Money type todos?

2007-03-21 Thread Andrew Dunstan
August Zajonc wrote: The only other nice thing would be user defined precision, but can live without that as most currencies work under nnn.mm. That's useless for our system at least. The minimum scale we use for money values is 5. I guess we can just continue to use numeric though. cheers

Re: [HACKERS] Money type todos?

2007-03-21 Thread August Zajonc
Tom Lane wrote: > Dennis Bjorklund <[EMAIL PROTECTED]> writes: >> Tom Lane skrev: >>> Whether it is actually ever going to disappear is not agreed upon. > >> What is the reason to keep it? > > The words-of-one-syllable answer is that D'Arcy Cain is still willing > to put work into supporting the

Re: [HACKERS] Money type todos?

2007-03-21 Thread db
> Dennis Bjorklund <[EMAIL PROTECTED]> writes: >> What is the reason to keep it? > > The words-of-one-syllable answer is that D'Arcy Cain is still willing > to put work into supporting the money type, and if it still gets the > job done for him then it probably gets the job done for some other > p

Re: [HACKERS] Money type todos?

2007-03-20 Thread Tom Lane
Dennis Bjorklund <[EMAIL PROTECTED]> writes: > Tom Lane skrev: >> Whether it is actually ever going to disappear is not agreed upon. > What is the reason to keep it? The words-of-one-syllable answer is that D'Arcy Cain is still willing to put work into supporting the money type, and if it still g

Re: [HACKERS] Money type todos?

2007-03-20 Thread Dennis Bjorklund
Tom Lane skrev: The money type is considered deprecated. I was also under the impression it would be eventually removed. Why are we accumulating TODOs for it? Because doing the TODOs would remove the reasons for deprecating it. Whether it is actually ever going to disappear is not agreed upon.

Re: [HACKERS] Money type todos?

2007-03-20 Thread Neil Conway
D'Arcy J.M. Cain wrote: On Tue, 20 Mar 2007 11:24:00 -0700 "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: # -Make 64-bit version of the MONEY data type Actually, this TODO is DONE. It's in HEAD now. That is what the "-" prefix denotes. -Neil ---(end of br

Re: [HACKERS] Money type todos?

2007-03-20 Thread D'Arcy J.M. Cain
On Tue, 20 Mar 2007 11:24:00 -0700 "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: > The money type is considered deprecated. I was also under the impression > it would be eventually removed. Why are we accumulating TODOs for it? > > # -Make 64-bit version of the MONEY data type Actually, this TODO

Re: [HACKERS] Money type todos?

2007-03-20 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > The money type is considered deprecated. I was also under the impression > it would be eventually removed. Why are we accumulating TODOs for it? Because doing the TODOs would remove the reasons for deprecating it. Whether it is actually ever going t

[HACKERS] Money type todos?

2007-03-20 Thread Joshua D. Drake
Hello, The money type is considered deprecated. I was also under the impression it would be eventually removed. Why are we accumulating TODOs for it? # -Make 64-bit version of the MONEY data type # Add locale-aware MONEY type, and support multiple currencies http://archives.postgresql.org/pgsql-

Re: [HACKERS] Money type

2002-05-16 Thread Tom Lane
"D'Arcy J.M. Cain" <[EMAIL PROTECTED]> writes: > Also somewhat NA centric is the two decimal places. This was originally > meant to be locale driven but that is a problem for other reasons. What > about defaulting it to two decimal places but allowing it to be redefined at > table creation ti

Re: [HACKERS] Money type

2002-05-16 Thread Karel Zak
On Thu, May 16, 2002 at 06:11:43AM -0400, D'Arcy J.M. Cain wrote: > I know that the money type is supposed to be deprecated but I think that Right. > there is still some benefit to it. It is small and fast. There are some > problems and I would like to address them. > > The output has a do

[HACKERS] Money type

2002-05-16 Thread D'Arcy J.M. Cain
I know that the money type is supposed to be deprecated but I think that there is still some benefit to it. It is small and fast. There are some problems and I would like to address them. The output has a dollar sign attached. This is NA centric and we said years ago that we were going to d