SlideShare une entreprise Scribd logo
1  sur  12
Télécharger pour lire hors ligne
Extensions on PostgreSQL

                               Ever and Will
                      Hitoshi Harada @ FORCIA, Inc.



©2011 FORCIA, Inc.
Extensions on PostgreSQL




©2011 FORCIA, Inc.
Outline

    • Extensibility of PostgreSQL

    • Core extensions

    • Common extensions

    • CREATE EXTENSION

    • PGXN, a.k.a. “PostgreSQL Extension Network”

©2011 FORCIA, Inc.
Extensibility of PostgreSQL


                                                dblink, adminpack, pgcrypto, ...

                       Parser
                                                cube, ltree, citext, hstore, json, …
    Functions        Data Types   PL
                                                pl/R, pl/v8js, pl/Ruby, pl/Lua, …
                     Optimizer
                                                 pgadviser
                      Executor

                       Table                     auto_explain

                       Index
                                               GiST/GIN,
                                               textsearch_senna, textsearch_groonga
  SQL/MED (9.1!)

                                       c.f. external tools: pgpool, slony, pg_bulkload…

©2011 FORCIA, Inc.
Core Extensions

    •    intagg - int_array_aggregate()
    •    intarray - sort(), uniq()
    •    hstore - ‘a=>1, b=>2’->’a’
    •    citext - case insensitive text
    •    cube - (1.5, 2.0, 0.5)
    •    pgcrypto - digest() -- md5, sha1
    •    dblink - dblink_exec(connstr, sql)
    •    earthdistance - earth()
    •    …and more

©2011 FORCIA, Inc.
Common Extensions

    •    PostGIS
    •    Pgmemchache - memcache_[get|add|set]()
    •    SkyTools
    •    OracleFCE - nvl(), reverse(), etc.
    •    pgSphere
    •    pgTAP - ok(val, expected)
    •    textsearch_senna
    •    json
    •    PL & FDW
©2011 FORCIA, Inc.
PLs…

    •    PL/perl      •   PL/sh
    •    PL/python    •   PL/scheme
    •    PL/tcl       •   PL/proxy
    •    PL/ruby      •   PL/js
    •    PL/php       •   PL/v8js
    •    PL/java      •   PL/whitespace – coming soon!
    •    PL/R         •   PL/brainfuck
                          CREATE FUNCTION bf_add(int, int) RETURNS int AS
    •    PL/lua              $$ >>>>[-<<<<+>>>>] $$
                          LANGUAGE brainfuck;
    •    PL/lolcode       SELECT * FROM bf_add(3, 5); -- 8!


©2011 FORCIA, Inc.
FDWs (Foreign Data Wrapper)

    • file_fdw
    • postgresql_fdw
    • twitter_fdw
            SELECT from_user, substr(text, 1, 20), age(current_timestamp, created_at)
            FROM twitter_search WHERE q =‘#iphone’;
             from_user       |        substr        |      age
            -----------------+----------------------+----------------
             anndreilla      | Grab @Scrambleface l | 09:02:19.76668
             tebow904        | @sinner_saved_ u ret | 09:02:30.76668
             iphomania_de    | Cydia-Tweak: Pull to | 09:02:31.76668
             developerworks | The #Social #Network | 09:02:34.76668
             appstorewire    | AppAdvice: Project: | 09:02:42.76668
             appstorewire    | AppAdvice: Project: | 09:02:42.76668
             appstorewire    | AppAdvice: A Chance | 09:02:42.76668
             appstorewire    | AppAdvice: A Chance | 09:02:42.76668
             appstorewire    | AppAdvice: Infinity | 09:02:43.76668
             appstorewire    | AppAdvice: Infinity | 09:02:43.76668
             ChrisCompo      | RT @thedroidguy: #iP | 09:02:46.76668
             DhilipSiva_Aple | #ipad #mac #iphone i | 09:02:48.76668
             brandnewapps    | New iPmart app: iNet | 09:02:48.76668
             brandnewapps    | New iPmart app: A Ne | 09:02:49.76668
             muenchner_kindl | Hard Rock Mobile     | 09:02:59.76668
            (15 rows)

