Re: Issues for named/mixed function notation patch - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Issues for named/mixed function notation patch
Date
Msg-id 1254002902.5640.88.camel@jdavis
Whole thread Raw
In response to Re: Issues for named/mixed function notation patch  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: Issues for named/mixed function notation patch
Re: Issues for named/mixed function notation patch
List pgsql-hackers
On Tue, 2009-09-15 at 10:51 +0200, Pavel Stehule wrote:
> My renonc, please, try new patch. I forgot mark regproc.c file.

I think the documentation around calling functions is disorganized:

Variadic functions, functions with defaults, SRFs, out parameters, and
polymorphism are all explained in 34.4, which is about SQL functions
specifically.

Overloading is in chapter 34 also, but not specifically in the SQL
function section like the rest.

Function calls themselves are only given 5 lines of explanation in
4.2.6, with no mention of things like the VARIADIC keyword.

These complaints aren't about the patch, but we might want to consider
some reorganization of those sections (probably a separate doc patch).

The interaction with variadic functions appears to be misdocumented.
>From the code and tests, the VARIADIC keyword appears to be optional
when using named notation, but required when using positional notation.
But the documentation says:

"However, a named variadic argument can only be called the way shown in
the example above. The VARIADIC keyword must not be specified and a
variadic notation of all arguments is not supported. To use variadic
argument lists you must use positional notation instead."

What is the intended behavior? I think we should always require VARIADIC
to be specified regardless of using named notation.

I'm still reviewing the code.

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: Emmanuel Cecchet
Date:
Subject: Re: Join optimization for inheritance tables
Next
From: David Fetter
Date:
Subject: Re: 8.5 TODO: Add comments to output indicating version of pg_dump and of the database server