Re: Volatilità funzioni

From: Gianni Ciolli <gianni(dot)ciolli(at)2ndquadrant(dot)it>
To: pgsql-it-generale(at)postgresql(dot)org
Subject: Re: Volatilità funzioni
Date: 2009-06-11 17:50:22
Message-ID: 20090611175022.GA18884@eee.gi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-it-generale

On Thu, Jun 11, 2009 at 06:50:20PM +0200, Giorgio Valoti wrote:
> Stavo leggendo la documentazione sulla volatilità delle funzioni
> <http://www.postgresql.org/docs/current/static/xfunc-volatility.html> e
> mi stavo chiedendo se una funzione che al suo interno usa degli
> statement di DELETE debba essere definita STABLE o VOLATILE.
>
> Qualcuno ha informazioni precise al proposito?

La documentazione in realtà è abbastanza precisa:

"A VOLATILE function can do anything, including modifying the
database. ..."

"A STABLE function cannot modify the database ..."

"An IMMUTABLE function cannot modify the database and ..."

Quindi dato che la funzione in oggetto modifica il database (un DELETE
è una modifica) deve essere VOLATILE.

Ciao,
Dr. Gianni Ciolli - 2ndQuadrant Italia
PostgreSQL Training, Services and Support
gianni(dot)ciolli(at)2ndquadrant(dot)it | www.2ndquadrant.it

In response to

Responses

Browse pgsql-it-generale by date

  From Date Subject
Next Message gabriele.bartolini 2009-06-12 11:14:38 Novità SQL in PostgreSQL 8.4
Previous Message Giorgio Valoti 2009-06-11 16:50:20 Volatilità funzioni