Hi Christoph, On 2006-0602 19:16:06, Christoph Zwerschke wrote: > thanks for the feedback. We may consider some of this in version 3.9.
that would be nice... > [...] the date/time format can vary in PostGreSQL, depending on > how you set datestyle. [...] And datestyle can probably even > altered during one session. I'm currently not sure how to get > a universally valid solution. let me understand the problem you see. if I say that a datestyle is linked to a database connection, why do you state that the datestyle could change *within* a session? wouldn't you consider such a change as pathological? my point of view is that it is better to offer a functionality which in pathological cases would cause errors than not offering it at all even to very well behaved database users. > Maybe somebody will come up with a good idea. One possibility would be > to add a PyGreSQL configuration parameter that tells PyGreSQL if and how > DateTimes should be treated, and it is in the responsibility of the > application to set it appropriately. what about adding a setdatestyle method to the pgdbCnx connection object and a __datestyle field to the pgdbTypeCache? the value of the field would then be used by the pgdbTypeCache to decide what to do with the DATETIME strings coming from the database. and which way to convert DateTime objects directed to the database. > Also, if we really want to return the type, then we should not only > support absolute times, but also time delta types, and we should > properly handle time zones and fractions of seconds in timestamps (your > patch rounds all datetime types to seconds). yes, I'm quite aware of this. why not just start with this one? as you see, I favour the wiki-like development style "I write, you complete, he corrects". and I'm available to be any of the three persons! :) > By the way, your patch changes a check for StringType to > StringTypes (i.e. including unicode). I think this has been > already changed in PyGreSQL since 3.6 or so. are you sure? could you check? I am now looking at my diff for 3.8 and I still need it. > You also write that the website is sometimes down and thus > PyGreSQL not available. I did not experience this in the past, > but a solution would be to put PyGreSQL in the cheese shop > (PyPI) as well. D'Arcy, what do you think about that? I've been experiencing this quite often in the past, but maybe I was just often out of luck, it wouldn't surprise me... putting things on backup systems can't be a bad idea anyways, I believe. ciao, Mario -- Gotta run, my government's collapsing. _______________________________________________ PyGreSQL mailing list [email protected] http://mailman.vex.net/mailman/listinfo/pygresql
