I am still very confused by pgsql's approach to functions vs procedures.
In my testing using pgAdmin III, if I create both In and Out args it's
listed as a proc. If I add only a In or only an Out, both are listed as
functions and the args are 'gone'. Does that make sense?
I am puzzled by the fact that I don't find many references to 'stored
procedures' in the pgsql docs. One of the oft heard reasons to chose pgsql
over mysql is the supposed presence of stored procedures.
The kind of use I have for stored procedures is to pass in a couple params,
use them in an append or update query, possibly call other procedures, and
return some value (success etc).
Thomas wrote that the IN OUT INOUT arg stuff is as of 8.1, that's the
current stable version of pgsql...but pgsql has supposedly had stored
procedures for a long time. It ends up being very confusing to a newbie.
Thanks
Thomas Pundt wrote:
>
> Hi,
>
> On Thursday 23 November 2006 02:21, novnov wrote:
> | pgAdmin III is quite a nice tool but one thing I can't figure out is
> what
> | the difference is between what pgAdmin calls a function and what it
> calls a
> | procedure.
>
> As of PostgreSQL-8.1 function arguments can be declared IN (default), OUT
> or
> INOUT (cf. "CREATE FUNCTION"). If I understand it right, pgAdmin puts a
> function into its "Procedures" section, if it has at least one OUT
> parameter.
>
> Ciao,
> Thomas
>
> --
> Thomas Pundt <thomas.pundt@rp-online.de> ---- http://rp-online.de/ ----
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
>
--
View this message in context:
http://www.nabble.com/Newbie-questions%2C-diff-between-functions-and-procedures----why-cube-functions--tf2689810.html#a7544188
Sent from the PostgreSQL - pgadmin support mailing list archive at Nabble.com.