©2011 FORCIA, Inc.
CREATE EXTENSION

    • Proposed for 9.1 Committed for 9.1
             $ psql –d dbname –f /path/to/contrib/hstore.sql


             db=# CREATE EXTENSION hstore;
             CREATE EXTENSION
             db1=# SELECT 'a=>1, b=>2'::hstore;
                  hstore
             --------------------
              "a"=>"1", "b"=>"2"
             (1 row)

             db1=# DROP EXTENSION hstore;
             DROP EXTENSION


    • EASY pg_dump/pg_restore, and DROP. Yay!
©2011 FORCIA, Inc.
PGXN , a.k.a. “PostgreSQL Extension Network”

    • By David E. Wheeler
    • Inspired by CPAN
           – [user@host] $ pgxn install hstore
    • Under development…




©2011 FORCIA, Inc.
Try to make YOUR extensions!


  CREATE OR REPLACE FUNCTION is_timezone(
    tz CITEXT
  ) RETURNS BOOLEAN LANGUAGE plpgsql STABLE AS $$
  BEGIN
    PERFORM NOW() AT TIME ZONE tz;
    RETURN TRUE;
  EXCEPTION WHEN invalid_parameter_value THEN
    RETURN FALSE;
  END;
  $$;
  CREATE DOMAIN timezone AS CITEXT
    CHECK ( is_timezone( VALUE ) );

                                http://blog.pgxn.org/post/1673708474/slides-manager-work


©2011 FORCIA, Inc.
Conclusion



    • You can use rich extensions already.

    • You can make and upload your extension.

    • PostgreSQL is an application platform.




©2011 FORCIA, Inc.

Contenu connexe

Tendances

PostgreSQL Hangout Parameter Tuning
PostgreSQL Hangout Parameter TuningPostgreSQL Hangout Parameter Tuning
PostgreSQL Hangout Parameter TuningAshnikbiz
 
Lessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’tLessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’tPGConf APAC
 
PostgreSQL Extensions: A deeper look
PostgreSQL Extensions:  A deeper lookPostgreSQL Extensions:  A deeper look
PostgreSQL Extensions: A deeper lookJignesh Shah
 
High Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando PatroniHigh Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando PatroniZalando Technology
 
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien Rouhaud
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien RouhaudPGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien Rouhaud
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien RouhaudEqunix Business Solutions
 
PostgreSQL for Oracle Developers and DBA's
PostgreSQL for Oracle Developers and DBA'sPostgreSQL for Oracle Developers and DBA's
PostgreSQL for Oracle Developers and DBA'sGerger
 
10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQLSatoshi Nagayasu
 
On The Building Of A PostgreSQL Cluster
On The Building Of A PostgreSQL ClusterOn The Building Of A PostgreSQL Cluster
On The Building Of A PostgreSQL ClusterSrihari Sriraman
 
PostgreSQL Replication in 10 Minutes - SCALE
PostgreSQL Replication in 10  Minutes - SCALEPostgreSQL Replication in 10  Minutes - SCALE
PostgreSQL Replication in 10 Minutes - SCALEPostgreSQL Experts, Inc.
 
Streaming replication in practice
Streaming replication in practiceStreaming replication in practice
Streaming replication in practiceAlexey Lesovsky
 
Elephants in the Cloud
Elephants in the CloudElephants in the Cloud
Elephants in the CloudMike Fowler
 
PostgreSQL Enterprise Class Features and Capabilities
PostgreSQL Enterprise Class Features and CapabilitiesPostgreSQL Enterprise Class Features and Capabilities
PostgreSQL Enterprise Class Features and CapabilitiesPGConf APAC
 
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)Masao Fujii
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performancePostgreSQL-Consulting
 
Как PostgreSQL работает с диском
Как PostgreSQL работает с дискомКак PostgreSQL работает с диском
Как PostgreSQL работает с дискомPostgreSQL-Consulting
 
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya KosmodemianskyPostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya KosmodemianskyPostgreSQL-Consulting
 
Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2PgTraining
 
Overview of Postgres Utility Processes
Overview of Postgres Utility ProcessesOverview of Postgres Utility Processes
Overview of Postgres Utility ProcessesEDB
 

Tendances (20)

PostgreSQL Hangout Parameter Tuning
PostgreSQL Hangout Parameter TuningPostgreSQL Hangout Parameter Tuning
PostgreSQL Hangout Parameter Tuning
 
Lessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’tLessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’t
 
