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.

Haskell Postgres Stored Procedures

57 pointsby runeks8 months ago

3 comments

smilliken8 months ago
My dream would be a database where Haskell is the query language. It's more expressive than SQL and more composable. Every time I see a new SQL feature that would be trivial in a modern language it feels like we're working harder instead of smarter.
评论 #41538857 未加载
评论 #41542657 未加载
评论 #41537521 未加载
评论 #41537404 未加载
评论 #41539044 未加载
nh23423fefe8 months ago
nit. that&#x27;s not the Sieve of Eratosthenes. That&#x27;s trial division.<p>Sieve is O(n log log n) but trial division is O(n^2)
solidsnack90008 months ago
The developer notes:<p><i>As such, unprivileged users are permitted to write and execute functions without the possibility that they will be able to access information or resources that are not allowed to access. This is accomplished by enforcing Haskell&#x27;s strong type system.</i><p>Further on, it says:<p><i>Trusted functions must return type PGm (Maybe result) where result is the appropriate Haskell type as determined by the return type of function while untrusted functions must return type IO (Maybe result). The PGm monad type can be imported from the PGutils module.</i><p>This makes some sense intuitively, but it would be good to see the details worked out. There is always `unsafePerformIO`, after all...
评论 #41538926 未加载
评论 #41538873 未加载