Re: [HACKERS] ERROR: Unable to identify an operator '=' for types 'numeric' and 'float8' - Mailing list pgsql-hackers

From wieck@debis.com (Jan Wieck)
Subject Re: [HACKERS] ERROR: Unable to identify an operator '=' for types 'numeric' and 'float8'
Date
Msg-id m12LHCo-0003kgC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to RE: [HACKERS] ERROR: Unable to identify an operator '=' for types 'numeric' and 'float8'  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Responses Re: [HACKERS] ERROR: Unable to identify an operator '=' for types 'numeric' and 'float8'
List 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,
choosethe 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) #




pgsql-hackers by date:

Previous
From: Chris Bitmead
Date:
Subject: psql problem
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] ERROR: Unable to identify an operator '=' for types 'numeric' and 'float8'