Re: [sqlite] PRAGMA table_info fails with "no such tokenizer"

2019-09-30 Thread Gwendal Roué
Hello, The fts5 table in your database was created with a custom FTS5 tokenizer named "TrackerTokenizer" (see https://www.sqlite.org/fts5.html#custom_tokenizers). Custom FTS5 tokenizers must be registered in each SQLite connection to the database file, or you get an error like "no such

[sqlite] PRAGMA table_info fails with "no such tokenizer"

2019-09-29 Thread Anatoli Babenia
Python 3.7.4 (default, Jul 9 2019, 16:32:37) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> conn = sqlite3.connect("/home/anatoli/.cache/tracker/meta.db") >>> cursor = conn.cursor() >>>

Re: [sqlite] pragma table_info(tbl)

2018-03-02 Thread David Raymond
;.open FILENAME" to reopen on a persistent database. sqlite> create table foo (a int default -1, b text not null, c real not null, d, e blob, primary key (c, b)); sqlite> .nullvalue NuLL sqlite> pragma table_info(foo); cid nametype

Re: [sqlite] pragma table_info(tbl)

2018-03-02 Thread Keith Medcalf
. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of mike otwell >Sent: Friday, 2 March, 2018 07:04 >To: sqlite-users@mailinglists.sqlite.org >Subject: [sqlite] pragma table_info(tbl) > >I have a table named p

[sqlite] pragma table_info(tbl)

2018-03-02 Thread mike otwell
I have a table named person that contains 13 columns. pragma table_info(person) returns 13 rows of cid. I assume this is the primary key... do I need to add something to get the column name along with cid? -- No trees were killed in the sending of this message. However, a large number of

Re: [sqlite] pragma table_info return column delimiters?

2018-01-03 Thread R Smith
On 2018/01/03 12:15 PM, Bart Smissaert wrote: Is there a way with pragma table_info or otherwise (other than parsing the table create statement from SQLite_master) to get the column names including the column delimiters, eg double quotes or square brackets? So I would get eg: [column1]

Re: [sqlite] pragma table_info return column delimiters?

2018-01-03 Thread Bart Smissaert
OK, thanks. I am getting the information now from the create table statements and sofar that seems to work OK. Just wanted to make sure there wasn't a better way to handle this. RBS On Wed, Jan 3, 2018 at 11:08 AM, Richard Hipp wrote: > On 1/3/18, Bart Smissaert

Re: [sqlite] pragma table_info return column delimiters?

2018-01-03 Thread R Smith
On 2018/01/03 12:15 PM, Bart Smissaert wrote: Is there a way with pragma table_info or otherwise (other than parsing the table create statement from SQLite_master) to get the column names including the column delimiters, eg double quotes or square brackets? So I would get eg: [column1] [column2]

Re: [sqlite] pragma table_info return column delimiters?

2018-01-03 Thread J Decker
delimiters delimit, so they are not part of the context.. such information aobut delimiters is never saved... since they havce done their job delimiiting already. Why do you want this? On Wed, Jan 3, 2018 at 2:50 AM, Bart Smissaert wrote: > > What are column

Re: [sqlite] pragma table_info return column delimiters?

2018-01-03 Thread Richard Hipp
On 1/3/18, Bart Smissaert wrote: > Is there a way with pragma table_info or otherwise (other than parsing the > table create statement from SQLite_master) to get the column names > including the column delimiters, eg double quotes or square brackets? So I > would get eg:

Re: [sqlite] pragma table_info return column delimiters?

2018-01-03 Thread Bart Smissaert
> What are column delimiters? create table [table1)([ID] integer, [text_field] text) I am talking about the square brackets here surrounding the field names. Sorry, used the wrong word in saying delimiters. RBS On Wed, Jan 3, 2018 at 10:44 AM, Luuk wrote: > > > On 03-01-18

Re: [sqlite] pragma table_info return column delimiters?

2018-01-03 Thread Luuk
On 03-01-18 11:15, Bart Smissaert wrote: > Is there a way with pragma table_info or otherwise (other than parsing the > table create statement from SQLite_master) to get the column names > including the column delimiters, eg double quotes or square brackets? So I > would get eg: [column1]

[sqlite] pragma table_info return column delimiters?

2018-01-03 Thread Bart Smissaert
Is there a way with pragma table_info or otherwise (other than parsing the table create statement from SQLite_master) to get the column names including the column delimiters, eg double quotes or square brackets? So I would get eg: [column1] [column2] etc. if indeed the column names were delimited

Re: [sqlite] PRAGMA table_info could not update schema

2017-08-21 Thread Rowan Worth
On 21 August 2017 at 17:25, Clemens Ladisch wrote: > sanhua.zh wrote: > > I find that `PRAGMA table_info(tableName)` will not check the expired > schema which is modified by other sqlite connections. > > > > Here is the sample code: > > That code is incomplete and buggy.

Re: [sqlite] PRAGMA table_info could not update schema

2017-08-21 Thread sanhua.zh
in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite .open testschema sqlite SELECT * FROM sqlite_master; Command-line shell 1: sqlite CREATE TABLE test1 (i INTEGER); sqlite PRAGMA table_info(test1); 0|i|INTEGER|0||0 Command-line shell 2: sqlite PRAGM

Re: [sqlite] PRAGMA table_info could not update schema

2017-08-21 Thread Clemens Ladisch
sanhua.zh wrote: > I find that `PRAGMA table_info(tableName)` will not check the expired schema > which is modified by other sqlite connections. > > Here is the sample code: That code is incomplete and buggy. (Heed the compiler warnings!) Anyway, I can reproduce this with two command-line

[sqlite] PRAGMA table_info could not update schema

2017-08-21 Thread sanhua.zh
I find that `PRAGMA table_info(tableName)` will not check the expired schema which is modified by other sqlite connections. 1. Open conn 1 and conn 2. 2. Run a SQL to load the schema for conn 2 3. Change the schema using conn 1 by create-table-statement. 4. Get the schema using conn 2 by

Re: [sqlite] PRAGMA table_info and not nullable rowid alias

2017-07-16 Thread petern
That's interesting. Apparentely PRAGMA table_info() reports the declared column type not the operational column type. sqlite> CREATE TABLE test (id INTEGER PRIMARY KEY NOT NULL); Run Time: real 0.454 user 0.00 sys 0.00 sqlite> PRAGMA table_info(test); cid,name,type,notnull,dflt_va

[sqlite] PRAGMA table_info and not nullable rowid alias

2017-07-16 Thread gwenn
Hello, PRAGMA table_info reports that a rowid alias is nullable: sqlite> .headers on sqlite> CREATE TABLE test (id INTEGER PRIMARY KEY); sqlite> pragma table_info("test"); cid|name|type|notnull|dflt_value|pk 0|id|INTEGER|0||1 sqilte> --0|id|INTEGER|1||1 expected sqlite

Re: [sqlite] PRAGMA table_info incomplete

2014-11-28 Thread Staffan Tylen
olumns added using ALTER COLUMN ADD COLUMN. > > sqlite> create table t(x); > sqlite> pragma table_info(t); > 0|x||0||0 > sqlite> alter table t add y; > sqlite> pragma table_info(t); > 0|x||0||0 > 1|y||0||0 > > > Regards, > Clemens > ___

Re: [sqlite] PRAGMA table_info incomplete

2014-11-28 Thread Clemens Ladisch
Staffan Tylen wrote: > I've just found out that the column data returned by PRAGMA table_info does > not include columns added using ALTER COLUMN ADD COLUMN. sqlite> create table t(x); sqlite> pragma table_info(t); 0|x||0||0 sqlite> alter table t add y; sqlite> pragma table_info

[sqlite] PRAGMA table_info incomplete

2014-11-28 Thread Staffan Tylen
I've just found out that the column data returned by PRAGMA table_info does not include columns added using ALTER COLUMN ADD COLUMN. I guess this is either a bug or the documentation is incomplete. If it's a bug I would welcome a fix. If on the other hand it's 'by design', what method is

Re: [sqlite] PRAGMA table_info(table-name); - column index reliable?

2014-06-09 Thread Richard Hipp
On Mon, Jun 9, 2014 at 7:06 AM, David Q. wrote: > > D. Richard Hipp: > > No. For a multi-column primary key, the columns that are part of the > > primary key are numbered 1, 2, 3, 4, etc, according to which column they > > are in the primary key. > > For single-column

Re: [sqlite] PRAGMA table_info(table-name); - column index reliable?

2014-06-09 Thread David Q.
> D. Richard Hipp: > No. For a multi-column primary key, the columns that are part of the > primary key are numbered 1, 2, 3, 4, etc, according to which column they > are in the primary key. > For single-column primary keys, they value will always be 1, yes. You're talking about a different

Re: [sqlite] PRAGMA table_info(table-name); - column index reliable?

2014-06-09 Thread Clemens Ladisch
David Q. wrote: > I get columns names in a table by executing the query > > pragma table_info('the_table_name'); > > and using > > sqlite3_column_text(,1) //index 1 = name > > for each row in the result set. > > This works, but can I rely on the index being 1 for the 'name' column? It's very

Re: [sqlite] PRAGMA table_info(table-name); - column index reliable?

2014-06-09 Thread Richard Hipp
On Sat, Jun 7, 2014 at 5:16 AM, David Q. wrote: > I get columns names in a table by executing the query > > pragma table_info('the_table_name'); > > and using > > sqlite3_column_text(,1) //index 1 = name > > for each row in the result set. > > This works, but can I rely on

[sqlite] PRAGMA table_info(table-name); - column index reliable?

2014-06-09 Thread David Q.
I get columns names in a table by executing the query pragma table_info('the_table_name'); and using sqlite3_column_text(,1) //index 1 = name for each row in the result set. This works, but can I rely on the index being 1 for the 'name' column? I don't see this documented anywhere.

Re: [sqlite] PRAGMA table_info(second.table)

2014-06-05 Thread Peter Aronson
You should look more closely at the syntax for the Pragma statement. What you need is: PRAGMA test.table_info(tab1); This makes sense when you consider not all pragmas have arguments. Peter On 6/4/2014 11:19 PM, LacaK wrote: Hi, when I attach database using f.e ATTACH DATABASE 'test.db' AS

Re: [sqlite] PRAGMA table_info(second.table)

2014-06-05 Thread Igor Tandetnik
On 6/5/2014 2:19 AM, LacaK wrote: Then when I try PRAGMA table_info(test.tab1) , I get error: near ".": syntax error. The correct syntax is PRAGMA test.table_info(tab1) ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] PRAGMA table_info(second.table)

