By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,806 Members | 1,367 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,806 IT Pros & Developers. It's quick & easy.

pl/pythonu and Triggers

P: n/a
C G
Dear All,

I'm trying to use pythonu and triggers, but can't seem to get it to work.
Could someone give me an example of it in action. For example, could someone
supply the CODE in the function below that ignores whatever is inserted and
puts in 'hello' 'World' instead?

Thanks

Colin

CREATE TABLE t1 (col1 text, col2 text);

CREATE FUNCTION simple() RETURNS TRIGGER AS'
CODE
'LANGUAGE plpythonu;

CREATE TRIGGER simple BEFORE insert
on t1 FOR EACH ROW EXECUTE
PROCEDURE simple();

__________________________________________________ _______________
Stay in touch with absent friends - get MSN Messenger
http://www.msn.co.uk/messenger
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 22 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.