On Sat, Mar 8, 2014 at 10:52 AM, Max Vlasov wrote:
> On Fri, Mar 7, 2014 at 11:51 PM, Dominique Devienne
> wrote:
>>
>> basically register_function('rpad', 'x', 'y', 'printf(''%-*s'', y,
>> x)') would register a 2-arg function (register_function's
On Fri, Mar 7, 2014 at 11:51 PM, Dominique Devienne wrote:
>
> basically register_function('rpad', 'x', 'y', 'printf(''%-*s'', y,
> x)') would register a 2-arg function (register_function's argc-2)
> named $argv[0], which executes the following statement
>
> with
On Sat, Mar 8, 2014 at 2:16 AM, Clemens Ladisch wrote:
> Eduardo Morras wrote:
>> So, if a webapp that uses SQLite doesn't check it's input, functions that
>> renames SQLite internals can be injected
>>
>> SELECT register_simple_function('MAX', 1, 'DROP TABLE ?');
>
> Such a
Dominique Devienne wrote:
>> On Fri, Mar 7, 2014 at 6:39 PM, Clemens Ladisch wrote:
>>> SELECT register_simple_function('rpad', 2, 'SELECT printf(''%-*s'', ?, ?)');
>
> But doesn't the above assume you can bind values inside the select
> clause? I thought one couldn't...
Eduardo Morras wrote:
> Clemens Ladisch wrote:
>> Actually, no change to SQLite itself would be needed. It's possible
>> to create an extension that provides a function that allows to
>> register another function that executes a custom SQL expression:
>>
>> SELECT
On Fri, Mar 7, 2014 at 10:19 PM, Eduardo Morras wrote:
> On Fri, 07 Mar 2014 15:39:57 +0100
> Clemens Ladisch wrote:
>
>> Actually, no change to SQLite itself would be needed. It's possible
>> to create an extension that provides a function that allows to
On Fri, 07 Mar 2014 15:39:57 +0100
Clemens Ladisch wrote:
> Actually, no change to SQLite itself would be needed. It's possible
> to create an extension that provides a function that allows to
> register another function that executes a custom SQL expression:
>
> SELECT
On Fri, Mar 7, 2014 at 7:37 PM, Max Vlasov wrote:
> On Fri, Mar 7, 2014 at 6:39 PM, Clemens Ladisch wrote:
>> Max Vlasov wrote:
>>>
>>> Nice suggestion. This probably falls into case when a small new part
>>> needed on sqlite side
>>
>> Actually, no
On Fri, Mar 7, 2014 at 6:39 PM, Clemens Ladisch wrote:
> Max Vlasov wrote:
>>
>> Nice suggestion. This probably falls into case when a small new part
>> needed on sqlite side
>
> Actually, no change to SQLite itself would be needed. It's possible
> to create an extension that
On Fri, Mar 7, 2014 at 5:27 PM, Eleytherios Stamatogiannakis
wrote:
> IMHO, SQLite is targeted towards being a relational "core" with very wide
> extensibility. Adding specific scripting engines to it is would be
> detrimental to its main purpose (being a very good relational
IMHO, SQLite is targeted towards being a relational "core" with very
wide extensibility. Adding specific scripting engines to it is would be
detrimental to its main purpose (being a very good relational "core").
In our group, we use SQLite + UDFs written in Python. Creating new
functions is
On Fri, Mar 7, 2014 at 3:39 PM, Clemens Ladisch wrote:
> Max Vlasov wrote:
>> On Fri, Mar 7, 2014 at 12:49 PM, Dominique Devienne
>> wrote:
>>> I think what SQLite lacks is a syntax to define custom function like
>>> it does for virtual tables. Something
Max Vlasov wrote:
> On Fri, Mar 7, 2014 at 12:49 PM, Dominique Devienne
> wrote:
>> I think what SQLite lacks is a syntax to define custom function like
>> it does for virtual tables. Something like:
>>
>> create function rpad(x, y) using scripty_module as "return
>>
On Fri, Mar 7, 2014 at 11:29 AM, Max Vlasov wrote:
> On Fri, Mar 7, 2014 at 12:49 PM, Dominique Devienne
> wrote:
>> I think what SQLite lacks is a syntax to define custom function like
>> it does for virtual tables. Something like:
>>
>> create
On Fri, Mar 7, 2014 at 12:49 PM, Dominique Devienne wrote:
> I think what SQLite lacks is a syntax to define custom function like
> it does for virtual tables. Something like:
>
> create function rpad(x, y) using scripty_module as "return
> PRINTF('%-*s',y,x)";
>
Nice
On Fri, Mar 7, 2014 at 10:07 AM, Eduardo Morras wrote:
> Creating extensions in SQLite is not difficult nor hard. You can define yours
> with this line:
It's no hard, no, if you're already a C developer. But it's hardly
convenient when you need something quickly.
Between
On Thu, 6 Mar 2014 22:41:31 -0500
Gabor Grothendieck wrote:
> On Thu, Mar 6, 2014 at 8:41 PM, RSmith wrote:
> >
> > On 2014/03/07 01:59, Gabor Grothendieck wrote:
> >>
> >>
> >>>
>
> > A small enhancement request:
> >
> > It would be
On Fri, Mar 7, 2014 at 7:38 AM, Zsbán Ambrus wrote:
> On 3/7/14, RSmith wrote:
>> Add to this the fact that you can - through SQL's ability to add
>> user-defined functions (an almost unique ability among SQL engines)
>
> Is that really so? I thought most
On 3/7/14, RSmith wrote:
> Add to this the fact that you can - through SQL's ability to add
> user-defined functions (an almost unique ability among SQL engines)
Is that really so? I thought most sql engines had that. You can
define functions in at least postgreSQL:
On Thu, Mar 6, 2014 at 8:41 PM, RSmith wrote:
>
> On 2014/03/07 01:59, Gabor Grothendieck wrote:
>>
>>
>>>
> A small enhancement request:
>
> It would be great if the RPAD and LPAD functions could be implemented
> in
> sqlite.
>
The SQLite you
On 2014/03/07 01:59, Gabor Grothendieck wrote:
A small enhancement request:
It would be great if the RPAD and LPAD functions could be implemented in
sqlite.
The SQLite you can get the effect of RPAD(x,y) using PRINTF('%-*s',y,x).
See http://www.sqlite.org/lang_corefunc.html#printf for
On Thu, Mar 6, 2014 at 6:29 PM, Walter Hurry wrote:
> Richard Hipp wrote:
>
>> On Thu, Mar 6, 2014 at 3:41 PM, Walter Hurry wrote:
>>
>>> A small enhancement request:
>>>
>>> It would be great if the RPAD and LPAD functions could be implemented in
Richard Hipp wrote:
> On Thu, Mar 6, 2014 at 3:41 PM, Walter Hurry wrote:
>
>> A small enhancement request:
>>
>> It would be great if the RPAD and LPAD functions could be implemented in
>> sqlite.
>>
>
> The SQLite you can get the effect of RPAD(x,y) using
On Thu, Mar 6, 2014 at 3:41 PM, Walter Hurry wrote:
> A small enhancement request:
>
> It would be great if the RPAD and LPAD functions could be implemented in
> sqlite.
>
The SQLite you can get the effect of RPAD(x,y) using PRINTF('%-*s',y,x).
See
A small enhancement request:
It would be great if the RPAD and LPAD functions could be implemented in sqlite.
I know I can easily achieve the equivalent by concatenating and TRUNCing, but
if the functions were available natively it would avoid the need to hack third
party SQL scripts.
Dr.
25 matches
Mail list logo