2014-06-05 Thread LacaK
Hi, when I attach database using f.e ATTACH DATABASE 'test.db' AS tets; and in attached database is f.e. table "tab1". Then when I try PRAGMA table_info(test.tab1) , I get error: near ".": syntax error. Is it expected ? (of course SELECT * FROM test.tab1 works as expected ...) Thanks -Laco.

Re: [sqlite] pragma table_info(database.table) not supported

2013-03-25 Thread Petite Abeille
On Mar 21, 2013, at 6:41 PM, Peter Haworth wrote: > I found the code in the two attached files (are they allowed on this list?) > on the web a while back. The claim was that it created an information > schema database from an sqlite db. I know nothing about Lua but I managed >

Re: [sqlite] pragma table_info(database.table) not supported

2013-03-22 Thread Simon Slavin
On 21 Mar 2013, at 5:41pm, Peter Haworth wrote: > I found the code in the two attached files (are they allowed on this list?) You can't attach things to messages to this list. Thanks for finding the code. I think it's interesting as a talking point but we don't actually need

Re: [sqlite] pragma table_info(database.table) not supported

2013-03-22 Thread Peter Haworth
e Database <sqlite-users@sqlite.org> > Subject: Re: [sqlite] pragma table_info(database.table) not supported > Message-ID: <c9f4c996-f601-4080-a23c-7dc5c58e7...@bigfraud.org> > Content-Type: text/plain; charset=us-ascii > > > On 20 Mar 2013, at 6:52pm, Petite Abeille <

