Re: [sqlite] Join function in select statement

2004-11-02 Thread Dan Keeley

Loading shared libraries is easy enough on windows and
Linux, but throw AIX and HPUX and Solaris into the mix
and suddenly things become more complicated.  SQLite is
a cross-platform library.  It has to work on more than
just windows.
Really? Both these platforms support shared libraries - I use the 
functionality on each every day!

Why therefore is it such a problem for SQLite?
Dan



RE: [sqlite] Join function in select statement

2004-11-02 Thread CARIOTOGLOU MIKE


> -Original Message-
> From: D. Richard Hipp [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 02, 2004 4:49 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [sqlite] Join function in select statement
> 
> 
> CARIOTOGLOU MIKE wrote:
> > Why not provide some extra functionality on one platform ? 
> > 
> 
> Because that's not what SQLite does.  SQLite works the same
> on all platforms.
> 
> Note also that were this policy to change and SQLite were
> allowed to have extra features on selected platforms, it is
> most likely that Unix would get the extra features and windows
> users would be left to fend for themselves, not the other way
> around.
> -- 
> D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565

ok, point taken! I will not argue about this or any similar matter again :)
:)
 



Re: [sqlite] Join function in select statement

2004-11-02 Thread D. Richard Hipp
CARIOTOGLOU MIKE wrote:
Why not provide some extra functionality on one platform ? 

Because that's not what SQLite does.  SQLite works the same
on all platforms.
Note also that were this policy to change and SQLite were
allowed to have extra features on selected platforms, it is
most likely that Unix would get the extra features and windows
users would be left to fend for themselves, not the other way
around.
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


Re: [sqlite] Join function in select statement

2004-11-02 Thread Gerhard Haering
On Tue, Nov 02, 2004 at 04:36:41PM +0200, CARIOTOGLOU MIKE wrote:
> [user-defined functions loadable through shared libraries]
> true. OTOH, since, as you say, it *is* simple, why not provide some extra
> functionality on one platform ? it does not affect other platforms, and it
> is s nice to have.. it would be an IFDEF thingy, anyway.. of course, you
> know best.

Why don't you just distribute a patched SQLite shared library if you
use user-defined functions in your own applications, but want other
applications to use these functions, too.

That's the only use-case anyway, isn't it?

-- Gerhard
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


signature.asc
Description: Digital signature


RE: [sqlite] Join function in select statement

2004-11-02 Thread CARIOTOGLOU MIKE
true. OTOH, since, as you say, it *is* simple, why not provide some extra
functionality on one platform ? it does not affect other platforms, and it
is s nice to have.. it would be an IFDEF thingy, anyway.. of course, you
know best.

> -Original Message-
> From: D. Richard Hipp [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 02, 2004 3:44 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [sqlite] Join function in select statement
> 
> 
> CARIOTOGLOU MIKE wrote:
> > write a user-defined function in your hosting code. the 
> only problem is,
> > people that use your database (as opposed to your code), 
> will not be able to
> > use the function. DRH, what about DLL-loadable functions ? 
> this should be
> > easy to arrange, and would be of enormous help.
> > example :
> > 
> > pragma load_Functions "c:\myfuncs.dll"
> > 
> 
> Loading shared libraries is easy enough on windows and
> Linux, but throw AIX and HPUX and Solaris into the mix
> and suddenly things become more complicated.  SQLite is
> a cross-platform library.  It has to work on more than
> just windows.
> 
> 
> -- 
> D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
> 



Re: [sqlite] Join function in select statement

2004-11-02 Thread D. Richard Hipp
CARIOTOGLOU MIKE wrote:
write a user-defined function in your hosting code. the only problem is,
people that use your database (as opposed to your code), will not be able to
use the function. DRH, what about DLL-loadable functions ? this should be
easy to arrange, and would be of enormous help.
example :
pragma load_Functions "c:\myfuncs.dll"
Loading shared libraries is easy enough on windows and
Linux, but throw AIX and HPUX and Solaris into the mix
and suddenly things become more complicated.  SQLite is
a cross-platform library.  It has to work on more than
just windows.
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


Re: [sqlite] Join function in select statement

2004-11-02 Thread Eric Bohlman
Marcel Strittmatter wrote:
Hi all
I like to have a join function that I can use in a select statement like 
this:

select join(name, ',') from people;
this should produce something like this:
scott,martin,jones,adams
It is not possible to use perl or another script language. The only 
language I can use is C/C++. Is there a way to create such a function 
outside of sqlite, or do I have to extend the sqlite library?
You ought to be able to do it with a user-defined function (I'd call it 
something other than "join," though, for sanity reasons).