TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Discovering less-known Postgres v12 features

243 点作者 samsk超过 5 年前

7 条评论

Deimorz超过 5 年前
It was added in 11, but I want to mention again how great of an addition the websearch_to_tsquery() function was. You can now get a respectable search system immediately in PostgreSQL without having to implement any sort of query-parsing or special data indexing yourself. All you need to do is add a column&#x2F;index for fulltext search, which you can even do now using the generated columns added in 12 (instead of a trigger).<p>Then just pass user-entered queries through websearch_to_tsquery() and have access to multiple search capabilities easily. It supports searching for alternatives with &quot;or&quot;, phrases in quotes, and excluding terms with a minus sign, which is all syntax that a lot of people are already used to. For example it can handle a query like:<p><pre><code> blizzard or overwatch -&quot;hong kong&quot; </code></pre> That would find anything with &quot;blizzard&quot; or &quot;overwatch&quot; in it, but exclude anything with &quot;hong kong&quot; (if you wanted to avoid results about that recent controversy).<p>It&#x27;s really useful, and makes it so that you can add reasonable search functionality with almost no work at all.
评论 #21662232 未加载
tbrock超过 5 年前
Inlining CTEs is a big deal but they also finally have a way to see the progress of an index build without a PhD in postgresology!<p>Check it out here: <a href="https:&#x2F;&#x2F;www.postgresql.org&#x2F;docs&#x2F;12&#x2F;progress-reporting.html" rel="nofollow">https:&#x2F;&#x2F;www.postgresql.org&#x2F;docs&#x2F;12&#x2F;progress-reporting.html</a>
评论 #21659671 未加载
评论 #21660437 未加载
评论 #21659327 未加载
cdcarter超过 5 年前
SQL&#x2F;JSON path expressions look very powerful for making queries easier to understand, they’re a part of the SQL spec I hadn’t seen yet.<p>I’m a little sad though to see yet another JSON location mini-language appear. We’ve got JSONPointer (IETF standard for the web, used by jsonschema), JSONPath, the more expressive but cross language JMESPath, the CLI favorite jq, and presumably a billion more. It’s wearing me out.
macdice超过 5 年前
One nice thing about the CTE inlining its that materialised CTEs were stopping parallelism from being used. WITH is useful in big OLAP queries, where parallelisms should really help.
评论 #21660773 未加载
Boulth超过 5 年前
Are there any good advanced SQL books out there?
评论 #21661587 未加载
评论 #21661509 未加载
评论 #21660915 未加载
GordonS超过 5 年前
Wasn&#x27;t aware of log_transaction_sample_rate - should be useful for not spamming the logs.
zonidjan超过 5 年前
Site blocking the page with an empty overlay named &quot;BorlabsCookie&quot;. No thanks.
评论 #21660344 未加载