Re: Syntax Issue in Trigger Function??

From: Andre Maasikas <andre(dot)maasikas(at)abs(dot)ee>
To: tsarevich(at)gmail(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Syntax Issue in Trigger Function??
Date: 2004-09-28 19:46:31
Message-ID: 4159BF97.10505@abs.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

tsarevich(at)gmail(dot)com wrote:
> In Postgres 7.3.5 -
> When we try to insert a new record into our parties.party table which
> is then meant to fire off a trigger to update a column in the table
> with some de-normalised information, we get the following error:
> ERROR: FLOATING POINT EXCEPTION! The last floating point operation
> either exceeded the legal ranges or was a divide by zero.
>
> Can someone help spot our syntax erorr, please?

This looks to me like a candidate:
> v_ref := \'\'/\'\';
Without escaping it looks like v_ref := ''/'';
dividing 2 empty strings, and indeed gives
division by zero in psql. What dividing 2 strings is actually
supposed to mean is not evident form the docs in the first glance.

> v_ref := \'\'/\'\' || v_parent_party_id || v_ref;

This one too.

Andre

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Geisler, Jim 2004-09-28 19:47:22 PostgreSQL Installation Question
Previous Message Ed L. 2004-09-28 19:36:27 Re: Pgsql 7.4/8.0 on IA64 HP-UX 11i?