Re: [sqlite] pragma table_info(database.table) not supported

2013-03-20 Thread Simon Slavin
On 20 Mar 2013, at 6:52pm, Petite Abeille wrote: > On Mar 20, 2013, at 6:53 PM, Jay A. Kreibich wrote: > >> If there is any change I'd like to see, it is that all the PRAGMAs >> that return tabular data should really be system catalog tables. > >

Re: [sqlite] pragma table_info(database.table) not supported

2013-03-20 Thread Petite Abeille
On Mar 20, 2013, at 6:53 PM, Jay A. Kreibich wrote: > If there is any change I'd like to see, it is that all the PRAGMAs > that return tabular data should really be system catalog tables. Triple hurray for that! SQLite deserves a proper data dictionary, no question asked.

Re: [sqlite] pragma table_info(database.table) not supported

2013-03-20 Thread Jay A. Kreibich
On Wed, Mar 20, 2013 at 07:00:29PM +0100, Stephan Beal scratched on the wall: > On Wed, Mar 20, 2013 at 6:53 PM, Jay A. Kreibich wrote: > > > That way I can use WHERE on them. In the past I've used virtual > > tables to wrap the PRAGMAs into something that looked and acted

Re: [sqlite] pragma table_info(database.table) not supported

2013-03-20 Thread Stephan Beal
On Wed, Mar 20, 2013 at 6:53 PM, Jay A. Kreibich wrote: > That way I can use WHERE on them. In the past I've used virtual > tables to wrap the PRAGMAs into something that looked and acted more > like a real table. > Hi, Jay, can you give us an example of how that is

