pg.ddx.io  pgsql-testers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Ingmar Brouns <swingi@gmail.com>
Cc: pgsql-testers@postgresql.org
Subject: Re: Named parameter notation in Postgresql 9.0
Date: Thu, 22 Apr 2010 15:22:26 -0700
Message-ID: <4BD0CC22.6040400@agliodbs.com> (raw)
In-Reply-To: <i2w1d47155c1004220927l9e7698d9v68cc12d203f6e93f@mail.gmail.com>
References: <i2w1d47155c1004220927l9e7698d9v68cc12d203f6e93f@mail.gmail.com>

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



view thread (2+ messages)

Message-ID: <4BD0CC22.6040400@agliodbs.com>
Permalink:  ../4BD0CC22.6040400@agliodbs.com/
Also on:    postgresql.org/message-id/4BD0CC22.6040400@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-testers@postgresql.org
  Cc: josh@agliodbs.com, swingi@gmail.com
  Subject: Re: Named parameter notation in Postgresql 9.0
  In-Reply-To: <4BD0CC22.6040400@agliodbs.com>
  References: <i2w1d47155c1004220927l9e7698d9v68cc12d203f6e93f@mail.gmail.com> <4BD0CC22.6040400@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox