Re: Calling PL functions with named parameters - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: Calling PL functions with named parameters
Date
Msg-id 200408141246.23569.josh@agliodbs.com
Whole thread Raw
In response to Calling PL functions with named parameters  (David Fetter <david@fetter.org>)
Responses Re: Calling PL functions with named parameters
List pgsql-hackers
David,

> Dennis has pointed out that mixing the call-with-named-parameter
> interface with call-by-order-of-parameters one would cause confusion,
> and I think it would be OK to disallow this type mixing, so

As we've discussed on IRC, this should be the difference between a FUNCTION 
and a PROCEDURE.  It's about time we implemented a CREATE PROCEDURE statement 
anyway.  

As I see it, the critical difference between FUNCTIONS and PROCEDURES can be 
that:
a) Procedures support named parameter calling but do NOT allow being called in 
the context of a query, and
b) Procedures are not automatically transactional; that is, transactions 
within procedures must/can be explicit.  Among other things, this would allow 
procedures to run maintainence tasks.

This seems to me to be the obvious solution to the Named Parameters vs. 
Overloading conflict, and I'm really puzzled why people keep dismissing it as 
out-of-hand.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco


pgsql-hackers by date:

Previous
From: ohp@pyrenet.fr
Date:
Subject: 8.0beta1 with unixware
Next
From: Christopher Browne
Date:
Subject: Re: Postgres development model