Re: trigger question - Mailing list pgsql-general

From Michael Fuhr
Subject Re: trigger question
Date
Msg-id 20050817011721.GA13600@winnie.fuhr.org
Whole thread Raw
In response to trigger question  (Apu Islam <apuislam@gmail.com>)
List pgsql-general
On Tue, Aug 16, 2005 at 07:19:38PM -0500, Apu Islam wrote:
> I have a trigger which is not working properly.
> The error I get is parse error at $1. I am putting the code here for
> someone to see and comment on.

When do you get the error?  When you create the function, or when
the trigger calls it?  What version of PostgreSQL are you using?

>                 INSERT INTO customer_stat VALUES (
> ''NEW.cisconasport'',NEW.h323connecttime,hour,0,0,0,0,0,''p$

The above INSERT command looks odd.  Why do you quote NEW.cisconasport?
Where does the last pair of single quotes having a closing pair?
Where are the closing parenthesis and statement-terminating semicolon?

--
Michael Fuhr

pgsql-general by date:

Previous
From: Apu Islam
Date:
Subject: trigger question
Next
From: Greg Stark
Date:
Subject: Re: table clustering brings joy