pragma full_column_names

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

pragma full_column_names

Fanda Vacek
Hi,

does the pragma full_column_names work in sqlite3 command line utility?

If I write:

.header on
pragma full_column_names=1;
select * from t1;

I do not see the table name (t1) in column headers. I see 'ID' not 't1.ID'.

Fanda

Reply | Threaded
Open this post in threaded view
|

Fwd: pragma full_column_names

Fanda Vacek
I think, that it is an SQLite bug, here is a patch. Well, it is working  
but I still don't know if it is correct solution:))

fanda

--- /Users/fanda/t/select.c     2005-06-13 01:18:00.000000000 +0200
+++ /Files/Compile/Sources/sqlite-3.2.2/src/select.c    2005-08-11  
10:56:14.000000000 +0200
@@ -782,7 +782,7 @@
      Expr *p;
      p = pEList->a[i].pExpr;
      if( p==0 ) continue;
-    if( pEList->a[i].zName ){
+    if( pEList->a[i].zName && !fullNames){
        char *zName = pEList->a[i].zName;
        sqlite3VdbeSetColName(v, i, zName, strlen(zName));
        continue;




------- Forwarded message -------
From: "Fanda Vacek" <[hidden email]>
To: "[hidden email]" <[hidden email]>
Cc:
Subject: [sqlite] pragma full_column_names
Date: Wed, 10 Aug 2005 13:23:43 +0200

Hi,

does the pragma full_column_names work in sqlite3 command line utility?

If I write:

.header on
pragma full_column_names=1;
select * from t1;

I do not see the table name (t1) in column headers. I see 'ID' not 't1.ID'.

Fanda