[HACKERS] float4 confused as int??

From: Ed Loehr <eloehr(at)austin(dot)rr(dot)com>
To: pghackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [HACKERS] float4 confused as int??
Date: 2000-01-31 04:49:25
Message-ID: 38951455.28A436A@austin.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Can someone enlighten me why this error is occurring in which a float
value is apparently being interpreted as an integer? Known
workarounds??

emsdb=> UPDATE contract_activity_type SET duration = 3.5, updater_id
= 1, last_update = now() WHERE id = 72;
ERROR: pg_atoi: error in "3.5": can't parse ".5"
emsdb=> \d contract_activity_type
Table = contract_activity_type
+----------------------------------+----------------------------------+-------+
| Field | Type
| Length|
+----------------------------------+----------------------------------+-------+
| id | int4 not null default nextval (
| 4 |
| contract_id | int4 not null
| 4 |
| activity_type_id | int4 not null
| 4 |
| travel_required | int4 not null
| 4 |
| billable | int4 not null
| 4 |
| duration | float4 not null
| 4 |
...

Thanks in advance.

Cheers,
Ed Loehr

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sven Paepke 2000-01-31 10:05:38 C++ examples for Postgres
Previous Message Ed Loehr 2000-01-30 22:03:11 [GENERAL] float4 confused as int??

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2000-01-31 08:41:51 Re: [HACKERS] END/ABORT
Previous Message Bruce Momjian 2000-01-31 02:18:51 Re: [HACKERS] Another nasty cache problem