Excellent, I got it working...Thanks ;)
Abdul-Wahid
On 5/9/05, Mike Nolan <[EMAIL PROTECTED]> wrote:
> > So how can I create a trigger to automatically update the hash fields
> > on updates and inserts?
>
> Something like the following works for me:
>
> create or replace function public.my_trig
> So how can I create a trigger to automatically update the hash fields
> on updates and inserts?
Something like the following works for me:
create or replace function public.my_trigger()
returns trigger as '
NEW.hashfield = hashfunction(NEW.data1,NEW.data2);
RETURN NEW;
END;
' language 'plpgsq
Hi,
I have created a simple plpgsql function as follows as included below.
The function works fine but I need to have this done automatically on
updates and inserts. So I have a table
CREATE TABLE addresses (
address_id serial PRIMARY KEY,
companyvarchar(250),
fnamevarchar