Re: [sqlite] pragma table_info(database.table) not supported

2013-03-20 Thread Jay A. Kreibich
On Wed, Mar 20, 2013 at 05:57:12PM +0100, Staffan Tylen scratched on the wall: > >PRAGMA table_info(database.tablename) > > > > Any chance that SQLite4 might change this, or perhaps accept both forms ? > In addition, how about a pragma to get the tables in a database? We > currently have

Re: [sqlite] pragma table_info(database.table) not supported

2013-03-20 Thread Staffan Tylen
>PRAGMA table_info(database.tablename) > > Any chance that SQLite4 might change this, or perhaps accept both forms ? > > In addition, how about a pragma to get the tables in a database? We currently have pragma(database_list), pragma(index_list), and pragma(table_info), but no

Re: [sqlite] pragma table_info(database.table) not supported

2013-03-20 Thread Simon Slavin
On 20 Mar 2013, at 11:03am, Richard Hipp wrote: > The syntax for PRAGMA is: > >PRAGMA database.table_info(tablename); Out of interest, is there some internal reason for this non-standard form ? I can understand it if it makes some internal part of SQLite easier to

Re: [sqlite] pragma table_info(database.table) not supported

2013-03-20 Thread Staffan Tylen
Ooops! Thank :) On Wed, Mar 20, 2013 at 12:03 PM, Richard Hipp wrote: > On Wed, Mar 20, 2013 at 6:54 AM, Staffan Tylen >wrote: > > > I've just found out that adding a database name as a table prefix is not > > supported by the pragma table_info

Re: [sqlite] pragma table_info(database.table) not supported

2013-03-20 Thread Richard Hipp
On Wed, Mar 20, 2013 at 6:54 AM, Staffan Tylen wrote: > I've just found out that adding a database name as a table prefix is not > supported by the pragma table_info function, giving a syntax error. The > documentation of the ATTACH DATABASE commands says: > > Tables in

Re: [sqlite] pragma table_info(database.table) not supported

2013-03-20 Thread Clemens Ladisch
Staffan Tylen wrote: > I've just found out that adding a database name as a table prefix is not > supported by the pragma table_info function, giving a syntax error. : PRAGMA mydatabase.table_info(mytable); Regards, Clemens

