SlideShare a Scribd company logo
PostgreSQL ’s  (short)   INTRODUCTION Nguyen Vu Hung [email_address] 2010/05/05
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
History  ,[object Object],[object Object],[object Object],[object Object],[object Object]
License ,[object Object],[object Object]
GPL versus MIT-style License ,[object Object],[object Object],[object Object],MIT:  Massachusetts Institute of Technology
Supported OSes ,[object Object],[object Object],[object Object],[object Object],[object Object]
Installation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Main Features ,[object Object],[object Object],[object Object],[object Object]
PL/pgSQL ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],FUNCTION GetEmplNm (p_emplid IN VARCHAR2)  RETURN VARCHAR2  IS  BEGIN  IF NVL(g_emplid1,'X') <> p_emplid THEN  BEGIN  SELECT name  INTO g_name  FROM ps_personal_data  WHERE emplid = p_emplid;  EXCEPTION  WHEN OTHERS THEN  g_name := NULL;  END;  g_emplid1 := p_emplid;  END IF; RETURN g_name;  END GetEmplNm;  PL/SQL
PHP and PostgresSQL ?>   $dbconn4  =  pg_connect ( $conn_string ); $conn_string  =  &quot;host=sheep port=5432 dbname=test user=test password=bar&quot; ; $dbconn3  =  pg_connect ( &quot;host=sheep port=5432 dbname=test user=test password=foo&quot; ); $dbconn2  =  pg_connect ( &quot;host=localhost port=5432 dbname=test&quot; ); $dbconn  =  pg_connect ( &quot;dbname=test&quot; ); <?php
PHP PostgreSQL wrappers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Indexes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],GiST : Generalized Search Tree  B+ tree:  BplusTree  CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ]  name   ON  table   [ USING  method  ]  ( {  column  | (  expression  ) } [  opclass  ]   [ ASC | DESC ] [ NULLS { FIRST | LAST } ] [, ...] )  [ WITH (  storage_parameter  =  value  [, ... ] ) ] [ TABLESPACE  tablespace  ] [ WHERE  predicate  ]
Triggers ,[object Object],[object Object],[object Object],[object Object],[object Object],CREATE TRIGGER  name  { BEFORE | AFTER } {  event  [ OR ... ] }  ON  table  [ FOR [ EACH ] { ROW | STATEMENT } ]  EXECUTE PROCEDURE  funcname  (  arguments  )
MVCC ,[object Object],[object Object],[object Object],[object Object],[object Object]
Cursors ,[object Object],[object Object],[object Object],DECLARE curs1 refcursor;  curs2 CURSOR FOR SELECT * FROM tenk1;  curs3 CURSOR (key integer) IS SELECT * FROM tenk1 WHERE unique1 = key; OPEN curs1 FOR SELECT * FROM foo WHERE key = mykey;  FETCH curs2 INTO foo, bar, baz;  CLOSE curs1;
Functions and Cursors CREATE FUNCTION myfunc(refcursor, refcursor)  RETURNS SETOF refcursor AS $$  BEGIN  OPEN $1 FOR SELECT * FROM table_1;  RETURN NEXT $1;  OPEN $2 FOR SELECT * FROM table_2;  RETURN NEXT $2;  END;  $$ LANGUAGE plpgsql;  -- need to be in a transaction to use cursors.  BEGIN;  SELECT * FROM myfunc('a', 'b');  FETCH ALL FROM a;  FETCH ALL FROM b; COMMIT;
View ,[object Object],[object Object],[object Object],CREATE VIEW comedies AS  SELECT *  FROM films  WHERE kind = 'Comedy';
Other Features ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Tools ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
References ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

Oracle12c Pluggable Database Hands On - TROUG 2014
Oracle12c Pluggable Database Hands On - TROUG 2014Oracle12c Pluggable Database Hands On - TROUG 2014
Oracle12c Pluggable Database Hands On - TROUG 2014
Özgür Umut Vurgun
 