PostgreSQL Extensions: A deeper look
PostgreSQL Extensions:  A deeper lookPostgreSQL Extensions:  A deeper look
PostgreSQL Extensions: A deeper look
 
High Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando PatroniHigh Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando Patroni
 
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien Rouhaud
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien RouhaudPGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien Rouhaud
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien Rouhaud
 
PostgreSQL for Oracle Developers and DBA's
PostgreSQL for Oracle Developers and DBA'sPostgreSQL for Oracle Developers and DBA's
PostgreSQL for Oracle Developers and DBA's
 
10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL
 
On The Building Of A PostgreSQL Cluster
On The Building Of A PostgreSQL ClusterOn The Building Of A PostgreSQL Cluster
On The Building Of A PostgreSQL Cluster
 
PostgreSQL Replication in 10 Minutes - SCALE
PostgreSQL Replication in 10  Minutes - SCALEPostgreSQL Replication in 10  Minutes - SCALE
PostgreSQL Replication in 10 Minutes - SCALE
 
Streaming replication in practice
Streaming replication in practiceStreaming replication in practice
Streaming replication in practice
 
Elephants in the Cloud
Elephants in the CloudElephants in the Cloud
Elephants in the Cloud
 
PostgreSQL Enterprise Class Features and Capabilities
PostgreSQL Enterprise Class Features and CapabilitiesPostgreSQL Enterprise Class Features and Capabilities
PostgreSQL Enterprise Class Features and Capabilities
 
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performance
 
Как PostgreSQL работает с диском
Как PostgreSQL работает с дискомКак PostgreSQL работает с диском
Как PostgreSQL работает с диском
 
The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA
 
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya KosmodemianskyPostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
 
Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2
 
Shootout at the AWS Corral
Shootout at the AWS CorralShootout at the AWS Corral
Shootout at the AWS Corral
 
Overview of Postgres Utility Processes
Overview of Postgres Utility ProcessesOverview of Postgres Utility Processes
Overview of Postgres Utility Processes
 

En vedette

EXPLicando o Explain no PostgreSQL
EXPLicando o Explain no PostgreSQLEXPLicando o Explain no PostgreSQL
EXPLicando o Explain no PostgreSQLFabrízio Mello
 
DevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di Ciurcio
DevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di CiurcioDevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di Ciurcio
DevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di CiurcioPGDay Campinas
 
石狩DCで運用するプライベートクラウドとハイブリッドクラウドへの展望(既存資産とクラウドの価値を生かすハイブリッドクラウド事例セミナー)
石狩DCで運用するプライベートクラウドとハイブリッドクラウドへの展望(既存資産とクラウドの価値を生かすハイブリッドクラウド事例セミナー)石狩DCで運用するプライベートクラウドとハイブリッドクラウドへの展望(既存資産とクラウドの価値を生かすハイブリッドクラウド事例セミナー)
石狩DCで運用するプライベートクラウドとハイブリッドクラウドへの展望(既存資産とクラウドの価値を生かすハイブリッドクラウド事例セミナー)さくらインターネット株式会社
 
NoSQL + SQL = PostgreSQL (TDC2014 - Porto Alegre/RS)
NoSQL + SQL = PostgreSQL (TDC2014 - Porto Alegre/RS)NoSQL + SQL = PostgreSQL (TDC2014 - Porto Alegre/RS)
NoSQL + SQL = PostgreSQL (TDC2014 - Porto Alegre/RS)Fabrízio Mello
 
PGDay Campinas 2013 - PL/pg…ETL – Transformação de dados para DW e BI usando ...
PGDay Campinas 2013 - PL/pg…ETL – Transformação de dados para DW e BI usando ...PGDay Campinas 2013 - PL/pg…ETL – Transformação de dados para DW e BI usando ...
PGDay Campinas 2013 - PL/pg…ETL – Transformação de dados para DW e BI usando ...PGDay Campinas
 
Planejador de Consultas do PostgreSQL
Planejador de Consultas do PostgreSQLPlanejador de Consultas do PostgreSQL
Planejador de Consultas do PostgreSQLFabrízio Mello
 
PostgreSQL: How to Store Passwords Safely
PostgreSQL: How to Store Passwords SafelyPostgreSQL: How to Store Passwords Safely
PostgreSQL: How to Store Passwords SafelyJuliano Atanazio
 
