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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: cache lookup failed for function ...



On Donnerstag 30 August 2007, Peter Eisentraut wrote:
> Am Donnerstag, 30. August 2007 12:00 schrieb Rolf Schaufelberger:
> > Meine Grundsätzliche Frage: Wo ist dieses verhalten (caching von
> > Funktionen) dokumentiert und kann man das beeinflussen ? Wann / Wie wird
> > der cache gelöscht ?
>
> Es gibt keine Cache für Funktionen. Da müsste man schon man ein konkreteres
> Beispiel sehen, um zu erkennen, warum es nicht funktioniert.

anbei mal die DEBUG Ausgabe. Sie auch vorherigen antwort an a.Kretschmar.

====================
	select calculate_preis(832);
NOTICE:  Custid = 20002, Currencyid = 1 , Country= DE, Discount = 0
KONTEXT:  SQL statement "SELECT  calculate_preis(  $1 ,  $2 )"
PL/pgSQL function "calculate_preis" line 7 at perform
NOTICE:  Search price for item 2735 article 58
KONTEXT:  SQL statement "SELECT  calculate_preis(  $1 ,  $2 )"
PL/pgSQL function "calculate_preis" line 7 at perform
NOTICE:  No article_price_id
KONTEXT:  PL/pgSQL function "calculate_preis" line 68 at assignment
SQL statement "SELECT  calculate_preis(  $1 ,  $2 )"
PL/pgSQL function "calculate_preis" line 7 at perform
NOTICE:  Search price for item 2736 article 59
KONTEXT:  SQL statement "SELECT  calculate_preis(  $1 ,  $2 )"
PL/pgSQL function "calculate_preis" line 7 at perform
NOTICE:  Search company price
KONTEXT:  PL/pgSQL function "calculate_preis" line 68 at assignment
SQL statement "SELECT  calculate_preis(  $1 ,  $2 )"
PL/pgSQL function "calculate_preis" line 7 at perform
NOTICE:  Search licence price
KONTEXT:  PL/pgSQL function "calculate_preis" line 68 at assignment
SQL statement "SELECT  calculate_preis(  $1 ,  $2 )"
PL/pgSQL function "calculate_preis" line 7 at perform
NOTICE:  Search common price
KONTEXT:  PL/pgSQL function "calculate_preis" line 68 at assignment
SQL statement "SELECT  calculate_preis(  $1 ,  $2 )"
PL/pgSQL function "calculate_preis" line 7 at perform
NOTICE:  Updating 2736 to price 995
KONTEXT:  SQL statement "SELECT  calculate_preis(  $1 ,  $2 )"
PL/pgSQL function "calculate_preis" line 7 at perform
NOTICE:  Search price for item 2737 article 42
KONTEXT:  SQL statement "SELECT  calculate_preis(  $1 ,  $2 )"
PL/pgSQL function "calculate_preis" line 7 at perform
NOTICE:  Updating 2737 to price -99
KONTEXT:  SQL statement "SELECT  calculate_preis(  $1 ,  $2 )"
PL/pgSQL function "calculate_preis" line 7 at perform
SQL statement "SELECT  calculate_preis(  $1 ,  $2 )"
PL/pgSQL function "calculate_preis" line 7 at perform
NOTICE:  Add_bonus: Found item 101, value=10 type=PERC_ALL <====
KONTEXT:  SQL statement "SELECT  add_bonus( $1 )"
PL/pgSQL function "calculate_preis" line 106 at perform
SQL statement "SELECT  calculate_preis(  $1 ,  $2 )"
PL/pgSQL function "calculate_preis" line 7 at perform
NOTICE:  gesamtpreis = 0                                                 <====
KONTEXT:  SQL statement "SELECT  add_bonus( $1 )"
PL/pgSQL function "calculate_preis" line 106 at perform
SQL statement "SELECT  calculate_preis(  $1 ,  $2 )"
PL/pgSQL function "calculate_preis" line 7 at perform
NOTICE:  add_bonus: set preis to 0                                <====
KONTEXT:  SQL statement "SELECT  add_bonus( $1 )"
PL/pgSQL function "calculate_preis" line 106 at perform
SQL statement "SELECT  calculate_preis(  $1 ,  $2 )"
PL/pgSQL function "calculate_preis" line 7 at perform
NOTICE:  Updating pay_order to 1525
KONTEXT:  SQL statement "SELECT  calculate_preis(  $1 ,  $2 )"
PL/pgSQL function "calculate_preis" line 7 at perform
NOTICE:  Updating bilder_item 2735 to 995
KONTEXT:  SQL statement "SELECT  calculate_preis(  $1 ,  $2 )"
PL/pgSQL function "calculate_preis" line 7 at perform
 calculate_preis
-----------------

(1 Zeile)

pgp=#

========================
Man beachte die  Zeilen die ich mit <==== markiert habe. 
Es geht um die Funktion add_bonus.

und dann:
========================
pgp=# select add_bonus(832);
NOTICE:  Add_bonus: Found item 101, value=10 type=PERC_ALL
NOTICE:  gesamtpreis = 995
NOTICE:  add_bonus: set preis to 99
 add_bonus
-----------

(1 Zeile)

pgp=#                 
========================
bzw :

pgp=# select gesamtpreis(832);
 gesamtpreis
-------------
         995
(1 Zeile)

pgp=#  
==============
calculate_preis ruft add_bonus und diese gesamtpreis 


-- 
Rolf Schaufelberger



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group