On Thursday 19 February 2004 08:12 am, D. Richard Hipp wrote:
> Gerard Samuel wrote:
> > If I execute an sql select like ->
> > SELECT f.id, f.foo FROM table f;
> > The returned data is ->
> > f.id        f.foo
> > 1   hello
> > 2   world
> >
> > Instead of the normal (as in other DBs I've used)
> > id  foo
> > 1   hello
> > 2   world
> >
> > Is this the correct/expected behaviour of sqlite?
>
> You can always specify your own column names using
> an AS clause, of source:
>

True.  I even stated in an earlier email that your suggestion would be a 
workaround.
But its one thing if a person is just working with SQLite.
And its another when a person is working with other databases (like myself).
For what Im doing, if sql isn't cross database compatible, I have a problem.
Granted the above suggestion would work on other databases, I dont know, to me 
why should a "normal" database use aliases when it doesn't have to.
Fortunately, I was able to modify my code where it strips out the table 
prefixes from the returned results.  It's a slight performance hit, but hey, 
it does the job.

> SQLite does attach "different" names to the columns
> than other database engines.  This has been a
> persistent source of complaint.  The problem comes
> up on joins more than anyplace else.
>
> Question to all:  If I modified SQLite to use the
> same column naming rules as (say) PostgreSQL, how
> much existing code would it break?  Is this something
> that should be done, even though it is a (slightly)
> incompatible change?

Yes join statements totally break.  I for one vote for sql compatibilty.

Thanks for replying..


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to