[sqlite] pragma table_info(database.table) not supported

2013-03-20 Thread Staffan Tylen
I've just found out that adding a database name as a table prefix is not supported by the pragma table_info function, giving a syntax error. The documentation of the ATTACH DATABASE commands says: Tables in an attached database can be referred to using the syntax * database-name.table-name*.

Re: [sqlite] PRAGMA table_info documentation

2013-02-02 Thread Petite Abeille
, the column is in the primary key, but I'm > not quite sure. If , in command shell, you set .head on, then you will see: sqlite> .head on sqlite> pragma table_info( 'foo' ); cid|name|type|notnull|dflt_value|pk So, pk indeed. ___ sqlite-users mail

Re: [sqlite] PRAGMA table_info() with database name?

2010-05-09 Thread Oliver Lange
Kees Nuyt schrieb: > On Sun, 09 May 2010 12:18:41 +0200, Oliver Lange > wrote: > >> Hello, >> >> One thing i'm missing in PRAGMA table_info() is that i can't specify >> a database name, like: PRAGMA table_info(main.mytable); >> > > As a workaround, you can use: >

Re: [sqlite] PRAGMA table_info() with database name?

2010-05-09 Thread Richard Hipp
On Sun, May 9, 2010 at 6:18 AM, Oliver Lange wrote: > > Hello, > > One thing i'm missing in PRAGMA table_info() is that i can't specify > a database name, like: PRAGMA table_info(main.mytable); > The correct syntax is: PRAGMA main.table_info(mytable); > >

Re: [sqlite] PRAGMA table_info() with database name?

2010-05-09 Thread Kees Nuyt
On Sun, 09 May 2010 12:18:41 +0200, Oliver Lange wrote: > >Hello, > >One thing i'm missing in PRAGMA table_info() is that i can't specify >a database name, like: PRAGMA table_info(main.mytable); > >Problem: if a TEMPORARY TABLE is defined using the same name as an

[sqlite] PRAGMA table_info() with database name?

2010-05-09 Thread Oliver Lange
Hello, One thing i'm missing in PRAGMA table_info() is that i can't specify a database name, like: PRAGMA table_info(main.mytable); Problem: if a TEMPORARY TABLE is defined using the same name as an already existing table in the main database (which SQLITE3 apparently allows), PRAGMA

Re: [sqlite] pragma table_info on a table in attached db

