TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

SQLite 3.44: Interactive release notes

162 pointsby marcobambiniover 1 year ago

9 comments

matharminover 1 year ago
I can definitely see where ORDER BY in aggregates would be useful - I recently used it with Postgres, and didn&#x27;t even know it&#x27;s not available in SQLite. Often you can do the sorting in the app code, but it&#x27;s nice to do directly in the query.<p>Other niche but useful features I&#x27;ve found with GROUP BY:<p>1. You can filter the rows used for the aggregate using a FILTER clause [1]: `group_concat(name order by name desc) filter where(salary &gt; 100)`. While you could do the same filter in the main query, this form would still give you departments where all employees are filtered out.<p>2. When selecting non-aggregate values in a GROUP BY, an arbitrary row is typically picked. You can control which one is picked by using min() or max() on a different column [2]. Example: `select depertment, name as best_earner, max(salary) as best_salary from employees group by department`<p>[1]: <a href="https:&#x2F;&#x2F;www.sqlite.org&#x2F;lang_aggfunc.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.sqlite.org&#x2F;lang_aggfunc.html</a><p>[2]: <a href="https:&#x2F;&#x2F;www.sqlite.org&#x2F;lang_select.html#bare_columns_in_an_aggregate_query" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.sqlite.org&#x2F;lang_select.html#bare_columns_in_an_a...</a>
评论 #38095528 未加载
spiffytechover 1 year ago
From the full release notes:<p>&gt; The PRAGMA case_sensitive_like statement is deprecated, as its use when the schema contains LIKE operators can lead to reports of database corruption by PRAGMA integrity_check.<p>Without enabling that pragma, you get the default behavior where &#x27;a&#x27; LIKE &#x27;A&#x27; is true.<p>This is unfortunate, since case-sensitive comparisons seem like an important tool.<p>I&#x27;m not sure there&#x27;s another built-in option for this. SQLite doesn&#x27;t ship with a regex engine (you have to wire up an application-defined SQL function, if your driver supports it).
评论 #38097551 未加载
stuxover 1 year ago
&gt; Aggregate functions can now include an ORDER BY clause after their last parameter.<p>Hopefully that means we&#x27;ll soon get support for `DISTINCT` in `GROUP_CONCAT`.<p>Atm you can do `group_concat(x, &#x27;|&#x27;)` and `group_concat(distinct x)`, but you can&#x27;t do `group_concat(distinct x, &#x27;|&#x27;)`.
评论 #38102161 未加载
howtoflyover 1 year ago
I found SQLite grow bigger and bigger: - For 3.7.8, its default build on x86 is only 350KiB (1). - Now it is 650 KB (2).<p>This is really worrying, especially for the field of embedded development.<p>[1] <a href="https:&#x2F;&#x2F;www.hwaci.com&#x2F;sw&#x2F;sqlite&#x2F;footprint.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.hwaci.com&#x2F;sw&#x2F;sqlite&#x2F;footprint.html</a> [2] <a href="https:&#x2F;&#x2F;www.sqlite.org&#x2F;footprint.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.sqlite.org&#x2F;footprint.html</a>
评论 #38102232 未加载
bambaxover 1 year ago
&gt; <i>As you probably know, the group_concat function is SQLite (and MySQL) specific. In other databases (namely, PostgreSQL and SQL Server) the function is called string_agg. As of 3.44, SQLite also supports string_agg as an alias for group_concat(expr, sep) (...) Now the only black sheep is Oracle, where the poor function is called listagg.</i><p>Minor nitpick, but why not go all the way and add the Oracle syntax while they were at it? Is there a technical reason not to? (I&#x27;ve never used Oracle)
评论 #38096272 未加载
评论 #38100483 未加载
stef-13013over 1 year ago
Nice... SQLite remains an exceptional piece of software !!
karolistover 1 year ago
Is there any chance SQLite will sometime work stored under CIFS&#x2F;SMB shares? I wanted to store all my container &#x2F;config directories under NAS but can&#x27;t with the ones using SQLite.
评论 #38095857 未加载
评论 #38095948 未加载
评论 #38109082 未加载
pixel_tracingover 1 year ago
Can we please get array support and aggregates like collect_set
评论 #38096157 未加载
compilator1over 1 year ago
SQlite is good as software, but PR for it is annoying and to much.
评论 #38095498 未加载
评论 #38097073 未加载