From: | Bernd Helmle <mailings(at)oopsware(dot)de> |
---|---|
To: | Bernd Helmle <mailings(at)oopsware(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Steve Prentice <prentice(at)cisco(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: mixed, named notation support |
Date: | 2009-08-04 16:19:01 |
Message-ID: | ADA1B16781FF995198144CDA@teje |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
--On Montag, August 03, 2009 23:43:08 +0200 Bernd Helmle
<mailings(at)oopsware(dot)de> wrote:
> Status Report: I will finish documentation and review tomorrow and will
> mark this patch for committer review.
Here's my latest reviewed version of Pavel's patch with adjusted
documentation per latest discussion.
While poking a little bit with simplify_function() I realized that this
patch changes the behavior of VARIADIC functions a little bit. For example:
CREATE OR REPLACE FUNCTION my_test(a IN text, txt VARIADIC text[])
RETURNS text
AS
$$
SELECT $2[1];
$$ LANGUAGE SQL;
The following doesn't work in current 8.4:
SELECT my_test('abcd', ARRAY['test', 'foo']);
You need to use the VARIADIC keyword to match the second argument to
text[]. However, if you are going to use named notation with the patch
applied, the picture changes in HEAD:
SELECT my_test('abcd' AS a, ARRAY['test', 'foo'] AS txt);
my_test
---------
test
(1 row)
This applies also when you reverse the argument order. I don't know wether
this is intended, but its conflicting with what we have currently in the
docs. It's also not clear to me wether we want this at all.
--
Thanks
Bernd
Attachment | Content-Type | Size |
---|---|---|
named_and_mixed_notation_review3.patch.gz | application/octet-stream | 14.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bernd Helmle | 2009-08-04 16:19:53 | Re: bytea vs. pg_dump |
Previous Message | Tom Lane | 2009-08-04 16:01:46 | Re: Alpha Releases: Docs? |