On 5 Jan 2014, at 6:41pm, Petite Abeille <petite.abei...@gmail.com> wrote:
> On Jan 5, 2014, at 6:56 PM, Igor Tandetnik <i...@tandetnik.org> wrote: > >> On 1/4/2014 7:15 PM, Elrond wrote: >>> Short: Could you implement alter table rename column? >> >> The problem would be, what to do with all the indexes, triggers, views and >> foreign keys that reference that column? > > Sure, but that’s an unrelated set of problems, isn’t it? As it stands, one > cannot even rename a column. You're both right. Igor's statement pretty-much /is/ the reason one cannot rename a column. One would need to write a parser and changer for SQL statements that could identify and change column names in many statements with all sorts of weird possibilities for formatting. Two alternatives: (a) actually write the parser-and-changer that processes SQL commands, or (b) wait until the major file format changes in SQLite4, then change the way SQL stores the CREATE commands needed to construct a database so it stores a structured version of the commands instead of the raw text. The advantage of either change would be that it allows almost all the ALTER TABLE commands SQL users expect, not just changing column names. This simplifies life not just for normal users but also for all the writers of SQLite GUI managers out there, who have to write nasty risky time-consuming hacks if they want to accomplish those operations. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users