[Gambas-user] adding functions to gb.db.postgresql

Benoît Minisini gambas at ...1...
Thu Apr 5 00:59:40 CEST 2012


Le 29/03/2012 13:39, Benoît Minisini a écrit :
> Le 29/03/2012 04:58, Ian Haywood a écrit :
>> This is not so much a feature request as a question on how to get
>> started.
>>
>> There are two functions of the underlying postgres C interface that I
>> would like to expose to Gambas:
>> PQnotifies() [which returns postgres notification events], and
>> PQsocket () which returns
>> the FD of the socket the library is using to communicate with the
>> server, (my plan is to monitor it
>> using the 'Open "."& fd For Read Watch' trick introduced in #4134)
>>
>> I'm happy to do the C programming and submit a patch, what I'm unclear
>> on is how to extend
>> the Gambas bindings, it's clear from looking at the code that the
>> database components are all "drivers" for a fixed common API,
>> problem is this feature (notifications) is very specific to
>> postgresql, I don't know if it's possible to add
>> a couple of "extra" methods to gb.db.postgresql
>>
>> thanks
>>
>> Ia Haywood
>>
>
> I suggest that you try to use libpq directly with EXTERN declarations,
> because this is really a specific postgresql feature.
>
> Regards,
>

Connection.Handle property added in revision #4592.

Regards,

-- 
Benoît Minisini




More information about the User mailing list