Re: WIP: default values for function parameters

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: default values for function parameters
Date: 2008-10-27 13:01:48
Message-ID: 20081027130148.GB3866@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule escribió:

> postgres=# create function fx(a int, b int default 30, c int default 40)
> postgres-# returns int as $$ select $1 + $2 + $3; $$
> postgres-# language sql;

How do you deal with the case where you have
f(a int, b int default 1) and
f(a int, b text default '1') ?

select f(1); -- which one do you call?

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-10-27 13:25:28 Re: Parsing errors in pg_hba.conf
Previous Message Ibrar Ahmed 2008-10-27 13:00:58 Re: ERRORDATA_STACK_SIZE exceeded (server crash)