Re: Calling PL functions with named parameters

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: David Fetter <david(at)fetter(dot)org>
Subject: Re: Calling PL functions with named parameters
Date: 2004-08-14 19:46:23
Message-ID: 200408141246.23569.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Steve Bergman 2004-08-14 20:23:02 SRPM for 8.0.0 beta?
Previous Message ohp 2004-08-14 18:34:04 8.0beta1 with unixware