[db tech showcase Tokyo 2016] C32: 世界一速いPostgreSQLを目指せ!インメモリカラムナの実現 by 富士通株式会...
[db tech showcase Tokyo 2016] C32: 世界一速いPostgreSQLを目指せ!インメモリカラムナの実現 by 富士通株式会...[db tech showcase Tokyo 2016] C32: 世界一速いPostgreSQLを目指せ!インメモリカラムナの実現 by 富士通株式会...
[db tech showcase Tokyo 2016] C32: 世界一速いPostgreSQLを目指せ!インメモリカラムナの実現 by 富士通株式会...Insight Technology, Inc.
 

En vedette (8)

EXPLicando o Explain no PostgreSQL
EXPLicando o Explain no PostgreSQLEXPLicando o Explain no PostgreSQL
EXPLicando o Explain no PostgreSQL
 
DevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di Ciurcio
DevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di CiurcioDevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di Ciurcio
DevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di Ciurcio
 
石狩DCで運用するプライベートクラウドとハイブリッドクラウドへの展望(既存資産とクラウドの価値を生かすハイブリッドクラウド事例セミナー)
石狩DCで運用するプライベートクラウドとハイブリッドクラウドへの展望(既存資産とクラウドの価値を生かすハイブリッドクラウド事例セミナー)石狩DCで運用するプライベートクラウドとハイブリッドクラウドへの展望(既存資産とクラウドの価値を生かすハイブリッドクラウド事例セミナー)
石狩DCで運用するプライベートクラウドとハイブリッドクラウドへの展望(既存資産とクラウドの価値を生かすハイブリッドクラウド事例セミナー)
 
NoSQL + SQL = PostgreSQL (TDC2014 - Porto Alegre/RS)
NoSQL + SQL = PostgreSQL (TDC2014 - Porto Alegre/RS)NoSQL + SQL = PostgreSQL (TDC2014 - Porto Alegre/RS)
NoSQL + SQL = PostgreSQL (TDC2014 - Porto Alegre/RS)
 
PGDay Campinas 2013 - PL/pg…ETL – Transformação de dados para DW e BI usando ...
PGDay Campinas 2013 - PL/pg…ETL – Transformação de dados para DW e BI usando ...PGDay Campinas 2013 - PL/pg…ETL – Transformação de dados para DW e BI usando ...
PGDay Campinas 2013 - PL/pg…ETL – Transformação de dados para DW e BI usando ...
 
Planejador de Consultas do PostgreSQL
Planejador de Consultas do PostgreSQLPlanejador de Consultas do PostgreSQL
Planejador de Consultas do PostgreSQL
 
PostgreSQL: How to Store Passwords Safely
PostgreSQL: How to Store Passwords SafelyPostgreSQL: How to Store Passwords Safely
PostgreSQL: How to Store Passwords Safely
 
[db tech showcase Tokyo 2016] C32: 世界一速いPostgreSQLを目指せ!インメモリカラムナの実現 by 富士通株式会...
[db tech showcase Tokyo 2016] C32: 世界一速いPostgreSQLを目指せ!インメモリカラムナの実現 by 富士通株式会...[db tech showcase Tokyo 2016] C32: 世界一速いPostgreSQLを目指せ!インメモリカラムナの実現 by 富士通株式会...
[db tech showcase Tokyo 2016] C32: 世界一速いPostgreSQLを目指せ!インメモリカラムナの実現 by 富士通株式会...
 

Similaire à Extensions on PostgreSQL

Docker for Development
Docker for DevelopmentDocker for Development
Docker for Developmentallingeek
 
groonga with PostgreSQL
groonga with PostgreSQLgroonga with PostgreSQL
groonga with PostgreSQLAkihiro Okuno
 
Getting Started with Hadoop
Getting Started with HadoopGetting Started with Hadoop
Getting Started with HadoopJosh Devins
 
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...NETWAYS
 
Alan Pope, Sebastian Spaink [InfluxData] | Data Collection 101 | InfluxDays N...
Alan Pope, Sebastian Spaink [InfluxData] | Data Collection 101 | InfluxDays N...Alan Pope, Sebastian Spaink [InfluxData] | Data Collection 101 | InfluxDays N...
Alan Pope, Sebastian Spaink [InfluxData] | Data Collection 101 | InfluxDays N...InfluxData
 
