Calling the same function more than once with the same arguments

From: "Clodoaldo Pinto" <clodoaldo(dot)pinto(at)gmail(dot)com>
To: "pgsql-general postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Calling the same function more than once with the same arguments
Date: 2006-04-19 21:29:32
Message-ID: a595de7a0604191429u7c84765dv81fd542c2ed812fc@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm building a function caller() in which a certain function called()
will be called many times in from clauses with the same arguments and
I'm wondering if is there a performance penalty for that or if the sql
engine is smart enough to call called() only once.

I tried to substitute called() in the from clauses for a temporary
table created first in caller() but it refuses to build caller() with
the message "ERROR: relation "temp_table_name" does not exist". It
does not exist in build time but it will exist in run time.

Regards, Clodoaldo Pinto

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ben 2006-04-19 21:38:33 Re: Calling the same function more than once with the same
Previous Message Mauricio Mantilla 2006-04-19 21:05:24 Re: help plpgsql, cursors, fetch into