Re: PL/C functions

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: gearond(at)cvc(dot)net, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: PL/C functions
Date: 2003-08-12 21:26:19
Message-ID: 3F395B7B.5010207@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> 1. There is no provision for a single pg_proc entry to have a variable
> number of arguments.
>
> 2. You can make multiple pg_proc entries referencing the same C
> function. The C function can find out how many arguments it was
> actually passed (use PG_NARGS()).
>
> So you could make several different pg_proc entries and get the desired
> effect, at some tedium.
>
> Joe Conway has posted a few examples using this approach, IIRC.
>

See contrib/dblink in 7.4beta -- there are several functions using this
method, e.g. dblink_connect().

Joe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Siebert 2003-08-12 21:30:17 Simple DBI question
Previous Message David Siebert 2003-08-12 20:58:49 Simple DBI question.