Michael Bayer wrote: > the "key" argument to column doesnt work very well when you get into > crazier mapping scenarios; there arent a lot of test cases that use it > and it complicates things. it would be better if identifiers knew to > quote themselves in a database-agnostic manner.
The problem is that there are identifiers that are legal in SQL that are illegal in python when unquoted. Likewise if you were to sanitize such identifiers into legal python, you lose information and will be unable to reconstruct the proper identifier for the database. CREATE TABLE "WorstCase" ( id SERIAL PRIMARY KEY, lowercase varchar(25), UPPERCASE varchar(25), MixedCase varchar(25), "ASC" varchar(25), "desc" varchar(25), "Union" varchar(25), "MixedCase" varchar(25), "With Space" varchar(25), "1st" varchar(25), "Similar..?" varchar(25), "Similar..#" varchar(25), ":symbol" varchar(25), "inner""quote" varchar(25) ); Aaron Spike ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Sqlalchemy-users mailing list Sqlalchemy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users