dbTalk Databases Forums  

method to call a function

comp.databases.postgresql comp.databases.postgresql


Discuss method to call a function in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Soral42
 
Posts: n/a

Default method to call a function - 06-14-2010 , 10:23 PM






All the online resources I've found so far indicate that the way to call a
function is through a query,
eg, SELECT myFunction(parameter)

Is there a PostgreSQL equivalent for the MS EXECUTE or Oracle's CALL?


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Reply With Quote
  #2  
Old   
Thomas Kellerer
 
Posts: n/a

Default Re: method to call a function - 06-15-2010 , 12:36 AM






Soral42, 15.06.2010 05:23:
Quote:
All the online resources I've found so far indicate that the way to call
a function is through a query, eg, SELECT myFunction(parameter)


Is there a PostgreSQL equivalent for the MS EXECUTE or Oracle's CALL?
No

Reply With Quote
  #3  
Old   
Anselmo Canfora
 
Posts: n/a

Default Re: method to call a function - 06-15-2010 , 02:08 AM



Il 15/06/2010 5.23, Soral42 ha scritto:
Quote:
All the online resources I've found so far indicate that the way to call
a function is through a query,
eg, SELECT myFunction(parameter)

Is there a PostgreSQL equivalent for the MS EXECUTE or Oracle's CALL?


Perhaps PERFORM could be of your interest:

http://www.postgresql.org/docs/8.3/s...S-SQL-NORESULT

Reply With Quote
  #4  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: method to call a function - 06-15-2010 , 07:27 AM



On Tue, 15 Jun 2010 09:08:32 +0200, Anselmo Canfora wrote:

Quote:
Il 15/06/2010 5.23, Soral42 ha scritto:
All the online resources I've found so far indicate that the way to
call a function is through a query,
eg, SELECT myFunction(parameter)

Is there a PostgreSQL equivalent for the MS EXECUTE or Oracle's CALL?



Perhaps PERFORM could be of your interest:

http://www.postgresql.org/docs/8.3/static/plpgsql-
statements.html#PLPGSQL-STATEMENTS-SQL-NORESULT

And here is the near future:
http://www.postgresql.org/docs/9.0/s....html#PLPGSQL-
STATEMENTS-EXECUTING-DYN



--
http://mgogala.byethost5.com

Reply With Quote
  #5  
Old   
Soral42
 
Posts: n/a

Default Re: method to call a function - 06-15-2010 , 06:31 PM



On Tue, 15 Jun 2010 17:08:32 +1000, Anselmo Canfora <nobody (AT) nowhere (DOT) net>
wrote:

Quote:
Il 15/06/2010 5.23, Soral42 ha scritto:
All the online resources I've found so far indicate that the way to call
a function is through a query,
eg, SELECT myFunction(parameter)

Is there a PostgreSQL equivalent for the MS EXECUTE or Oracle's CALL?



Perhaps PERFORM could be of your interest:

http://www.postgresql.org/docs/8.3/s...S-SQL-NORESULT
Thankyou. I have been using functions with a return type of VOID, and I
think that using PERFORM to execute them is more correct than using SELECT.

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.