[HN Gopher] Custom SQL functions for data analytics in PostgreSQL
       ___________________________________________________________________
        
       Custom SQL functions for data analytics in PostgreSQL
        
       Author : carlotasoto
       Score  : 105 points
       Date   : 2022-06-23 14:19 UTC (8 hours ago)
        
 (HTM) web link (www.timescale.com)
 (TXT) w3m dump (www.timescale.com)
        
       | djbusby wrote:
       | Not specifically about these functions but in general PG makes it
       | pretty easy to build custom functions and data-types. I one of
       | those who doesn't want to put too much business logic in my DB
       | but for those cases where it really makes sense to get into your
       | lower level language and do all the magic it afford on your data
       | - it's a killer feature. Can't do custom extensions in RDS last I
       | looked tho
        
         | asguy wrote:
         | Yah, you can't install AWS-unsupported extensions in RDS, but
         | you can extend the type system and operators. You also have
         | access to stored procedures with plsql/plv8/plperl so it
         | doesn't end up being that bad in the end.
        
           | jerrysievert wrote:
           | heck, even just having pl/pgsql means you can do pretty much
           | anything _safe_ in your Postgres database, you don't need
           | plv8 or plperl.
        
           | cfors wrote:
           | Came here to comment this, there's a ton of awesome stuff
           | around Postgres that using RDS makes impossible. Kinda
           | stinks, but I don't have the time/expertise to manage a
           | Postgres Instance on EC2.
        
             | Tostino wrote:
             | If you have kubernetes experience, running a cluster using
             | a pre-built helm chart (like pgo) takes away a ton of the
             | pain by bundling needed services together and giving you
             | easy upgrade paths, high availability, backups, etc.
        
         | jandrewrogers wrote:
         | This is one of the most under-rated features of PostgreSQL --
         | its extreme extensibility. I've abused this to great effect
         | over the years. If you are bold, you can make it do some things
         | it really wasn't designed to, relatively safely. And the things
         | it was designed to do, like introducing types and operators, is
         | relatively simple.
         | 
         | My only complaint is that for a few realistic use cases (e.g.
         | zero-copy aggregates with variable-sized memory) there is no
         | documentation how to do this efficiently and "correctly".
        
       ___________________________________________________________________
       (page generated 2022-06-23 23:01 UTC)