pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rajesh Kumar Mallah <mallah@trade-india.com>
To: Ramesh Patel <ramesh@banasdairy.coop>
Cc: pgsql-sql@postgresql.org
Subject: Re: Problem in SQL Trigger
Date: Fri, 30 Apr 2004 19:44:10 +0530
Message-ID: <40925F32.1000208@trade-india.com> (raw)
In-Reply-To: <1118.10.1.1.251.1083300498.squirrel@banasdairy.coop>
References: <1118.10.1.1.251.1083300498.squirrel@banasdairy.coop>



Can you tell us about the postgresql versions in 7.3 and 9.0
also post the actuall error message from postgresql.


regds
mallah.

Ramesh Patel wrote:

>
> Hi
> i have one problem in Trigger.
> this trigger alread work
> on Red Hat Linux 7.3 but now i shift to RHL9.0
> in RHL 9.0  not
> working . in this problem in ROUND function.
> but how to i slove this
> i dont know. so please help me.
> This is  Function and
> Trigger.
> /////////////////////////// Function 
> Start//////////////////////////////////////////
> CREATE
> FUNCTION add_issue_fun() returns opaque as'
> BEGIN
> UPDATE
> mtrl_mst
> set balstk_cs = balstk_cs -
> NEW.issueqty_cs,
> balstk_mt = round( cast((balstk_mt -
> NEW.issueqty_mt) as numeric ),4)
> where mtrl_mst.mtrl_code =
> NEW.mtrl_code;
> UPDATE rcpt_detail
> set consqty_cs=consqty_cs +
> NEW.issueqty_cs
> WHERE rcpt_detail.batch_code = NEW.batch_code
>
> and rcpt_detail.mtrl_code = NEW.mtrl_code
> and
> rcpt_detail.loc_code = NEW.loc_code;
> return
> NULL;
> END;'
> language 'plpgsql';
>
> /////////////////////////// 
> Function End//////////////////////////////////////////
> ///////////////////////////Trigger Start 
> //////////////////////////////////////////
> CREATE
> TRIGGER add_issue_trg
> AFTER INSERT ON issue_detail
> FOR EACH
> ROW EXECUTE PROCEDURE add_issue_fun();
>
> /////////////////////////// Trigger 
> End//////////////////////////////////////////
>
> Thanking
>
>
> Ramesh Patel
> Computer Dept.
> Banasdairy, Palanpur
>




view thread (2+ messages)

Message-ID: <40925F32.1000208@trade-india.com>
Permalink:  ../40925F32.1000208@trade-india.com/
Also on:    postgresql.org/message-id/40925F32.1000208@trade-india.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mallah@trade-india.com, ramesh@banasdairy.coop
  Subject: Re: Problem in SQL Trigger
  In-Reply-To: <40925F32.1000208@trade-india.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox