Re: PL/C functions

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

One final note on this topic, (for me), if I write a C function that changes one of the LOCALES:

1/ Will it change the LOCALE at all?
2/ Does it change it for the whole program, affecting other, asynchronous
execution within any of the modules of the dbase?

Joe Conway wrote:

> 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
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2003-08-12 21:43:54 Re: Simple DBI question
Previous Message Tom Lane 2003-08-12 21:41:40 Re: PL/C functions