Re: Calling PL functions with named parameters

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: David Fetter <david(at)fetter(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Calling PL functions with named parameters
Date: 2004-08-14 11:37:04
Message-ID: 200408141337.04184.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Fetter wrote:
> I'd like to be able to create functions with named parameters that
> could be called with the names in any order. For example,
>
> CREATE OR REPLACE FUNCTION foo_func(name TEXT, val INTEGER) AS ...
>
> SELECT foo_func(val AS 23, name AS 'Name goes here');

When that was brought up last time, I think the hard part was what
syntax to use. You can't use AS because SQL uses that for something
different. => might be OK, but then we'd need to disallow that as
operator name.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Jowett 2004-08-14 11:47:45 Re: Calling PL functions with named parameters
Previous Message Christopher Kings-Lynne 2004-08-14 11:12:20 7.4 backpatches