Massively Parallel Process with Prodedural Python by Ian Huston
Massively Parallel Process with Prodedural Python by Ian HustonMassively Parallel Process with Prodedural Python by Ian Huston
Massively Parallel Process with Prodedural Python by Ian HustonPyData
 
Embrace Sparsity At Web Scale: Apache Spark MLlib Algorithms Optimization For...
Embrace Sparsity At Web Scale: Apache Spark MLlib Algorithms Optimization For...Embrace Sparsity At Web Scale: Apache Spark MLlib Algorithms Optimization For...
Embrace Sparsity At Web Scale: Apache Spark MLlib Algorithms Optimization For...Jen Aman
 
Big Data Beyond the JVM - Strata San Jose 2018
Big Data Beyond the JVM - Strata San Jose 2018Big Data Beyond the JVM - Strata San Jose 2018
Big Data Beyond the JVM - Strata San Jose 2018Holden Karau
 
Bar Camp Auckland - Mongo DB Presentation BCA4
Bar Camp Auckland - Mongo DB Presentation BCA4Bar Camp Auckland - Mongo DB Presentation BCA4
Bar Camp Auckland - Mongo DB Presentation BCA4John Ballinger
 
Python and Oracle : allies for best of data management
Python and Oracle : allies for best of data managementPython and Oracle : allies for best of data management
Python and Oracle : allies for best of data managementLaurent Leturgez
 
GraphTour - Workday: Tracking activity with Neo4j (English Version)
GraphTour - Workday: Tracking activity with Neo4j (English Version)GraphTour - Workday: Tracking activity with Neo4j (English Version)
GraphTour - Workday: Tracking activity with Neo4j (English Version)Neo4j
 
Whats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Whats wrong with postgres | PGConf EU 2019 | Craig KerstiensWhats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Whats wrong with postgres | PGConf EU 2019 | Craig KerstiensCitus Data
 
Enabling Python to be a Better Big Data Citizen
Enabling Python to be a Better Big Data CitizenEnabling Python to be a Better Big Data Citizen
Enabling Python to be a Better Big Data CitizenWes McKinney
 
pandas.(to/from)_sql is simple but not fast
pandas.(to/from)_sql is simple but not fastpandas.(to/from)_sql is simple but not fast
pandas.(to/from)_sql is simple but not fastUwe Korn
 
Johnny Miller – Cassandra + Spark = Awesome- NoSQL matters Barcelona 2014
Johnny Miller – Cassandra + Spark = Awesome- NoSQL matters Barcelona 2014Johnny Miller – Cassandra + Spark = Awesome- NoSQL matters Barcelona 2014
Johnny Miller – Cassandra + Spark = Awesome- NoSQL matters Barcelona 2014NoSQLmatters
 
Django deployment with PaaS
Django deployment with PaaSDjango deployment with PaaS
Django deployment with PaaSAppsembler
 
Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Pierre Joye
 
OpenNTF Webinar 2022-08 - XPages Jakarta EE Support in Practice
OpenNTF Webinar 2022-08 - XPages Jakarta EE Support in PracticeOpenNTF Webinar 2022-08 - XPages Jakarta EE Support in Practice
OpenNTF Webinar 2022-08 - XPages Jakarta EE Support in PracticeJesse Gallagher
 
Realtime Analytics with MongoDB Counters (mongonyc 2012)
Realtime Analytics with MongoDB Counters (mongonyc 2012)Realtime Analytics with MongoDB Counters (mongonyc 2012)
Realtime Analytics with MongoDB Counters (mongonyc 2012)Scott Hernandez
 

Similaire à Extensions on PostgreSQL (20)

Docker for Development
Docker for DevelopmentDocker for Development
Docker for Development
 
groonga with PostgreSQL
groonga with PostgreSQLgroonga with PostgreSQL
groonga with PostgreSQL
 
Getting Started with Hadoop
Getting Started with HadoopGetting Started with Hadoop
Getting Started with Hadoop
 
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
 
Alan Pope, Sebastian Spaink [InfluxData] | Data Collection 101 | InfluxDays N...
Alan Pope, Sebastian Spaink [InfluxData] | Data Collection 101 | InfluxDays N...Alan Pope, Sebastian Spaink [InfluxData] | Data Collection 101 | InfluxDays N...
Alan Pope, Sebastian Spaink [InfluxData] | Data Collection 101 | InfluxDays N...
 
