PRQL: Pipelined Relational Query Language
1–10 of 214 posts
Re: PRQL: Pipelined Relational Query Language
#2Re: PRQL: Pipelined Relational Query Language
#3Re: PRQL: Pipelined Relational Query Language
#4Show HN: PRQL 0.2 – a better SQL - 378 points by maximilianroos on June 27, 2022, 161 comments
Original post when it was conceived: https://news.ycombinator.com/item?id=30060784
PRQL – A proposal for a better SQL - 650 points by maximilianroos on Jan 24, 2022, 295 comments
Re: PRQL: Pipelined Relational Query Language
#5Re: PRQL: Pipelined Relational Query Language
#6In general, I like this slightly more careful take on modern database development. 10-15 years people would start a brand new database like Mongo, or Riak, or Influx, or whatever, and would try to convince application developers to select it for new projects. But recently we started getting more conservative options like EdgeDB, TimescaleDB, or even PRQL which all expect us to run Postgres with some addons and / or query preprocessors. Tech like this is so much easier to adopt!
I'm really liking what Edge folks are doing with schemas and migrations, but I do find PRQL syntax much more intuitive. My application code is littered with data transformation pipelines already: all these map / filter chains in TYpeScript, iterators in Rust, enumerables in Ruby, streams in Java, LINQ in .net, Rx in dozens of languages etc. etc. So the concept is very, very familiar. Getting nice SQL queries out of PRQL that I can store, inspect later, see the query plans, add indices where necessary, is just great. It's such a good tool!
Re: PRQL: Pipelined Relational Query Language
#7Re: PRQL: Pipelined Relational Query Language
#8Re: PRQL: Pipelined Relational Query Language
#9How are joins handled? A relational db is largely about the relations, otherwise this is more of a document query language.
from employees
join side:left positions (employees.id==positions.employee_id)
which translates to SELECT
employees.*,
positions.*
FROM
employees
LEFT JOIN positions ON employees.id = positions.employee_idRe: PRQL: Pipelined Relational Query Language
#10I really want this to take off and become a first party supported language for Postgres. Yes, yes, relational algebra is beautiful and all that jazz. SQL is a garbage, first pass design that should have been replaced decades ago. Even Codd has complaints about it. It is amazing what he invented, but we have learned a lot about PL design since then.