[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-26 Thread Domingo Alvarez Duarte
So in your case (delphi usage) how do you do when using postgresql ? Cheers ! > Wed Aug 26 2015 4:52:02 pm CEST CEST from "Stephen Chrzanowski" > Subject: Re: [sqlite] Why sqlite show qualified >column >names when selecting from views ? > > I'm sure either #1 o

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-26 Thread Domingo Alvarez Duarte
EST from "Simon Slavin" > Subject: Re: [sqlite] Why sqlite show qualified >column names when selecting from views ? > > On 26 Aug 2015, at 10:17am, Domingo Alvarez Duarte > wrote: > > >>But like it's already done on several other cases why not fix this i

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-26 Thread Simon Slavin
On 26 Aug 2015, at 10:17am, Domingo Alvarez Duarte wrote: > But like it's already done on several other cases why not fix this issue and > wrap this fix with "#ifdef SQLITE_CLEAN_COLUMN_NAMES" that's not defined by > default so older code will remain working but new code can enable this and >

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-26 Thread Domingo Alvarez Duarte
I just tested this on postgresql and I always get unqualified column names as I would expect. I remember this was a lot worst in previous sqlite versions and I needed to play with two compile time/pragma flags and depending on that combination we got some bizarre results. I understand that

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-26 Thread Stephen Chrzanowski
message message about ambiguos column name. > > > > On the case mentioned apply rule 2, like postgresql do. > > Cheers ! > > > > Wed Aug 26 2015 2:35:41 pm CEST CEST from "Simon Slavin" > > Subject: Re: [sqlite] Why sqlite show qualified > >colum

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-26 Thread Simon Slavin
On 25 Aug 2015, at 10:27pm, Tim Streater wrote: > So how does that work with: > > create table newtable as select * from oldtable; > > Does that mean that, in principle, I could have any random set of column > names for my new table? Future versions of SQLite can do anything. In real

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Jean-Christophe Deschamps
At 22:28 25/08/2015, you wrote: >In the next version of SQLite3 the names of all columns will be >'columnname' "Don't trust me" could be more apropriate.

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Tim Streater
On 25 Aug 2015 at 19:37, Richard Hipp wrote: > On 25/8/15, Simon Slavin wrote: >> >> "If there is no AS clause then the name of the column is unspecified and may >> change from one release of SQLite to the next." > Heed this warning!!! > > And yet, there are countless tens of thousands of

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 8:52pm, Scott Robison wrote: > On Aug 25, 2015 1:02 PM, "Petite Abeille" wrote: > >> On Aug 25, 2015, at 8:53 PM, R.Smith wrote: >> >>> I vote to change it every release... Stimulate better habits! >> >> Seconded. Keep them on their toes! > > Or randomly generate names

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Petite Abeille
> On Aug 25, 2015, at 8:53 PM, R.Smith wrote: > > I vote to change it every release... Stimulate better habits! Seconded. Keep them on their toes!

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread R.Smith
On 2015-08-25 08:37 PM, Richard Hipp wrote: > On 8/25/15, Simon Slavin wrote: >> "If there is no AS clause then the name of the column is unspecified and may >> change from one release of SQLite to the next." >> > Heed this warning!!! > > And yet, there are countless tens of thousands of

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Stephan Beal
view > with "a.*" it doesn't qualify the names so I thought that was a mistake > when > we use individual names otherwise I would expected qualified names there > too. > > > Cheers ! > > Tue Aug 25 2015 19:45:27 CEST from "Simon Slavin" > > >

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread sqlite-mail
e Aug 25 2015 19:45:27 CEST from "Simon Slavin" >Subject: Re: [sqlite] Why sqlite show qualified column names when selecting >from views ? > > On 25 Aug 2015, at 6:13pm, sqlite-mail wrote: > > >>When querying views sqlite shows qualified column names if they

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Richard Hipp
On 8/25/15, Tim Streater wrote: > On 25 Aug 2015 at 19:37, Richard Hipp wrote: > >> On 25/8/15, Simon Slavin wrote: >>> >>> "If there is no AS clause then the name of the column is unspecified and >>> may >>> change from one release of SQLite to the next." > >> Heed this warning!!! >> >> And

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 6:52pm, sqlite-mail wrote: > I can understand your point, what confuses me is that when we query a view > with "a.*" it doesn't qualify the names so I thought that was a mistake when > we use individual names otherwise I would expected qualified names there too. I understand

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread sqlite-mail
Hello ! When querying views sqlite shows qualified column names if they are specified individually. Is this the expected result or a bug ? This behavior breaks some of my code that uses column names for other purposes. Cheers ! output of "test-view-alias" SQL: SELECT a.* FROM

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 6:13pm, sqlite-mail wrote: > When querying views sqlite shows qualified column names if they are specified > individually. Sorry but this has been mentioned a few times here and won't be changed. The SQL standard doesn't mention column names so SQL engines are free to do

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Richard Hipp
On 8/25/15, Simon Slavin wrote: > > "If there is no AS clause then the name of the column is unspecified and may > change from one release of SQLite to the next." > Heed this warning!!! And yet, there are countless tens of thousands of applications in circulation that have ignored this warning

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Scott Robison
On Aug 25, 2015 1:02 PM, "Petite Abeille" wrote: > > > > On Aug 25, 2015, at 8:53 PM, R.Smith wrote: > > > > I vote to change it every release... Stimulate better habits! > > Seconded. Keep them on their toes! > Or randomly generate names after every prepare! Or just leave them anonymous.