Re: [HACKERS] ERROR: Unable to identify an operator '=' for types 'numeric' and 'float8'

Jan Wieck <wieck@debis.com>

From: wieck@debis.com (Jan Wieck)
To: Hiroshi Inoue <Inoue@tpf.co.jp>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Thomas Lockhart <lockhart@alumni.caltech.edu>, Michael Meskes <meskes@postgreSQL.org>, PostgreSQL Hacker <pgsql-hackers@postgreSQL.org>
Date: 2000-02-17T03:02:14Z
Lists: pgsql-hackers
[Charset iso-2022-jp unsupported, skipping...]
>:-{

> > -----Original Message-----
> > From: owner-pgsql-hackers@postgreSQL.org
> > [mailto:owner-pgsql-hackers@postgreSQL.org]On Behalf Of Tom Lane
> >
> > Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
> > > One hesitation I have is the performance hit in mixing FLOAT and
> > > NUMERIC; I (probably) don't want to make NUMERIC the "best" numeric
> > > type, since it is potentially so slow.
> >
> > I concur --- I'd be inclined to leave FLOAT8 as the top of the
> > hierarchy.  But NUMERIC could be stuck in there between int and float,
> > no?  (int-vs-numeric ops certainly must be promoted to numeric...)
> >
>
> Is this topic related to the fact that 1.1 is an FLOAT8 constant in
> PostgreSQL ?
> I've not understood at all why it's OK.

    IMHO  a  value  floating  around should be kept NUMERIC or in
    it's string representation until it's finally clear where  it
    is dropped (int2/4/8, float4/8, numeric or return to client).

    This surely has an impact on performance,  but  from  my  PoV
    beeing   correct   has   a  higher  priority.   If  you  want
    performance, buy well sized hardware depending on application
    and  workload.  If  you  want  reliability,  choose the right
    software.

    Don't force it, use a bigger hammer!


Jan

    BTW: I still intend to redo the NUMERIC type somewhere in the
    future. Just haven't found the time though.

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #