Re: variadic function support

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: variadic function support
Date: 2008-07-04 10:01:37
Message-ID: 162867790807040301h40905908r1793c124329224b1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

2008/7/4 Simon Riggs <simon(at)2ndquadrant(dot)com>:
>
> On Mon, 2008-06-23 at 15:13 +0200, Pavel Stehule wrote:
>
>> this patch enhance current syntax of CREATE FUNCTION statement. It
>> allows creating functions with variable number of arguments. This
>> version is different than last my patches. It doesn't need patching
>> PL. Basic idea is transformation of real arguments (related to
>> declared variadic argument) to array. All changes are mostly in
>> parser.
>
> Something for the TODO.
>
> An added thought with regard to variadic functions:
>
> when we have them, we should be able to parse/transform repeated
> operator sequences into a call to a variadic function, if it exists.
>
> e.g. w || x || y || z can be transformed into a call to
> concat_variadic(w, x, y, z)
>
> This can then be made to perform better than
>
> concat(concat(concat(w, x), y), z)
>
> which would involve lots of wasted memory copies.

good idea

Regards
Pavel Stehule
>
> --
> Simon Riggs www.2ndQuadrant.com
> PostgreSQL Training, Services and Support
>
>

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Heikki Linnakangas 2008-07-04 10:07:00 Re: page macros cleanup
Previous Message Zdenek Kotala 2008-07-04 09:57:47 Re: page macros cleanup (ver 03)