Exactly Stephen! I was trying to dump a database and I was wondering  
how to deal with virtual tables.

I think that a good way to dump a database skipping internally  
generated real tables could be to:
- first create all tables that contains the CREATE VIRTUAL TABLE  
statement
- then get the name of all the tables (not virtual) created inside the  
db (save their names somewhere)
- and at the end copy all the tables whose name was not previously saved

I wondering if is there a simpler/better solution...
---
Marco Bambini
http://www.sqlabs.net
http://www.sqlabs.net/blog/
http://www.sqlabs.net/realsqlserver/



On Sep 13, 2008, at 7:25 PM, Stephen Woodbridge wrote:

> Kishor,
>
> I think Marco may want to be able to know how to determine which  
> tables
> in a DB are real tables and which ones below to virtual tables. If you
> want to do something like dump tables from the database, you do not  
> want
> to be dumping all the internally generated real tables. It might be  
> nice
> if there were some way to identify if a given table was:
>
> 1) a normal table
> 2) a virtual table
> 3) a child of a virtual table
>
> But I'm only guess that this might be what Marco wants? Marco?
>
> -Steve
>
> P Kishor wrote:
>> On 9/13/08, Marco Bambini <[EMAIL PROTECTED]> wrote:
>>> Yes but creating a virtual tables involves the creations of other
>>> related tables ...
>>
>> Well, the FTSn mechanism does all the extra table voodoo for you, so
>> you don't have to be bothered about it. From what it seems like, the
>> other magic tables are not virtual tables. In any case, we are not
>> advised to mess with them unless we have security clearance.
>>
>>> does all the virtual table implementations (fts1,
>>> fts2, fts3) follow the same schema or it is implementation  
>>> dependent?
>>
>> Probably there is some difference from FTS1..3, but I have no
>> recollection of 2, and I never implemented 1.
>>
>> In any case, the table that is VIRTUAL is the one that you create
>> yourself. And, per your original question of how to identify it,  
>> well,
>> it says so in the schema. There might be a PRAGMA command for it as
>> well, but nothing could be clearer than the word VIRTUAL right there
>> in the schema.
>>
>>
>>>
>>> ---
>>> Marco Bambini
>>> http://www.sqlabs.net
>>> http://www.sqlabs.net/blog/
>>> http://www.sqlabs.net/realsqlserver/
>>>
>>>
>>>
>>>
>>> On Sep 13, 2008, at 4:02 PM, P Kishor wrote:
>>>
>>>> On 9/13/08, Marco Bambini <[EMAIL PROTECTED]> wrote:
>>>>> What is the best way to identify virtual tables inside a sqlite
>>>>> database?
>>>>
>>>>
>>>> isn't the schema enough? In my world it says
>>>>
>>>> CREATE VIRTUAL TABLE ...
>>>>
>>>>>
>>>>> Thanks a lot.
>>>>> ---
>>>>> Marco Bambini
>>>>> http://www.sqlabs.net
>>>>> http://www.sqlabs.net/blog/
>>>>> http://www.sqlabs.net/realsqlserver/
>>>>>
>>>
>>>> _______________________________________________
>>>> sqlite-users mailing list
>>>> sqlite-users@sqlite.org
>>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>>> _______________________________________________
>>> sqlite-users mailing list
>>> sqlite-users@sqlite.org
>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>>
>>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to