473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

pl/pythonu

C G
Dear All,

Could anyone explain why this function does will not work? The error message
is
DETAIL: exceptions.RuntimeError: maximum recursion depth exceeded.

CREATE FUNCTION testing() RETURNS trigger AS'

plan=plpy.prepare(''INSERT INTO t1 values ($1)'',[''text''])
plpy.execute(plan,[''blah''])
return ''MODIFY''

'LANGUAGE plpythonu;

Thanks

Colin

__________________________________________________ _______________
Sign-up for a FREE BT Broadband connection today!
http://www.msn.co.uk/specials/btbroadband
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 22 '05 #1
5 1748
C G wrote:
Dear All,

Could anyone explain why this function does will not work? The error
message is
DETAIL: exceptions.RuntimeError: maximum recursion depth exceeded.

CREATE FUNCTION testing() RETURNS trigger AS'

plan=plpy.prepare(''INSERT INTO t1 values ($1)'',[''text''])
plpy.execute(plan,[''blah''])
return ''MODIFY''

'LANGUAGE plpythonu;


Do you have a trigger on 't1' which invokes testing()?

Mike Mascari

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 22 '05 #2
On Wednesday 11 February 2004 15:56, C G wrote:
Dear All,

Could anyone explain why this function does will not work? The error
message is
DETAIL: exceptions.RuntimeError: maximum recursion depth exceeded.

CREATE FUNCTION testing() RETURNS trigger AS'

plan=plpy.prepare(''INSERT INTO t1 values ($1)'',[''text''])


I know nothing of pl-python, but I don't suppose this is a trigger function on
table t1 is it?

Or, does a trigger on t1 activate an insert on t2, which inserts on t1,
which...
--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 22 '05 #3
On Wed, 11 Feb 2004, C G wrote:
Dear All,

Could anyone explain why this function does will not work? The error message
is
DETAIL: exceptions.RuntimeError: maximum recursion depth exceeded.

CREATE FUNCTION testing() RETURNS trigger AS'

plan=plpy.prepare(''INSERT INTO t1 values ($1)'',[''text''])
plpy.execute(plan,[''blah''])
return ''MODIFY''

'LANGUAGE plpythonu;


Perhaps the plpy.execute is inserting into the same table as the trigger
is on? If that's the case, then the trigger will be recursively called
over and over until the "maximum recursion depth" is "exceeded".
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 22 '05 #4
Here's the link for rules.

http://www.postgresql.org/docs/7.3/s...es-insert.html

Richard Huxton wrote:
On Wednesday 11 February 2004 15:56, C G wrote:
Dear All,

Could anyone explain why this function does will not work? The error
message is
DETAIL: exceptions.RuntimeError: maximum recursion depth exceeded.

CREATE FUNCTION testing() RETURNS trigger AS'

plan=plpy.prepare(''INSERT INTO t1 values ($1)'',[''text''])

I know nothing of pl-python, but I don't suppose this is a trigger function on
table t1 is it?

Or, does a trigger on t1 activate an insert on t2, which inserts on t1,
which...


--
Barbara E. Lindsey,
COG RDC
Phone: (352) 392-5198 ext. 314 Fax: (352) 392-8162

----
CONFIDENTIALITY NOTICE: The information contained in this electronic
message is legally privileged and confidential and intended only for the
use of the individual(s) or entity(ies) named above. If the reader of
this message is not the intended recipient, you are hereby notified that
any dissemination, distribution, or copying of this email or any of it's
components is strictly prohibited. If you have received this email in
error, please contact the sender.
----
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 22 '05 #5
You could write a rule to trigger a record into a table as well.

Richard Huxton wrote:
On Wednesday 11 February 2004 15:56, C G wrote:
Dear All,

Could anyone explain why this function does will not work? The error
message is
DETAIL: exceptions.RuntimeError: maximum recursion depth exceeded.

CREATE FUNCTION testing() RETURNS trigger AS'

plan=plpy.prepare(''INSERT INTO t1 values ($1)'',[''text''])

I know nothing of pl-python, but I don't suppose this is a trigger function on
table t1 is it?

Or, does a trigger on t1 activate an insert on t2, which inserts on t1,
which...


--
Barbara E. Lindsey,
COG RDC
Phone: (352) 392-5198 ext. 314 Fax: (352) 392-8162

----
CONFIDENTIALITY NOTICE: The information contained in this electronic
message is legally privileged and confidential and intended only for the
use of the individual(s) or entity(ies) named above. If the reader of
this message is not the intended recipient, you are hereby notified that
any dissemination, distribution, or copying of this email or any of it's
components is strictly prohibited. If you have received this email in
error, please contact the sender.
----
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ksenia Marasanova | last post by:
Hi, I wonder if anyone on this list is using Python as Postgres procedural language. I can't find a place for it i my mind. How would a typical MVC web application benefit from it (besides...
0
by: C G | last post by:
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...
1
by: Eric D. Nielsen | last post by:
I'm in the process of implementing a "monitor this" type feature on a web-application. When something changes on the monitored item an email to the subscriber is generated. I'd like to do this...
0
by: msy | last post by:
selamlar; Türkiyeden selamlar. Grubunuza yeni katıldım. Pythonu çok merak ediyorum.Yüksek lisans projemi python ile yapmak istiyorum. Gömülü sistemler üzerine bir konu tasarlamayı düşünüyorum....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.