Skip site navigation (1) Skip section navigation (2)


From: Iandé Coutinho <iande(at)br(dot)inter(dot)net>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: triggers
Date: 2004-04-15 18:49:57
Message-ID: 001f01c4231a$850cffc0$9a01a8c0@providerst.local (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Afternoon guys, I would be very gratefull if anyone could help me on this
one. I´ve tried looking for examples on it, i know it´s simple, but i can´t
get one, so here goes. I need to create a trigger(after insert), preferebly
in plpgsql, as I have already created the lang using createlang, that, takes
value from 2 columns of the record it´s inserting, and  concatenate together
and insert it into a 3rd column,
for example:

I have a table:


id  | branch | name | uniqueId

on insert into employee(id,branch,name) values(1,1543,"iande");

the trigger would get both id and branch valeus and insert on uniqueId

select * from employee;

id  | branch | name | uniqueId
1  | 1543    | iande | 15431

thanks in advance;


In response to

pgsql-novice by date

Next:From: Michal LijowskiDate: 2004-04-15 19:03:03
Subject: Using SELECT WHERE
Previous:From: Tom LaneDate: 2004-04-15 13:06:09
Subject: Re: any signed decimal data type?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group