Re: [sqlite] PRAGMA writable_schema=ON;

2007-08-15 Thread Joe Wilson
--- Scott Hess <[EMAIL PROTECTED]> wrote: > On 8/15/07, Joe Wilson <[EMAIL PROTECTED]> wrote: > > If you find a way to get sqlite3 to re-parse the schema after your direct > > sqlite_master change, please post it to the list. I don't think it can > > be done without modifying the code or making a n

Re: [sqlite] PRAGMA writable_schema=ON;

2007-08-15 Thread Scott Hess
On 8/15/07, Joe Wilson <[EMAIL PROTECTED]> wrote: > If you find a way to get sqlite3 to re-parse the schema after your direct > sqlite_master change, please post it to the list. I don't think it can > be done without modifying the code or making a new connection. You could probably manage it by do

Re: [sqlite] PRAGMA writable_schema=ON;

2007-08-15 Thread Joe Wilson
--- T&B <[EMAIL PROTECTED]> wrote: > > Even if you got the sqlite_master table entries right, the in- > > memory sqlite schema data structures would not be in sync. > > Yes, but my point/question was, would that not only apply to tables > and indexes? I expect that views and triggers have no da

Re: [sqlite] PRAGMA writable_schema=ON;

2007-08-15 Thread
Hi Joe, Even if you got the sqlite_master table entries right, the in- memory sqlite schema data structures would not be in sync. Yes, but my point/question was, would that not only apply to tables and indexes? I expect that views and triggers have no data structures (eg rootpage = 0) so t

Re: [sqlite] PRAGMA writable_schema=ON;

2007-08-15 Thread drh
T&B <[EMAIL PROTECTED]> wrote: > >> Now that is interesting. I didn't realize we could change > >> sqlite_master directly, but have often thought it could be very > >> handy. > > > > Warning: If you mess up, your database becomes unreadable and > > unrepairable. This is a very dangerous featu

Re: [sqlite] PRAGMA writable_schema=ON;

2007-08-15 Thread
Now that is interesting. I didn't realize we could change sqlite_master directly, but have often thought it could be very handy. Warning: If you mess up, your database becomes unreadable and unrepairable. This is a very dangerous feature. If you use it and you lose data: no tears. Le

Re: [sqlite] PRAGMA writable_schema=ON;

2007-08-15 Thread drh
T&B <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > It appears that you can set > > > > PRAGMA writable_schema=ON; > > > > Then do a manual UPDATE of the sqlite_master table to insert > > > I tried it and it seems to work. But it is dangerous. If you mess > > up, you corrupt the

Re: [sqlite] PRAGMA writable_schema=ON;

2007-08-14 Thread Joe Wilson
--- T&B <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > It appears that you can set > > > > PRAGMA writable_schema=ON; > > > > Then do a manual UPDATE of the sqlite_master table to insert > > > I tried it and it seems to work. But it is dangerous. If you mess > > up, you corrupt