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

From: wieck(at)debis(dot)com (Jan Wieck)
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, Michael Meskes <meskes(at)postgreSQL(dot)org>, PostgreSQL Hacker <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] ERROR: Unable to identify an operator '=' for types 'numeric' and 'float8'
Date: 2000-02-17 03:02:14
Message-ID: m12LHCo-0003kgC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

[Charset iso-2022-jp unsupported, skipping...]
>:-{

> > -----Original Message-----
> > From: owner-pgsql-hackers(at)postgreSQL(dot)org
> > [mailto:owner-pgsql-hackers(at)postgreSQL(dot)org]On Behalf Of Tom Lane
> >
> > Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)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(at)debis(dot)com (Jan Wieck) #

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-02-17 03:23:46 Re: [HACKERS] ERROR: Unable to identify an operator '=' for types 'numeric' and 'float8'
Previous Message Chris Bitmead 2000-02-17 02:39:10 psql problem