regarding functions and storedprocedures
regarding functions and storedprocedures
От:
siva kiran balijepalli <b.sivakiran@gmail.com>
Дата:
Hi vibhor,
If there is no difference between functions and stored procedures, my doubt i show does the server know whether we are writing a function or stored procedure. As per my knowledge in oracle a function must return a value where as stored procedure cannot. IS this also true in postgresql. If yes how can we acheive it?
thanks and regards
sivakiran.B
Re: regarding functions and storedprocedures
От:
Thomas Kellerer <spam_eater@gmx.net>
Дата:
siva kiran balijepalli, 11.03.2011 06:08: > Hi vibhor, > If there is no difference between functions and stored procedures, my doubt i show does the server know whether we are writing a function or stored procedure. As per my knowledge in oracle a function must return a value where as stored procedure cannot. IS this also true in postgresql. If yes how can we acheive it? > thanks and regards > sivakiran.B postgres does not have stored procedures, it only has functions.
Re: regarding functions and storedprocedures
От:
Vibhor Kumar <vibhor.kumar@enterprisedb.com>
Дата:
On Mar 11, 2011, at 10:38 AM, siva kiran balijepalli wrote: > If there is no difference between functions and stored procedures, my doubt i show does the server know whether we are writing a function or stored procedure. As per my knowledge in oracle a function must return a value where as stored procedure cannot. IS this also true in postgresql. If yes how can we acheive it? As I have already mentioned, PG Only Support Functions and whatever you want to implement/acheive you can do with Functions too. About returning novalue from Function, you can write a function which will not return any value (return VOID). Following is an link which you can use for information on Functions. http://www.postgresql.org/docs/current/static/sql-createfunction.html Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation The Enterprise PostgreSQL Company vibhor.kumar@enterprisedb.com Blog:http://vibhork.blogspot.com
Re: regarding functions and storedprocedures
От:
Chetan Suttraway <chetan.suttraway@enterprisedb.com>
Дата:
On Fri, Mar 11, 2011 at 2:09 PM, Vibhor Kumar <vibhor.kumar@enterprisedb.com> wrote:
As I have already mentioned, PG Only Support Functions and whatever you want to implement/acheive you can do with Functions too.
On Mar 11, 2011, at 10:38 AM, siva kiran balijepalli wrote:
> If there is no difference between functions and stored procedures, my doubt i show does the server know whether we are writing a function or stored procedure. As per my knowledge in oracle a function must return a value where as stored procedure cannot. IS this also true in postgresql. If yes how can we acheive it?
About returning novalue from Function, you can write a function which will not return any value (return VOID).
Following is an link which you can use for information on Functions.
http://www.postgresql.org/docs/current/static/sql-createfunction.html
Thanks & Regards,
Vibhor Kumar
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
vibhor.kumar@enterprisedb.com
Blog:http://vibhork.blogspot.com
--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
Do check below link:
http://www.postgresonline.com/journal/archives/15-Stored-Procedures-in-PostgreSQL.html
--
Chetan Sutrave
Senior Software Engineer
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Phone: +91.20.30589523
Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb
This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.