Massively Parallel Process with Prodedural Python by Ian Huston
Massively Parallel Process with Prodedural Python by Ian HustonMassively Parallel Process with Prodedural Python by Ian Huston
Massively Parallel Process with Prodedural Python by Ian Huston
 
Embrace Sparsity At Web Scale: Apache Spark MLlib Algorithms Optimization For...
Embrace Sparsity At Web Scale: Apache Spark MLlib Algorithms Optimization For...Embrace Sparsity At Web Scale: Apache Spark MLlib Algorithms Optimization For...
Embrace Sparsity At Web Scale: Apache Spark MLlib Algorithms Optimization For...
 
Big Data Beyond the JVM - Strata San Jose 2018
Big Data Beyond the JVM - Strata San Jose 2018Big Data Beyond the JVM - Strata San Jose 2018
Big Data Beyond the JVM - Strata San Jose 2018
 
Bar Camp Auckland - Mongo DB Presentation BCA4
Bar Camp Auckland - Mongo DB Presentation BCA4Bar Camp Auckland - Mongo DB Presentation BCA4
Bar Camp Auckland - Mongo DB Presentation BCA4
 
Python and Oracle : allies for best of data management
Python and Oracle : allies for best of data managementPython and Oracle : allies for best of data management
Python and Oracle : allies for best of data management
 
GraphTour - Workday: Tracking activity with Neo4j (English Version)
GraphTour - Workday: Tracking activity with Neo4j (English Version)GraphTour - Workday: Tracking activity with Neo4j (English Version)
GraphTour - Workday: Tracking activity with Neo4j (English Version)
 
Whats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Whats wrong with postgres | PGConf EU 2019 | Craig KerstiensWhats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Whats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
 
Stackato v5
Stackato v5Stackato v5
Stackato v5
 
Enabling Python to be a Better Big Data Citizen
Enabling Python to be a Better Big Data CitizenEnabling Python to be a Better Big Data Citizen
Enabling Python to be a Better Big Data Citizen
 
pandas.(to/from)_sql is simple but not fast
pandas.(to/from)_sql is simple but not fastpandas.(to/from)_sql is simple but not fast
pandas.(to/from)_sql is simple but not fast
 
Johnny Miller – Cassandra + Spark = Awesome- NoSQL matters Barcelona 2014
Johnny Miller – Cassandra + Spark = Awesome- NoSQL matters Barcelona 2014Johnny Miller – Cassandra + Spark = Awesome- NoSQL matters Barcelona 2014
Johnny Miller – Cassandra + Spark = Awesome- NoSQL matters Barcelona 2014
 
Django deployment with PaaS
Django deployment with PaaSDjango deployment with PaaS
Django deployment with PaaS
 
Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18
 
OpenNTF Webinar 2022-08 - XPages Jakarta EE Support in Practice
OpenNTF Webinar 2022-08 - XPages Jakarta EE Support in PracticeOpenNTF Webinar 2022-08 - XPages Jakarta EE Support in Practice
OpenNTF Webinar 2022-08 - XPages Jakarta EE Support in Practice
 
Realtime Analytics with MongoDB Counters (mongonyc 2012)
Realtime Analytics with MongoDB Counters (mongonyc 2012)Realtime Analytics with MongoDB Counters (mongonyc 2012)
Realtime Analytics with MongoDB Counters (mongonyc 2012)
 

Dernier

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 