External Language Stored Procedures for MySQL
External Language Stored Procedures for MySQLExternal Language Stored Procedures for MySQL
External Language Stored Procedures for MySQL
Antony T Curtis
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
Dvir Volk
 

What's hot (20)

What is new in PostgreSQL 14?
What is new in PostgreSQL 14?What is new in PostgreSQL 14?
What is new in PostgreSQL 14?
 
Oracle12c Pluggable Database Hands On - TROUG 2014
Oracle12c Pluggable Database Hands On - TROUG 2014Oracle12c Pluggable Database Hands On - TROUG 2014
Oracle12c Pluggable Database Hands On - TROUG 2014
 
External Language Stored Procedures for MySQL
External Language Stored Procedures for MySQLExternal Language Stored Procedures for MySQL
External Language Stored Procedures for MySQL
 
Developers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sad
Developers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sadDevelopers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sad
Developers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sad
 
Analyze corefile and backtraces with GDB for Mysql/MariaDB on Linux - Nilanda...
Analyze corefile and backtraces with GDB for Mysql/MariaDB on Linux - Nilanda...Analyze corefile and backtraces with GDB for Mysql/MariaDB on Linux - Nilanda...
Analyze corefile and backtraces with GDB for Mysql/MariaDB on Linux - Nilanda...
 
MySQL database replication
MySQL database replicationMySQL database replication
MySQL database replication
 
MySQL Audit using Percona audit plugin and ELK
MySQL Audit using Percona audit plugin and ELKMySQL Audit using Percona audit plugin and ELK
MySQL Audit using Percona audit plugin and ELK
 
Using Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDBUsing Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDB
 
Centralized + Unified Logging
Centralized + Unified LoggingCentralized + Unified Logging
Centralized + Unified Logging
 
MySQL Replication Update -- Zendcon 2016
MySQL Replication Update -- Zendcon 2016MySQL Replication Update -- Zendcon 2016
MySQL Replication Update -- Zendcon 2016
 
MySQL Replication Basics -Ohio Linux Fest 2016
MySQL Replication Basics -Ohio Linux Fest 2016MySQL Replication Basics -Ohio Linux Fest 2016
MySQL Replication Basics -Ohio Linux Fest 2016
 
MySQL as a Document Store
MySQL as a Document StoreMySQL as a Document Store
MySQL as a Document Store
 
Installing postgres & postgis
Installing postgres & postgisInstalling postgres & postgis
Installing postgres & postgis
 
Mysql all
Mysql allMysql all
Mysql all
 
8b. Column Oriented Databases Lab
8b. Column Oriented Databases Lab8b. Column Oriented Databases Lab
8b. Column Oriented Databases Lab
 
Percona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationPercona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL Administration
 
8a. How To Setup HBase with Docker
8a. How To Setup HBase with Docker8a. How To Setup HBase with Docker
8a. How To Setup HBase with Docker
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Evolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best PracticesEvolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best Practices
 
SQL Server vs Postgres
SQL Server vs PostgresSQL Server vs Postgres
SQL Server vs Postgres
 

Viewers also liked

Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQL
Mark Wong
 
Mvcc Unmasked (Bruce Momjian)
Mvcc Unmasked (Bruce Momjian)Mvcc Unmasked (Bruce Momjian)
Mvcc Unmasked (Bruce Momjian)
Ontico
 
The Power of MySQL Explain
The Power of MySQL ExplainThe Power of MySQL Explain
The Power of MySQL Explain
MYXPLAIN
 
Mv unmasked.w.code.march.2013
Mv unmasked.w.code.march.2013Mv unmasked.w.code.march.2013
Mv unmasked.w.code.march.2013
EDB
 

Viewers also liked (20)

Get to know PostgreSQL!
Get to know PostgreSQL!Get to know PostgreSQL!
Get to know PostgreSQL!
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQL
 
