Re: libpq WSACleanup is not needed - Mailing list pgsql-hackers

From Jeroen Vermeulen
Subject Re: libpq WSACleanup is not needed
Date
Msg-id 4975F765.6040306@xs4all.nl
Whole thread Raw
In response to Re: libpq WSACleanup is not needed  ("Merlin Moncure" <mmoncure@gmail.com>)
Responses Re: libpq WSACleanup is not needed  (Andrew Chernow <ac@esilo.com>)
List pgsql-hackers
Merlin Moncure wrote:

> I think init/uninit is the answer.  While writing libpqtypes, we noted
> that libpq is just plain awkward in a few different ways and probably
> deserves a rewrite at some point.  not today though....

Would there be any serious harm in:

1. doing the WSAStartup() when the first connection is opened, but
2. cleaning up from either
2a. some kind of on-unload version of DllMain() if possible, or
2b. an explicit new cleanup function

?

(I know it says you can't set the thing up from DllMain, but does it say 
something similar about shutdown?)


Jeroen


pgsql-hackers by date:

Previous
From: "Merlin Moncure"
Date:
Subject: Re: is 8.4 array_agg() supposed to work with array values?
Next
From: Bruce Momjian
Date:
Subject: Re: FWD: Re: Updated backslash consistency patch