From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Alan Nilsson <anilsson(at)apple(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: variadic args to C functions |
Date: | 2013-06-20 08:27:07 |
Message-ID: | CAFj8pRDjQXT=dsiCpJYeyGZgWGTLZaAc4_4kb2d4WoEFOimwEA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello
I wrote lot of C VARIADIC functions - some examples are in core -
"format" function
Schema | Name | Result data type | Argument data types | Type
------------+-----------+------------------+----------------------+--------
pg_catalog | concat | text | VARIADIC "any" | normal
pg_catalog | concat_ws | text | text, VARIADIC "any" | normal
pg_catalog | format | text | text, VARIADIC "any" | normal
(3 rows)
look to http://okbob.blogspot.cz/2010/11/new-version-of-pst-collection-is.html
source code (string functions)
Code should be same without differences between external and internal functions.
Regards
Pavel
2013/6/20 Alan Nilsson <anilsson(at)apple(dot)com>:
> Has anyone got any pointers on implementing a C function in an extension that takes variadic args? I would like to do something like:
>
> select my_function(XXX,...); where XXX will be between 1 and many integers.
>
> Possible? I didn't see any examples in the contrib directory.
>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
From | Date | Subject | |
---|---|---|---|
Next Message | 高健 | 2013-06-20 08:27:50 | Tow kinds of different result while using create index concurrently |
Previous Message | Amit Langote | 2013-06-20 07:10:15 | Re: Archiving and recovering pg_stat_tmp |