From: Gerhard <ger...@gm...> - 2002-04-20 06:36:50
|
* Adam Buraczewski <ad...@po...> [2002-04-18 00:25 +0200]: > Is it really necessary to pass the information about encoding twice > (once for PgSQL and second time for PostgreSQL)? No, that was just to reduce implementation effort and maintenance problems with new encodings supported by PostgreSQL. > Personally I'd like > to see PgSQL deal with it completely: the module should send an > appropriate "set client_encoding" command to PostgreSQL automatically, > just after connecting to the database and before beginning of the > first transaction. I will insist on such behaviour, especially > because PostgreSQL 7.3 will reset all SET commands to their initial > states on transaction rollback (vide discussion on pgsql-hackers > several days ago). Ok, I agree. I think, however, we need Billy's opinion on how to implement this. Btw. I couldn't find anything about the issue you mention in the web archives of pgsql-hackers. Could you post the URL of the relevant thread/message? > The only thing which should be done is a simple map, which will > convert Python encoding names to PostgreSQL encoding names. I am not > right? :) Of course you are :) And this is how it was done in my first implementation, it just adds some complexity that I thought is best left out. But you convinced me I should add this feature again. Gerhard -- mail: gerhard <at> bigfoot <dot> de registered Linux user #64239 web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id AD24C930 public key fingerprint: 3FCC 8700 3012 0A9E B0C9 3667 814B 9CAA AD24 C930 reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b'))) |