Dernier (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 

Extensions on PostgreSQL

  • 1. Extensions on PostgreSQL Ever and Will Hitoshi Harada @ FORCIA, Inc. ©2011 FORCIA, Inc.
  • 3. Outline • Extensibility of PostgreSQL • Core extensions • Common extensions • CREATE EXTENSION • PGXN, a.k.a. “PostgreSQL Extension Network” ©2011 FORCIA, Inc.
  • 4. Extensibility of PostgreSQL dblink, adminpack, pgcrypto, ... Parser cube, ltree, citext, hstore, json, … Functions Data Types PL pl/R, pl/v8js, pl/Ruby, pl/Lua, … Optimizer pgadviser Executor Table auto_explain Index GiST/GIN, textsearch_senna, textsearch_groonga SQL/MED (9.1!) c.f. external tools: pgpool, slony, pg_bulkload… ©2011 FORCIA, Inc.
  • 5. Core Extensions • intagg - int_array_aggregate() • intarray - sort(), uniq() • hstore - ‘a=>1, b=>2’->’a’ • citext - case insensitive text • cube - (1.5, 2.0, 0.5) • pgcrypto - digest() -- md5, sha1 • dblink - dblink_exec(connstr, sql) • earthdistance - earth() • …and more ©2011 FORCIA, Inc.
  • 6. Common Extensions • PostGIS • Pgmemchache - memcache_[get|add|set]() • SkyTools • OracleFCE - nvl(), reverse(), etc. • pgSphere • pgTAP - ok(val, expected) • textsearch_senna • json • PL & FDW ©2011 FORCIA, Inc.
  • 7. PLs… • PL/perl • PL/sh • PL/python • PL/scheme • PL/tcl • PL/proxy • PL/ruby • PL/js • PL/php • PL/v8js • PL/java • PL/whitespace – coming soon! • PL/R • PL/brainfuck CREATE FUNCTION bf_add(int, int) RETURNS int AS • PL/lua $$ >>>>[-<<<<+>>>>] $$ LANGUAGE brainfuck; • PL/lolcode SELECT * FROM bf_add(3, 5); -- 8! ©2011 FORCIA, Inc.
  • 8. FDWs (Foreign Data Wrapper) • file_fdw • postgresql_fdw • twitter_fdw SELECT from_user, substr(text, 1, 20), age(current_timestamp, created_at) FROM twitter_search WHERE q =‘#iphone’; from_user | substr | age -----------------+----------------------+---------------- anndreilla | Grab @Scrambleface l | 09:02:19.76668 tebow904 | @sinner_saved_ u ret | 09:02:30.76668 iphomania_de | Cydia-Tweak: Pull to | 09:02:31.76668 developerworks | The #Social #Network | 09:02:34.76668 appstorewire | AppAdvice: Project: | 09:02:42.76668 appstorewire | AppAdvice: Project: | 09:02:42.76668 appstorewire | AppAdvice: A Chance | 09:02:42.76668 appstorewire | AppAdvice: A Chance | 09:02:42.76668 appstorewire | AppAdvice: Infinity | 09:02:43.76668 appstorewire | AppAdvice: Infinity | 09:02:43.76668 ChrisCompo | RT @thedroidguy: #iP | 09:02:46.76668 DhilipSiva_Aple | #ipad #mac #iphone i | 09:02:48.76668 brandnewapps | New iPmart app: iNet | 09:02:48.76668 brandnewapps | New iPmart app: A Ne | 09:02:49.76668 muenchner_kindl | Hard Rock Mobile | 09:02:59.76668 (15 rows) ©2011 FORCIA, Inc.
  • 9. CREATE EXTENSION • Proposed for 9.1 Committed for 9.1 $ psql –d dbname –f /path/to/contrib/hstore.sql db=# CREATE EXTENSION hstore; CREATE EXTENSION db1=# SELECT 'a=>1, b=>2'::hstore; hstore -------------------- "a"=>"1", "b"=>"2" (1 row) db1=# DROP EXTENSION hstore; DROP EXTENSION • EASY pg_dump/pg_restore, and DROP. Yay! ©2011 FORCIA, Inc.
  • 10. PGXN , a.k.a. “PostgreSQL Extension Network” • By David E. Wheeler • Inspired by CPAN – [user@host] $ pgxn install hstore • Under development… ©2011 FORCIA, Inc.
  • 11. Try to make YOUR extensions! CREATE OR REPLACE FUNCTION is_timezone( tz CITEXT ) RETURNS BOOLEAN LANGUAGE plpgsql STABLE AS $$ BEGIN PERFORM NOW() AT TIME ZONE tz; RETURN TRUE; EXCEPTION WHEN invalid_parameter_value THEN RETURN FALSE; END; $$; CREATE DOMAIN timezone AS CITEXT CHECK ( is_timezone( VALUE ) ); http://blog.pgxn.org/post/1673708474/slides-manager-work ©2011 FORCIA, Inc.
  • 12. Conclusion • You can use rich extensions already. • You can make and upload your extension. • PostgreSQL is an application platform. ©2011 FORCIA, Inc.