PostgreSQL Deep Internal
PostgreSQL Deep InternalPostgreSQL Deep Internal
PostgreSQL Deep Internal
 
Karabük Üniversitesi Programlama Günleri - PostgreSQL Sunumu
Karabük Üniversitesi Programlama Günleri - PostgreSQL SunumuKarabük Üniversitesi Programlama Günleri - PostgreSQL Sunumu
Karabük Üniversitesi Programlama Günleri - PostgreSQL Sunumu
 
Mvcc Unmasked (Bruce Momjian)
Mvcc Unmasked (Bruce Momjian)Mvcc Unmasked (Bruce Momjian)
Mvcc Unmasked (Bruce Momjian)
 
MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDB
 
The nightmare of locking, blocking and isolation levels!
The nightmare of locking, blocking and isolation levels!The nightmare of locking, blocking and isolation levels!
The nightmare of locking, blocking and isolation levels!
 
PostgreSQL - Object Relational Database
PostgreSQL - Object Relational DatabasePostgreSQL - Object Relational Database
PostgreSQL - Object Relational Database
 
The Power of MySQL Explain
The Power of MySQL ExplainThe Power of MySQL Explain
The Power of MySQL Explain
 
Mysql For Developers
Mysql For DevelopersMysql For Developers
Mysql For Developers
 
Como migrar una base de datos de mysql a power designer
Como migrar una base de datos de mysql a power designerComo migrar una base de datos de mysql a power designer
Como migrar una base de datos de mysql a power designer
 
Mv unmasked.w.code.march.2013
Mv unmasked.w.code.march.2013Mv unmasked.w.code.march.2013
Mv unmasked.w.code.march.2013
 
Explain
ExplainExplain
Explain
 
Inno db internals innodb file formats and source code structure
Inno db internals innodb file formats and source code structureInno db internals innodb file formats and source code structure
Inno db internals innodb file formats and source code structure
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQL
 
PostgreSQL and RAM usage
PostgreSQL and RAM usagePostgreSQL and RAM usage
PostgreSQL and RAM usage
 
Converting from MySQL to PostgreSQL
Converting from MySQL to PostgreSQLConverting from MySQL to PostgreSQL
Converting from MySQL to PostgreSQL
 
PostgreSQL Hangout Parameter Tuning
PostgreSQL Hangout Parameter TuningPostgreSQL Hangout Parameter Tuning
PostgreSQL Hangout Parameter Tuning
 
PostgreSQL Hangout Replication Features v9.4
PostgreSQL Hangout Replication Features v9.4PostgreSQL Hangout Replication Features v9.4
PostgreSQL Hangout Replication Features v9.4
 
Postgres MVCC - A Developer Centric View of Multi Version Concurrency Control
Postgres MVCC - A Developer Centric View of Multi Version Concurrency ControlPostgres MVCC - A Developer Centric View of Multi Version Concurrency Control
Postgres MVCC - A Developer Centric View of Multi Version Concurrency Control
 

Similar to A brief introduction to PostgreSQL

Taming Deployment With Smart Frog
Taming Deployment With Smart FrogTaming Deployment With Smart Frog
Taming Deployment With Smart Frog
Steve Loughran
 
Sydney Oracle Meetup - execution plans
Sydney Oracle Meetup - execution plansSydney Oracle Meetup - execution plans
Sydney Oracle Meetup - execution plans
paulguerin
 
JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing Up
David Padbury
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
Reka
 

Similar to A brief introduction to PostgreSQL (20)

Plproxy
PlproxyPlproxy
Plproxy
 
Taming Deployment With Smart Frog
Taming Deployment With Smart FrogTaming Deployment With Smart Frog
Taming Deployment With Smart Frog
 
Postgresql quick guide
Postgresql quick guidePostgresql quick guide
Postgresql quick guide
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
 
Hacking Oracle From Web Apps 1 9
Hacking Oracle From Web Apps 1 9Hacking Oracle From Web Apps 1 9
Hacking Oracle From Web Apps 1 9
 
