pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hitesh Patel <hitesh@presys.com>
To: pgsql-interfaces@postgresql.org
Subject: Getting INSERT values on a trigger
Date: Tue, 11 Jul 2000 14:59:22 -0700
Message-ID: <396B98BA.4263CAAB@presys.com> (raw)

I am trying to use a C function to get the values inputted for a given
row.  I have defined the trigger as:

	CREATE TRIGGER test AFTER INSERT OR UPDATE OR DELETE on testrel FOR
EACH ROW EXECUTE PROCEDURE testfunc();

Now say if I do a 'INSERT INTO testrel VALUES('1','string');' how can I
grab the values for each field within testfunc() and act on them (in
this case spit them out to another file)?

I have read the docs and can't seem to find how to retrieve the
values...

-- 
+---------------------------------+----------------------------+
| Hitesh Patel                    |  Voice: (541) 759-3126     |
|                                 |  Fax:   (541) 759-3214     |
| Preferred Communications Inc.	  |  Email: hitesh@pciwest.net |
+---------------------------------+----------------------------+

perl -e 'print pack("B*", "0100100100100000011101000110100001" .
"101001011011100110101100100000010010010010000001100100011100" .
"100110000101101110011010110010000001110011011011110110110101" .
"100101001000000110001001100001011001000010000001001110011110" .
"010111000101110101011010010110110000001010");'



Message-ID: <396B98BA.4263CAAB@presys.com>
Permalink:  ../396B98BA.4263CAAB@presys.com/
Also on:    postgresql.org/message-id/396B98BA.4263CAAB@presys.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-interfaces@postgresql.org
  Cc: hitesh@presys.com
  Subject: Re: Getting INSERT values on a trigger
  In-Reply-To: <396B98BA.4263CAAB@presys.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