[{"data":1,"prerenderedAt":588},["ShallowReactive",2],{"project-39428609":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":14,"shown_in_year":16,"top":17,"tier":18,"category":19,"subcategory":20,"format":21,"keywords":22,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":46,"post_text":49,"what":50,"said":83,"maker_in_thread":181,"shape":188,"grid":193,"attempts":550,"same_week":551,"maker_shows":45,"maker_hidden":580,"reader_version":581,"card":582},"39428609","plprql","PRQL in PostgreSQL","title","Show HN: PRQL in PostgreSQL","https:\u002F\u002Fgithub.com\u002Fkaspermarstal\u002Fplprql","github.com","kaspermarstal",1708342071,2024,267,139,3515,8,"legend","data","postgres extension","library",[23,24,25,26,27],"prql","postgresql","pgrx","sql","query language","mixed",0.087,{"positive":31,"neutral":32,"mixed":33,"critical":34},14,17,7,11,49,{"idea":37,"execution":38,"docs":41,"design":42,"performance":44},{"positive":17,"critical":17},{"positive":39,"critical":40},2,0,{"positive":40,"critical":40},{"positive":43,"critical":39},4,{"positive":40,"critical":45},1,[47,40,40,43,48,47,47,40,47,47,47,40,40,45,48,40,48,45,48,48,45,47,47,45,45,47,47,39,47,48,48,40,40,40,40,40,40,48,40,47],3,5,"This extension let's you write PRQL functions in PostgreSQL.\n\nWhen I first saw PRQL on Hacker News a few months ago, I was immediately captivated by the idea, yet equally disappointed that there was no integration for PostgreSQL. Having previous experience with writing PostgreSQL extensions in C, I thought this was a great opportunity to try out the pgrx framework and decided to integrate PRQL with PostgreSQL myself.\n\nThe maintainers of both PRQL and pgrx were very nice to work with. Thanks guys.",{"problem":51,"audience":57,"pricing":57,"motivation":58,"time_to_build":57,"stack":62,"openness":81,"stage":81,"team_size":82},{"value":52,"source":53,"evidence":54},"PostgreSQL has no integration for writing PRQL queries.","maker",[55],{"id":56},"post",null,{"value":59,"source":53,"evidence":60},"Disappointed no PRQL integration existed for PostgreSQL; wanted to try pgrx.",[61],{"id":56},[63,74,77],{"value":64,"source":65,"evidence":66},"Rust","inferred",[67,71],{"id":68,"by":69,"text":70},"39432833","landingunless","Nice to see extensions like this one developed in Rust\u002Fpgrx. Reminds me of https:\u002F\u002Fgithub.com\u002Ftcdi\u002Fplrust",{"id":72,"by":11,"text":73},"39434195","Yes, the PL\u002FRust code base was a very useful when developing this extension",{"value":25,"source":53,"evidence":75},[76],{"id":56},{"value":78,"source":53,"evidence":79},"PostgreSQL",[80],{"id":56},"unknown","solo",{"praise":84,"objections":101,"requests":129,"questions":144,"alternatives":152},[85,97],{"value":86,"source":87,"evidence":88},"PRQL is more readable and convenient than SQL for analytical queries.","commenter",[89,93],{"id":90,"by":91,"text":92},"39429175","snthpy","This comes up every time PRQL makes it onto HackerNews and is a fair question: Short answer: DX Slightly longer answer: Developer productivity and experience, especially for EDA…",{"id":94,"by":95,"text":96},"39429296","lkuty","Sorry to be that guy :-) The `introduction.prql` example on the playground gives an idea of the better readability of PRQL vs SQL and your small example an idea of the speed you…",{"value":98,"source":87,"evidence":99},"Rust\u002Fpgrx extensions are a good approach.",[100],{"id":68,"by":69,"text":70},[102,108,119],{"value":103,"source":53,"evidence":104},"Windows is not supported because pgrx lacks Windows support.",[105],{"id":106,"by":11,"text":107},"39434690","This extension has been developed on top of pgrx and depends on the platforms that pgrx supports. From the pgrx readme: > Windows is not supported. It could be, but will require…",{"value":109,"source":87,"evidence":110},"The PRQL example is no simpler than plain SQL.",[111,115],{"id":112,"by":113,"text":114},"39429349","GordonS","> How long would it take you to write the SQL for that? I don't want to appear rude, but unless I'm missing something, this is a pretty simple SQL query, of the kind anyone with…",{"id":116,"by":117,"text":118},"39430005","audunw","I have a moderate amount of SQL experince, but I could not write that query at the top of my head. Maybe you misunderstand what the PRQL query is doing? Here's the SQL it…",{"value":120,"source":87,"evidence":121},"Adds an abstraction layer over SQL with unclear benefit.",[122,125],{"id":123,"by":95,"text":124},"39429008","I don't understand the need for libraries that abstract away SQL when you could just write SQL directly and have full access to the power of the language which is quite rich…",{"id":126,"by":127,"text":128},"39431051","da_chicken","Eh, `DISTICT ON` is a custom PostgreSQL extension. A standard* method would be: ``` SELECT * FROM tracks QUALIFY row_number() over (partition by album_id order by milliseconds…",[130,137],{"value":131,"source":87,"evidence":132},"Support for Windows.",[133],{"id":134,"by":135,"text":136},"39434407","dataspun","Why is this PRQL extension for Postgres limited to Mac and Linux? What dependencies on Windows are the obstacles, and is there an expected solution in the near-term?",{"value":138,"source":87,"evidence":139},"Compatibility with Grafana.",[140],{"id":141,"by":142,"text":143},"39432498","smabie","Can this be used inside Grafana?",[145],{"value":146,"source":87,"evidence":147},"Is PRQL faster than standard SQL?",[148],{"id":149,"by":150,"text":151},"39435113","mt_","Is PRQL faster than the standard query model?",[153,160,167,174],{"value":154,"source":87,"evidence":155},"Ecto",[156],{"id":157,"by":158,"text":159},"39428910","andy_ppp","Very interesting, it looks a lot like the Elixir package Ecto that has a DSL for writing SQL queries. Obviously there are some differences here and I wonder if the compiler can…",{"value":161,"source":87,"evidence":162},"Microsoft Kusto query language",[163],{"id":164,"by":165,"text":166},"39432985","brikym","It looks a lot like Microsoft’s Kusto query language which is a pleasure to use. Piping is better than nesting and from-first is the way to go as it’s necessary for autocomplete.",{"value":168,"source":87,"evidence":169},"Malloy",[170],{"id":171,"by":172,"text":173},"39432031","mikpanko","There are very interesting improvements to SQL, which are much more ergonomic, extend functionality, and provide higher-level abstractions. Also backward compatible. PRQL and…",{"value":175,"source":87,"evidence":176},"jq \u002F pgJQ",[177],{"id":178,"by":179,"text":180},"39430415","fforflo","Nice work. A few months back, I experimented with having a DSL like PRQL in Postgres, but back then, I found the language a bit cumbersome; however, it was great as an idea.…",{"comments":47,"answered":45,"key":182},[183,184,187],{"id":72,"text":73},{"id":185,"text":186},"39431252","Good suggestion, thanks",{"id":106,"text":107},{"commenters":189,"max_depth":190,"maker_replies":47,"first_comment_mins":191,"lifespan_hours":192},80,9,44,38,[194,196,200,203,206,209,212,215,219,221,224,228,231,235,236,239,241,243,246,251,253,255,258,261,264,267,269,272,275,279,282,283,286,289,292,294,296,300,303,306,309,312,315,318,321,324,326,328,331,334,336,339,342,344,347,349,350,353,356,359,361,362,365,367,370,372,373,374,376,379,381,384,386,388,389,392,395,397,399,402,405,407,410,413,416,419,421,423,425,428,431,434,436,439,441,444,446,450,454,457,459,461,464,466,469,471,474,476,480,482,484,486,488,491,493,495,497,500,502,504,506,508,512,515,517,519,521,523,525,527,529,531,534,536,539,541,543,545,548],[178,40,47,195,179,40],"project\u002Fmixed\u002Fidea",[197,40,40,198,199,40],"39431201","commenter\u002Fneutral\u002Fnone","canadiantim",[201,40,40,202,179,40],"39431543","other\u002Fneutral\u002Fnone",[204,40,40,202,205,40],"39431593","1st1",[207,40,40,198,208,40],"39434910","ttfkam",[210,40,40,198,211,40],"39436025","RedCrowbar",[213,45,40,202,214,40],"39430232","dvdkon",[216,45,40,217,218,40],"39430554","other\u002Fneutral\u002Fidea","dangoldin",[220,45,40,198,214,40],"39432598",[222,45,40,217,223,40],"39435574","andyferris",[225,45,47,226,227,40],"39431354","maker\u002Fneutral\u002Fidea","buremba",[229,45,47,230,214,40],"39432506","project\u002Fneutral\u002Fidea",[232,45,48,233,234,40],"39449023","project\u002Fpositive\u002Fidea","klysm",[157,39,47,230,158,40],[237,47,40,202,238,40],"39431497","dang",[68,43,48,240,69,40],"project\u002Fpositive\u002Fexecution",[72,43,40,242,11,45],"maker\u002Fpositive\u002Fnone",[244,48,40,202,245,40],"39440960","qazxcvbnm",[247,248,47,249,250,40],"39431196",6,"maker\u002Fneutral\u002Fdocs","grepknfss",[185,248,40,252,11,45],"maker\u002Fpositive\u002Fdocs",[164,33,48,254,165,40],"project\u002Fpositive\u002Fdesign",[256,17,47,230,257,40],"39429671","billfruit",[259,17,47,195,260,40],"39430196","xmonkee",[262,17,45,263,208,40],"39434973","project\u002Fcritical\u002Fidea",[265,190,40,217,266,40],"39429689","philipodonnell",[171,268,40,202,172,40],10,[270,268,40,202,271,40],"39432938","chobanilover",[273,268,40,198,274,40],"39433101","chaps",[276,34,47,277,278,40],"39430526","project\u002Fmixed\u002Fdesign","fkyoureadthedoc",[134,280,47,281,135,40],12,"project\u002Fneutral\u002Fexecution",[106,280,40,281,11,45],[149,284,47,285,150,40],13,"project\u002Fneutral\u002Fperformance",[287,284,47,285,288,40],"39435455","Sammi",[290,284,47,285,291,40],"39436042","zokier",[293,284,47,285,288,40],"39447485",[141,31,47,295,142,40],"project\u002Fneutral\u002Fnone",[297,298,40,202,299,40],"39429352",15,"zoky",[301,298,40,202,302,40],"39429629","murermader",[304,298,40,202,305,40],"39429669","throwaway143829",[307,298,40,202,308,40],"39429700","quesera",[310,298,40,202,311,40],"39431136","Terretta",[313,298,40,202,314,40],"39433449","Izkata",[316,298,40,202,317,40],"39429720","saganus",[319,298,40,202,320,40],"39429902","PartiallyTyped",[322,298,40,202,323,40],"39429633","pxeger1",[325,298,40,202,308,40],"39429692",[123,327,45,263,95,40],16,[329,327,40,198,330,40],"39429115","murkt",[332,327,48,233,333,40],"39429118","davedx",[335,327,47,230,95,40],"39429221",[337,327,40,202,338,40],"39429653","CuriouslyC",[340,327,48,254,341,40],"39429119","hosteur",[343,327,40,198,338,40],"39429635",[345,327,40,198,346,40],"39429852","nwatson",[348,327,40,198,127,40],"39431523",[90,327,48,254,91,40],[351,327,40,198,352,40],"39429269","hans_castorp",[354,327,40,198,355,40],"39429291","dewey",[357,327,40,198,358,40],"39429429","hobs",[360,327,40,198,352,40],"39429564",[126,327,45,263,127,40],[363,327,40,198,364,40],"39431956","6gvONxR4sf7o",[366,327,40,202,127,40],"39432350",[368,327,40,202,369,40],"39435519","reactivenz",[371,327,40,198,352,40],"39434931",[94,327,48,254,95,40],[112,327,47,195,113,40],[375,327,48,233,308,40],"39429885",[377,327,40,202,378,40],"39431111","lowercased",[380,327,40,202,308,40],"39436963",[382,327,47,195,383,40],"39433284","setr",[385,327,45,263,208,40],"39435055",[387,327,40,198,383,40],"39438452",[116,327,47,230,117,40],[390,327,40,202,391,40],"39430717","tyre",[393,327,40,202,394,40],"39431949","nightpool",[396,327,40,198,208,40],"39435007",[398,327,40,202,364,40],"39431801",[400,327,47,295,401,40],"39430166","bvrmn",[403,327,40,202,404,40],"39430233","cmpb",[406,327,45,263,338,40],"39429464",[408,327,47,195,409,40],"39429557","sph",[411,327,45,412,338,40],"39429673","project\u002Fcritical\u002Fdesign",[414,327,45,263,415,40],"39429590","gigatexal",[417,327,40,202,418,40],"39430138","orlp",[420,327,40,202,415,40],"39430549",[422,327,40,202,127,40],"39431076",[424,327,40,202,418,40],"39431760",[426,327,48,240,427,40],"39434517","riku_iki",[429,327,45,263,430,40],"39429655","halayli",[432,327,40,198,433,40],"39429788","oulipo",[435,327,45,412,308,40],"39429945",[437,327,48,233,438,40],"39430272","abirch",[440,327,47,230,227,40],"39430428",[442,327,47,230,443,40],"39430676","staticautomatic",[445,327,40,202,227,40],"39435767",[447,327,45,448,449,40],"39431190","project\u002Fcritical\u002Fperformance","beeboobaa",[451,327,47,452,453,40],"39431477","project\u002Fneutral\u002Fdesign","elbear",[455,327,47,195,456,40],"39432361","OJFord",[458,327,40,198,127,40],"39433230",[460,327,40,198,427,40],"39434506",[462,327,48,233,463,40],"39429306","baq",[465,327,40,198,208,40],"39431255",[467,327,40,198,468,40],"39433367","jeroen79",[470,327,40,202,208,40],"39434827",[472,327,48,233,473,40],"39429361","vendiddy",[475,327,40,198,338,40],"39429576",[477,327,40,478,479,40],"39430906","other\u002Fneutral\u002Fperformance","jpgvm",[481,327,40,478,338,40],"39430930",[483,327,40,478,479,40],"39431016",[485,327,40,478,338,40],"39431837",[487,327,40,478,479,40],"39434836",[489,327,40,478,490,40],"39432220","zeroimpl",[492,327,40,478,479,40],"39435169",[494,327,40,478,490,40],"39435372",[496,327,40,198,127,40],"39431937",[498,327,40,499,473,40],"39432723","other\u002Fneutral\u002Fdocs",[501,327,40,202,338,40],"39433979",[503,327,40,202,208,40],"39435108",[505,327,40,478,314,40],"39433715",[507,327,40,198,338,40],"39433966",[509,327,40,510,511,40],"39432919","commenter\u002Fneutral\u002Fidea","ako",[513,327,40,198,514,40],"39429497","haspok",[516,327,40,198,338,40],"39429618",[518,327,40,198,514,40],"39429676",[520,327,40,198,208,40],"39431043",[522,327,40,198,427,40],"39434577",[524,327,40,198,208,40],"39435120",[526,327,40,198,427,40],"39435275",[528,327,40,198,208,40],"39435668",[530,327,40,198,427,40],"39435746",[532,327,48,233,533,40],"39435424","gaganyaan",[535,327,40,198,511,40],"39433113",[537,327,40,202,538,40],"39430066","andix",[540,327,40,202,208,40],"39431103",[542,327,40,198,538,40],"39432762",[544,327,45,263,208,40],"39434712",[546,327,48,233,547,40],"39430895","adrian_b",[549,327,40,198,208,40],"39435154",[],[552,557,562,566,571,576],{"id":553,"name":554,"points":555,"category":556},"39429370","htmz",1020,"dev_tools",{"id":558,"name":559,"points":560,"category":561},"39377508","Gitlab Meeting Simulator",353,"productivity",{"id":563,"name":564,"points":565,"category":19},"39379339","Aldi Price Map",348,{"id":567,"name":568,"points":569,"category":570},"39402142","Driftmania",276,"games",{"id":572,"name":573,"points":574,"category":575},"39425706","RAM Prices",241,"finance_crypto",{"id":577,"name":578,"points":579,"category":556},"39409816","macOS-cross-compiler",215,false,"v2",{"id":583,"name":5,"line":6,"ai":580,"cat":19,"year":13,"points":14,"comments":15,"rec":28,"s":584,"top":17,"kw":585,"maker":11,"domain":10,"tier":18,"attempts":40,"strip":586,"url":9,"mix":587,"praise":86,"objection":103,"sub":20},39428609,0.09,[23,24,25,26,27],"3004533033300150515513311332355000000503",[31,32,33,34],1794036649950]