[database-devel] Request for Feedback on COPY IN/OUT support for postgresql-simple

Leon Smith leon.p.smith at gmail.com
Fri Jul 12 06:27:40 CEST 2013


Hmm, upon further thought regarding to exec's behavior on async exceptions,
 surely there are use cases for both a simple and timely abandonment of the
connection and for attempting to cancel a long-running query while
attempting to save the connection.     In the latter case, I don't have
anything too concrete in mind, but surely it exists.

One obvious solution would be to use two different async exceptions.
 Perhaps a ThreadKilled exception would simply abort while a Timeout
exception would trigger the cancel behavior.    But reviewing the source of
System.Timeout,  Timeout is not exported from the module,  which would seem
to rule out that behavior.... so maybe we need to define a separate Cancel
exception.

One question I'd have is whether or not this type of behavior would compose
well:  e.g. could you lift it through postgresql-simple with a minimum of
fuss,  or would the cancel behavior of query_ and execute_ be a little off?

Another possible solution would be to define a combinator that deals with
Cancel exceptions.

Best,
Leon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/database-devel/attachments/20130712/a4e3514c/attachment.htm>


More information about the database-devel mailing list