Re: [HACKERS] Share state ( allocated memory ) across two C functions...

From: Joe Conway <mail(at)joeconway(dot)com>
To: Maksim Likharev <mlikharev(at)aurigin(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: [HACKERS] Share state ( allocated memory ) across two C functions...
Date: 2003-06-30 23:22:52
Message-ID: 3F00C64C.9020909@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Maksim Likharev wrote:
> Of cause I can return a handle from first function, pointer and accept
> that pointer in second function, but in this case I have to check
> that pointer on validity and so on...
>
> Is there any good practice ( some way to do so ) for that?
>

Best way I've come up with to do this is by using a hash table based on
a name lookup. See the way it's done in dblink now (as of a week or so
ago) for named persistent connections.

HTH,

Joe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2003-07-01 01:11:52 Re: Pg_Dumpall error?
Previous Message Maksim Likharev 2003-06-30 22:57:26 Share state ( allocated memory ) across two C functions...

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2003-06-30 23:32:46 Re: [HACKERS] Missing array support
Previous Message Maksim Likharev 2003-06-30 22:57:26 Share state ( allocated memory ) across two C functions...