Subject: float4 problems

From: [email-masked] (Gregory Klein)
Date: Thu, 21 Nov 91 11:56:17 -0800

Has anyone else experience a problem using float4 attribute types? I have
notice two problems:

1. append will not work for float4 attributes

Example:
* create testrec (num1=int4, fnum1=float4) \g
*  append testrec (num1=3, fnum1=6.5) \g
* retrieve (testrec.all)
\g

Query sent to backend is "retrieve (testrec.all) "
-----------------------------
| num1        | fnum1       |
A
-----------------------------
| 3           | 0.00000e+00 |
-----------------------------

2. Replace will not work with with float4

Examples:
* replace testrec(fnum1=4.4) where num1=3 \g

Query sent to backend is "replace testrec(fnum1=4.4) where num1=3 "
WARN:Nov 21 11:49:20:type id lookup of 356 failed

Go
*  replace testrec(fnum1=4.4::float4) where num1=3 \g

Query sent to backend is "replace testrec(fnum1=4.4::float4) where num1=3 "
WARN:Nov 21 11:49:57:type id lookup of 356 failed

Go
* replace testrec(fnum1=4.4::float4) \g

Query sent to backend is "replace testrec(fnum1=4.4::float4) "
REPLACE
Go
* retrieve (testrec.all)
\g

Query sent to backend is "retrieve (testrec.all) "
-----------------------------
| num1        | fnum1       |
-----------------------------
| 3           | 0.00000e+00 |
-----------------------------

Help!!

Greg Klein
Lawrence Berkeley Laboratory

One extra note: I believe the problem may have started after installing 
the heaptuple.c and the fmgr.c bugfixes that were posted last September.

---

From: postarch (Postgres Mailing Archive)
Date: Thu, 21 Nov 91 12:13:15 PST

> Query sent to backend is "retrieve (testrec.all) "
This is a well known problem in the current system.  To get around it
use a cast.  Remember that all casts must be in double-quotes.

	append testrec (num1=3, fnum1="6.5"::float4) \g
	replace testrec(fnum1="4.4"::float4) \g

Jeff Meredith
[email-masked]