Sqladria 2009 SRC
Sqladria 2009 SRCSqladria 2009 SRC
Sqladria 2009 SRC
 
Charla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo WebCharla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo Web
 
Porting Applications From Oracle To PostgreSQL
Porting Applications From Oracle To PostgreSQLPorting Applications From Oracle To PostgreSQL
Porting Applications From Oracle To PostgreSQL
 
PostgreSQL 9.6 새 기능 소개
PostgreSQL 9.6 새 기능 소개PostgreSQL 9.6 새 기능 소개
PostgreSQL 9.6 새 기능 소개
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomy
 
Sah
SahSah
Sah
 
Defcon_Oracle_The_Making_of_the_2nd_sql_injection_worm
Defcon_Oracle_The_Making_of_the_2nd_sql_injection_wormDefcon_Oracle_The_Making_of_the_2nd_sql_injection_worm
Defcon_Oracle_The_Making_of_the_2nd_sql_injection_worm
 
Sydney Oracle Meetup - execution plans
Sydney Oracle Meetup - execution plansSydney Oracle Meetup - execution plans
Sydney Oracle Meetup - execution plans
 
Implementing a many-to-many Relationship with Slick
Implementing a many-to-many Relationship with SlickImplementing a many-to-many Relationship with Slick
Implementing a many-to-many Relationship with Slick
 
9.1 Grand Tour
9.1 Grand Tour9.1 Grand Tour
9.1 Grand Tour
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
 
JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing Up
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Tony jambu (obscure) tools of the trade for tuning oracle sq ls
Tony jambu   (obscure) tools of the trade for tuning oracle sq lsTony jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony jambu (obscure) tools of the trade for tuning oracle sq ls
 

More from Vu Hung Nguyen

Basic & Advanced Scrum Framework
Basic & Advanced Scrum FrameworkBasic & Advanced Scrum Framework
Basic & Advanced Scrum Framework
Vu Hung Nguyen
 
Anti patterns in it project management
Anti patterns in it project managementAnti patterns in it project management
Anti patterns in it project management
Vu Hung Nguyen
 

More from Vu Hung Nguyen (20)

Co ban horenso - Tai lieu training noi bo
Co ban horenso - Tai lieu training noi boCo ban horenso - Tai lieu training noi bo
Co ban horenso - Tai lieu training noi bo
 
Funix techtalk: Tự học hiệu quả thời 4.0
Funix techtalk: Tự học hiệu quả thời 4.0Funix techtalk: Tự học hiệu quả thời 4.0
Funix techtalk: Tự học hiệu quả thời 4.0
 
Học cờ cùng con - Nguyễn Vỹ Kỳ Anh [U8]
Học cờ cùng con - Nguyễn Vỹ Kỳ Anh [U8]Học cờ cùng con - Nguyễn Vỹ Kỳ Anh [U8]
Học cờ cùng con - Nguyễn Vỹ Kỳ Anh [U8]
 
Japanese for it bridge engineers
Japanese for it bridge engineersJapanese for it bridge engineers
Japanese for it bridge engineers
 
Basic IT Project Management Terminologies
Basic IT Project Management TerminologiesBasic IT Project Management Terminologies
Basic IT Project Management Terminologies
 
2018 Học cờ cùng con - Nguyễn Vũ Kỳ Anh [U7]
2018 Học cờ cùng con - Nguyễn Vũ Kỳ Anh [U7]2018 Học cờ cùng con - Nguyễn Vũ Kỳ Anh [U7]
2018 Học cờ cùng con - Nguyễn Vũ Kỳ Anh [U7]
 
Làm việc hiệu quả với sếp Nhật (2017)
Làm việc hiệu quả với sếp Nhật (2017)Làm việc hiệu quả với sếp Nhật (2017)
Làm việc hiệu quả với sếp Nhật (2017)
 
