On 2006-0602 23:28:11, Christoph Zwerschke wrote: > An application might switch the datestyle depending on the prefered > language of the individual user. After the user switched the language, > the datestyle would be set differently.
again trying to understand it better: setting the datestyle has influence on the way the database engine returns the string to the user, not on the way it stores it in the database. so a user might want to have 03.06.2006 while the other might prefer 2006-06-03, but the information is the same as far as the database engine is concerned. this is what I understood. if this is true, then switching from string to datetime.datetime would allow the user to completely forget about the datestyle setting of the database engine and the pgdb library to assume that all strings returned by the database engine are in the default (ISO) format. actually a bit stricter: we would ask the user to stay away from the datestyle setting and leave it to the format set (and needed) by the python interface. but then there is this "setting the language" which influences the datestyle... the python interface would need to look at the commands being passed to the database engine and reset the datestyle to ISO each time a command is given which would affect the setting. > Let's hear D'Arcy's opinion; he is actually the owner of the project. In > any case, we need to somehow maintain backward compatibility and if we > introduce something new we need a good concept. We might also check how > other PostGreSQL interfaces deal with that problem. right, read you back here. Mario -- Die Welt wird nicht bedroht von den Menschen, die böse sind, sondern von denen, die das Böse zulassen -- Albert Einstein _______________________________________________ PyGreSQL mailing list [email protected] http://mailman.vex.net/mailman/listinfo/pygresql
