how to execute a function directly

Lists: pgsql-interfaces
From: Paul Tilles <Paul(dot)Tilles(at)noaa(dot)gov>
To: interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: how to execute a function directly
Date: 2004-06-30 13:04:13
Message-ID: 40E2BA4D.18C25CC0@noaa.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-interfaces

Is there any way to execute a postgresql function directly? In
Informix, there is an

EXECUTE PROCEDURE proc_name();

statement which will execute a Stored Procedure directly.

In postgresql, I can

SELECT function_name();

or

DELETE fucntion_name();

both of which will cause the function to be executed.

I was wondering if there is a more generic way to cause a function to be
executed.

Paul Tilles


From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Paul Tilles <Paul(dot)Tilles(at)noaa(dot)gov>
Cc: interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: how to execute a function directly
Date: 2004-06-30 13:54:50
Message-ID: 20040630135450.GB13891@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-interfaces

On Wed, Jun 30, 2004 at 09:04:13 -0400,
Paul Tilles <Paul(dot)Tilles(at)noaa(dot)gov> wrote:
>
> I was wondering if there is a more generic way to cause a function to be
> executed.

I think you should consider using SELECT as the generic way to call functions
in Postgres.