Problem Solving Skills (for IT Engineers)
Problem Solving Skills (for IT Engineers)Problem Solving Skills (for IT Engineers)
Problem Solving Skills (for IT Engineers)
 
Using Shader in cocos2d-x
Using Shader in cocos2d-xUsing Shader in cocos2d-x
Using Shader in cocos2d-x
 
Pham Anh Tu - TK Framework
Pham Anh Tu - TK FrameworkPham Anh Tu - TK Framework
Pham Anh Tu - TK Framework
 
My idol: Magnus Carlsen vs. Ky Anh 2G1 NGS Newton
My idol: Magnus Carlsen vs. Ky Anh 2G1 NGS NewtonMy idol: Magnus Carlsen vs. Ky Anh 2G1 NGS Newton
My idol: Magnus Carlsen vs. Ky Anh 2G1 NGS Newton
 
Basic advanced scrum framework
Basic advanced scrum frameworkBasic advanced scrum framework
Basic advanced scrum framework
 
FPT Univ. Talkshow IT khong chi la lap trinh
FPT Univ. Talkshow IT khong chi la lap trinhFPT Univ. Talkshow IT khong chi la lap trinh
FPT Univ. Talkshow IT khong chi la lap trinh
 
Basic & Advanced Scrum Framework
Basic & Advanced Scrum FrameworkBasic & Advanced Scrum Framework
Basic & Advanced Scrum Framework
 
Agile Vietnam Conference 2016: Recap
Agile Vietnam Conference 2016: RecapAgile Vietnam Conference 2016: Recap
Agile Vietnam Conference 2016: Recap
 
IT Public Speaking Guidelines
IT Public Speaking GuidelinesIT Public Speaking Guidelines
IT Public Speaking Guidelines
 
Kanban: Cơ bản và Nâng cao
Kanban: Cơ bản và Nâng caoKanban: Cơ bản và Nâng cao
Kanban: Cơ bản và Nâng cao
 
Học cờ vua cùng con Nguyễn Vũ Kỳ Anh (U6)
Học cờ vua cùng con Nguyễn Vũ Kỳ Anh (U6)Học cờ vua cùng con Nguyễn Vũ Kỳ Anh (U6)
Học cờ vua cùng con Nguyễn Vũ Kỳ Anh (U6)
 
Fuji Technology Workshop: Learning Skills
Fuji Technology Workshop: Learning SkillsFuji Technology Workshop: Learning Skills
Fuji Technology Workshop: Learning Skills
 
Anti patterns in it project management
Anti patterns in it project managementAnti patterns in it project management
Anti patterns in it project management
 

Recently uploaded

Recently uploaded (20)

When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 

A brief introduction to PostgreSQL

  • 1. PostgreSQL ’s (short) INTRODUCTION Nguyen Vu Hung [email_address] 2010/05/05
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. PHP and PostgresSQL ?> $dbconn4  =  pg_connect ( $conn_string ); $conn_string  =  &quot;host=sheep port=5432 dbname=test user=test password=bar&quot; ; $dbconn3  =  pg_connect ( &quot;host=sheep port=5432 dbname=test user=test password=foo&quot; ); $dbconn2  =  pg_connect ( &quot;host=localhost port=5432 dbname=test&quot; ); $dbconn  =  pg_connect ( &quot;dbname=test&quot; ); <?php
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. Functions and Cursors CREATE FUNCTION myfunc(refcursor, refcursor) RETURNS SETOF refcursor AS $$ BEGIN OPEN $1 FOR SELECT * FROM table_1; RETURN NEXT $1; OPEN $2 FOR SELECT * FROM table_2; RETURN NEXT $2; END; $$ LANGUAGE plpgsql; -- need to be in a transaction to use cursors. BEGIN; SELECT * FROM myfunc('a', 'b'); FETCH ALL FROM a; FETCH ALL FROM b; COMMIT;
  • 18.
  • 19.
  • 20.
  • 21.  
  • 22.