Skip site navigation (1) Skip section navigation (2)

Re: Named parameter notation in Postgresql 9.0

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Ingmar Brouns <swingi(at)gmail(dot)com>
Cc: pgsql-testers(at)postgresql(dot)org
Subject: Re: Named parameter notation in Postgresql 9.0
Date: 2010-04-22 22:22:26
Message-ID: 4BD0CC22.6040400@agliodbs.com (view raw or flat)
Thread:
Lists: 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

In response to

pgsql-testers by date

Next:From: Steve SingerDate: 2010-04-27 22:04:27
Subject: Re: schema.table.column syntax no longer supported?
Previous:From: Ingmar BrounsDate: 2010-04-22 16:27:52
Subject: Named parameter notation in Postgresql 9.0

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group