Skip site navigation (1) Skip section navigation (2)

Re: [Fwd: [TESTERS] Numerics of diffrent scales Raises Type Mismatch Error in a Set Returning Function]

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [Fwd: [TESTERS] Numerics of diffrent scales Raises Type Mismatch Error in a Set Returning Function]
Date: 2010-03-07 01:45:54
Message-ID: 6645.1267926354@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Josh Berkus <josh(at)agliodbs(dot)com> writes:
> I tested Noel's test case and verified that it does, in fact, break.
> And functions on 8.4.

This is an intentional change, as the previous behavior is obviously
wrong.  Try putting in a value that does not conform to numeric(14,2),
such as 42.7777.  It doesn't get converted.

In some future version we might want to think about applying actual data
conversions in such contexts, but right now the tuple conversion code
just insists on exact datatype matches.

The reason for the behavioral change is that plpgsql, which formerly
had really crummy tuple conversion logic with a whole bunch of other
deficiencies besides this one, now shares the logic used by
ConvertRowtypeExpr.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2010-03-07 02:17:18
Subject: Re: BUG #5348: Postgres crashes with index on xpath_string
Previous:From: Josh BerkusDate: 2010-03-07 01:12:43
Subject: [Fwd: [TESTERS] Numerics of diffrent scales Raises Type Mismatch Error in a Set Returning Function]

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group