2008-08-20 Thread Kees Nuyt
On Thu, 21 Aug 2008 02:18:39 +0530, Mrinal wrote: >>As Dennis said, that looks like a bug. > > Created a new ticket (number 3320: > http://www.sqlite.org/cvstrac/tktview?tn=3320) > which has been fixed now. Wow, that's fast. >- Mrinal. -- ( Kees Nuyt ) c[_]

Re: [sqlite] pragma table_info on a table in attached db

2008-08-20 Thread Mrinal Kant
>As Dennis said, that looks like a bug. Created a new ticket (number 3320: http://www.sqlite.org/cvstrac/tktview?tn=3320) which has been fixed now. - Mrinal. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] pragma table_info on a table in attached db

2008-08-20 Thread Kees Nuyt
On Wed, 20 Aug 2008 06:33:17 +0530, Mrinal wrote: >>Try: >>PRAGMA [database.]table_info(table-name); > >> ( Kees Nuyt > >Thankyou Kees for the solution yw. >But, I am facing another problem [...] As Dennis said, that looks like a bug. I just confirmed SQLite 3.6.0 behaves the same way.

Re: [sqlite] pragma table_info on a table in attached db

2008-08-20 Thread Dennis Cote
Mrinal Kant wrote: >> Try: >> PRAGMA [database.]table_info(table-name); > >> ( Kees Nuyt > > Thankyou Kees for the solution > But, I am facing another problem which is as follows: I open an sqlite > db and create a table "trial". pragma main.table_info(trial) shows > correct info. Then I

[sqlite] pragma table_info on a table in attached db

2008-08-19 Thread Mrinal Kant
>Try: >PRAGMA [database.]table_info(table-name); > ( Kees Nuyt Thankyou Kees for the solution But, I am facing another problem which is as follows: I open an sqlite db and create a table "trial". pragma main.table_info(trial) shows correct info. Then I create a temp table with the same name

Re: [sqlite] pragma table_info on a table in attached db

2008-08-18 Thread Kees Nuyt
On Tue, 19 Aug 2008 01:14:43 +0530, Mrinal wrote: >pragma table_info(dbname.tablename) syntax is not allowed. Is there >some other way to get the table_info for tables in attached db which >bear the same name as another table in either the main, temp or a >previously attached db? >F.e. >I

[sqlite] pragma table_info on a table in attached db

2008-08-18 Thread Mrinal Kant
pragma table_info(dbname.tablename) syntax is not allowed. Is there some other way to get the table_info for tables in attached db which bear the same name as another table in either the main, temp or a previously attached db? F.e. I connect to db1.sqlite which contains a table called t1. Then I

Re: [sqlite] Pragma table_info(), why no fields like UNIQUE, AUTOINCREMENT

2007-03-14 Thread Eric Bohlman
COS wrote: A small opinion on that matter: what I would really like to see is something like system tables. Today sqlite uses only sqlite_master to keep information about its objects and parsing is required to getter better info of each object (if one needs to). Using other system tables to keep

Re: [sqlite] Pragma table_info(), why no fields like UNIQUE, AUTOINCREMENT

2007-03-14 Thread Stef Mientki
COS wrote: Hi, - Original Message - From: "Stef Mientki" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Tuesday, March 13, 2007 3:47 PM Subject: Re: [sqlite] Pragma table_info(), why no fields like UNIQUE, AUTOINCREMENT You should also consider

Re: [sqlite] Pragma table_info(), why no fields like UNIQUE, AUTOINCREMENT

2007-03-13 Thread COS
Hi, - Original Message - From: "Stef Mientki" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Tuesday, March 13, 2007 3:47 PM Subject: Re: [sqlite] Pragma table_info(), why no fields like UNIQUE, AUTOINCREMENT > > > > > > You should al

Re: [sqlite] Pragma table_info(), why no fields like UNIQUE, AUTOINCREMENT

2007-03-13 Thread Stef Mientki
You should also consider how your change might effect backwards compatibility. The last time that table_info() was modified, the Ruby-On-Rails community got really upset. I'm rather of a mind to leave table_info() alone. Forgive my ignorance, I'm just a beginner in databases, but what

Re: [sqlite] Pragma table_info(), why no fields like UNIQUE, AUTOINCREMENT

2007-03-13 Thread drh
"Vivien Malerba" <[EMAIL PROTECTED]> wrote: > On 3/13/07, Martin Jenkins <[EMAIL PROTECTED]> wrote: > > Vivien Malerba wrote: > > > I've already sent a proposal along with a patch some time ago about > > > that, but nobody seemed to care, see > > >

Re: [sqlite] Pragma table_info(), why no fields like UNIQUE, AUTOINCREMENT

2007-03-13 Thread Vivien Malerba
On 3/13/07, Martin Jenkins <[EMAIL PROTECTED]> wrote: Vivien Malerba wrote: > I've already sent a proposal along with a patch some time ago about > that, but nobody seemed to care, see > http://www.mail-archive.com/sqlite-users@sqlite.org/msg21285.html Vivien, I can't see any patch attached to

Re: [sqlite] Pragma table_info(), why no fields like UNIQUE, AUTOINCREMENT

2007-03-13 Thread Dennis Cote
Vivien Malerba wrote: I've already sent a proposal along with a patch some time ago about that, but nobody seemed to care, see http://www.mail-archive.com/sqlite-users@sqlite.org/msg21285.html Vivien, This mailing list does not pass attachments. A patch such as your is best handled by

Re: [sqlite] Pragma table_info(), why no fields like UNIQUE, AUTOINCREMENT

2007-03-13 Thread Martin Jenkins
Vivien Malerba wrote: I've already sent a proposal along with a patch some time ago about that, but nobody seemed to care, see http://www.mail-archive.com/sqlite-users@sqlite.org/msg21285.html Vivien, I can't see any patch attached to that post. Perhaps you should resubmit it? And I'll guess

Re: [sqlite] Pragma table_info(), why no fields like UNIQUE, AUTOINCREMENT

2007-03-13 Thread Vivien Malerba
On 3/12/07, Stef Mientki <[EMAIL PROTECTED]> wrote: If ask the table sturcture, with pragma table_info() I get of course the basic fields, like: CID,Name,Type, And also SOME special values, like Null, DefaultValue, PrimaryKey But NOT the following special values (and probably a lot more)

[sqlite] Pragma table_info(), why no fields like UNIQUE, AUTOINCREMENT

2007-03-12 Thread Stef Mientki
If ask the table sturcture, with pragma table_info() I get of course the basic fields, like: CID,Name,Type, And also SOME special values, like Null, DefaultValue, PrimaryKey But NOT the following special values (and probably a lot more) Unique, AutoIncrement Is this due to the DLL I use,

RE: [sqlite] pragma table_info not working on empty table

2007-01-24 Thread RB Smissaert
] pragma table_info not working on empty table I'm not sure if this applies here, but you could try calling this first: PRAGMA empty_result_callbacks = true; -- Eric Pankoke Founder / Lead Developer Point Of Light Software http://www.polsoftware.com/ -- Original message

Re: [sqlite] pragma table_info not working on empty table

2007-01-24 Thread epankoke
I'm not sure if this applies here, but you could try calling this first: PRAGMA empty_result_callbacks = true; -- Eric Pankoke Founder / Lead Developer Point Of Light Software http://www.polsoftware.com/ -- Original message -- From: "RB Smissaert" <[EMAIL

[sqlite] pragma table_info not working on empty table

2007-01-24 Thread RB Smissaert
It just looks that this pragma won't give me the fields and data types if the table has no rows yet, but was just created. Is this indeed so and if so is there a way round it? I am trying to avoid parsing sqlite_master as I used to do that and using this pragma is a much cleaner way to do this.

Re: [sqlite] PRAGMA table_info() reveals primary keys

2006-11-10 Thread David Crawshaw
Dennis Cote wrote: You should create a documentation bug ticket so these things will get fixed. Done. -- David - To unsubscribe, send email to [EMAIL PROTECTED]

Re: [sqlite] PRAGMA table_info() reveals primary keys

2006-11-10 Thread Dennis Cote
David Crawshaw wrote: I had need of a programmatic interface to determine the primary keys of a table, so I went to add it to pragma table_info, only to discover it is already there. The comment in pragma.c seems out of date, failing to mention the sixth column 'pk', and so is

[sqlite] PRAGMA table_info() reveals primary keys

2006-11-09 Thread David Crawshaw
I had need of a programmatic interface to determine the primary keys of a table, so I went to add it to pragma table_info, only to discover it is already there. The comment in pragma.c seems out of date, failing to mention the sixth column 'pk', and so is sqlite.org/pragma.html. -- David

Re: [sqlite] pragma table_info(...) documentation?

2006-04-27 Thread Thomas Chust
: $ sqlite3 SQLite version 3.3.5 Enter ".help" for instructions sqlite> .headers on sqlite> PRAGMA table_info(sqlite_master); cid|name|type|notnull|dflt_value|pk [...] cu, Thomas

Re: [sqlite] pragma table_info(...) documentation?

2006-04-27 Thread Jay Sprenkle
On 4/27/06, Dan Baker <[EMAIL PROTECTED]> wrote: > I'm needing to find some information about a table, and the table_info > pragma seems to be the right ticket. > > I've looked around, and failed, to find any documentation on this cool > pragma. > It appears to return 6 columns of data per

[sqlite] pragma table_info(...) documentation?

2006-04-27 Thread Dan Baker
I'm needing to find some information about a table, and the table_info pragma seems to be the right ticket. I've looked around, and failed, to find any documentation on this cool pragma. It appears to return 6 columns of data per table-column. I believe they are as follows: [1] = column#

Re: [sqlite] PRAGMA table_info

2006-04-13 Thread Christian Werner
"Jackson, Douglas H" wrote: > > This leaves you to parse the DDL from sqlite_master. > Doug ... or to correlate 'pragma table_info(tablename)' with 'pragma index_info(tablename)'. Some (unreadable, imperfect) example code can be found in the ODBC driver e.g. in the functions SQLPrimaryKeys(),

RE: [sqlite] PRAGMA table_info

2006-04-13 Thread Robert Simpson
> -Original Message- > From: Marco Bambini [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 13, 2006 2:38 PM > To: sqlite-users@sqlite.org > Subject: [sqlite] PRAGMA table_info > > Using PRAGMA table_info(...) there is no way to know if a > colu

RE: [sqlite] PRAGMA table_info

2006-04-13 Thread Jackson, Douglas H
This leaves you to parse the DDL from sqlite_master. Doug -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, April 13, 2006 2:51 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] PRAGMA table_info Marco Bambini <[EMAIL PROTECTED]> wrote: &

Re: [sqlite] PRAGMA table_info

2006-04-13 Thread drh
Marco Bambini <[EMAIL PROTECTED]> wrote: > Using PRAGMA table_info(...) there is no way to know if a column is > declared as unique and/or autoincrement. > Am I missing something? > Is there a way to get these info? > There is no pragma currently (that I recall) for finding if a column is

[sqlite] PRAGMA table_info

2006-04-13 Thread Marco Bambini
Using PRAGMA table_info(...) there is no way to know if a column is declared as unique and/or autoincrement. Am I missing something? Is there a way to get these info? Thanks, Marco Bambini

Re: [sqlite] PRAGMA table_info oddness

2006-01-23 Thread Mike Ashmore
have to add the union and the B part. sqlite> pragma table_info(t1); cid nametypenotnull dflt_value pk -- -- -- -- -- -- 0 a integer 0 <> 1 1 c

Re: [sqlite] PRAGMA table_info oddness

2006-01-23 Thread Mike Ashmore
On Jan 22, 2006, at 7:43 PM, Kurt Welgehausen wrote: There's no string type in SQL. Go to and read section 2.1. Regards Okay, my previous message related to SQL syntax, so I suppose it's fair to point out that "string" isn't a SQL type. In fact, I

Re: [sqlite] PRAGMA table_info oddness

2006-01-23 Thread Dennis Cote
Mike Ashmore wrote: Hi folks, I'm trying to create a composite view from multiple database files, with an extra field for the origin of a particular record. A sample scenario: There's a table, "foo," which exists in two database files, 'a.db3' and 'b.db3'. Let's define it as: CREATE

Re: [sqlite] PRAGMA table_info oddness

2006-01-22 Thread Kurt Welgehausen
There's no string type in SQL. Go to and read section 2.1. Regards

[sqlite] PRAGMA table_info oddness

2006-01-22 Thread Mike Ashmore
Hi folks, I'm trying to create a composite view from multiple database files, with an extra field for the origin of a particular record. A sample scenario: There's a table, "foo," which exists in two database files, 'a.db3' and 'b.db3'. Let's define it as: CREATE TABLE foo (f1 integer,

Re: [sqlite] pragma table_info

2005-03-07 Thread D. Richard Hipp
On Sun, 2005-03-06 at 23:36 -0800, Charles Mills wrote: > Is there anyway to do 'pragma table_info' on a table in an attached > database (even if a table in the main database has the same name). I > guess I am wondering why this doesn't work: > PRAGMA table_info(database_name.table_name) > > I

[sqlite] pragma table_info

2005-03-06 Thread Charles Mills
Is there anyway to do 'pragma table_info' on a table in an attached database (even if a table in the main database has the same name). I guess I am wondering why this doesn't work: PRAGMA table_info(database_name.table_name) I get 'near ".": syntax error'. -Charlie