Re: Named parameter notation in Postgresql 9.0 - Mailing list pgsql-testers

From Josh Berkus
Subject Re: Named parameter notation in Postgresql 9.0
Date
Msg-id 4BD0CC22.6040400@agliodbs.com
Whole thread Raw
In response to Named parameter notation in Postgresql 9.0  (Ingmar Brouns <swingi@gmail.com>)
List pgsql-testers
On 4/22/10 9:27 AM, Ingmar Brouns wrote:
> Wouldn't it be better to relax this constraint, and instead check that
> when a function is being called using positional notation, that all
> parameters must have been provided until (including) the last
> parameter that has no default value.

The problem is that you can't know how the function is going to be
called in the future.  That is, regardless of how you create the proc,
it could be called either named or positionally.  Checking it at calling
time doesn't work because we need to create the "fingerprint" of a proc
when it's created, not when it's called.

So, potentially solvable but will require a lot more mucking around with
function call code to make it work.  You're welcome to hack on it.

--
                                  -- Josh Berkus
                                     PostgreSQL Experts Inc.
                                     http://www.pgexperts.com

pgsql-testers by date:

Previous
From: Ingmar Brouns
Date:
Subject: Named parameter notation in Postgresql 9.0
Next
From: Steve Singer
Date:
Subject: Re: schema.table.column syntax no longer supported?