Re: [HACKERS] Re: [BUGS] agregate function sum error

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: sferac(at)bo(dot)nettuno(dot)it
Cc: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>, hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Re: [BUGS] agregate function sum error
Date: 1998-02-24 13:29:27
Message-ID: 34F2CB37.C899E12C@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I thing that one of the bigest dificulty of PostgreSQL is how it treats numbers.
> SQL standard says that a number is comparable to, and compatible with, all
> other numbers (that is: all numbers are mutually comparable and mutually
> assignable). I think it means directly, without force it with the CAST or
> functions.

I agree that the numeric (and other) type coersions need some more work. One of the reasons
why we have been reluctant to embed _too_ many automatic coersions into the backend is that
it does not extend well into the type-extensible features of Postgres. But I hope to look at
this some for v6.4.

> and PostgreSQL show him/her this message ?
> WARN: type of my_small does not match target column my_int

this is an example of behavior which I think we _can_ change...

> - Well, if PostgreSQL know what I want why it doesn't do it for me ?
> I know that conversion is more expensive than warnning but it's more
> friendly. What do you think? ;-)

I agree up to a point. Once a user has chosen to use an "optimized data type" like "int2"
rather than "integer" or "int4" then they have also chosen to give up some capabilities of
the generic integer type such as dynamic range. However, some extra conversion stuff can and
should happen, and I have some ideas on how to do this. If any hacker wants to work on it,
let's start talking after the upcoming v6.3 release...

- Tom

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mattias Kregert 1998-02-24 13:32:35 SV: [HACKERS] Re: [BUGS] agregate function sum error
Previous Message Jan Wieck 1998-02-24 13:23:22 Re: [HACKERS] Re: [COMMITTERS] 'pgsql/src/bin/initdb initdb.sh'