This document discusses using Python to connect to and interact with a PostgreSQL database. It covers:
- Popular Python database drivers for PostgreSQL, including Psycopg which is the most full-featured.
- The basics of connecting to a database, executing queries, and fetching results using the DB-API standard. This includes passing parameters, handling different data types, and error handling.
- Additional Psycopg features like server-side cursors, transaction handling, and custom connection factories to access columns by name rather than number.
In summary, it provides an overview of using Python with PostgreSQL for both basic and advanced database operations from the Python side.
This document provides an overview of Spring Boot and some of its key features. It discusses the origins and modules of Spring, how Spring Boot simplifies configuration and dependency management. It then covers examples of building Spring Boot applications that connect to a SQL database, use RabbitMQ for messaging, and schedule and run asynchronous tasks.
Lightweight locks (LWLocks) in PostgreSQL provide mutually exclusive access to shared memory structures. They support both shared and exclusive locking modes. The LWLocks framework uses wait queues, semaphores, and spinlocks to efficiently manage acquiring and releasing locks. Dynamic monitoring of LWLock events is possible through special builds that incorporate statistics collection.
Presentation that I gave as a guest lecture for a summer intensive development course at nod coworking in Dallas, TX. The presentation targets beginning web developers with little, to no experience in databases, SQL, or PostgreSQL. I cover the creation of a database, creating records, reading/querying records, updating records, destroying records, joining tables, and a brief introduction to transactions.
사례로 알아보는 MariaDB 마이그레이션
현대적인 IT 환경과 애플리케이션을 만들기 위해 우리는 오늘도 고민을 거듭합니다. 최근 들어 오픈소스 DB가 많은 업무에 적용되고 검증이 되면서, 점차 무거운 상용 데이터베이스를 가벼운 오픈소스 DB로 전환하는 움직임이 대기업의 미션 크리티컬 업무까지로 확산하고 있습니다. 이는 클라우드 환경 및 마이크로 서비스 개념 확산과도 일치하는 움직임입니다.
상용 DB를 MariaDB로 이관한 사례를 통해 마이그레이션의 과정과 효과를 살펴 볼 수 있습니다.
MariaDB로 이관하는 것은 어렵다는 생각을 막연히 가지고 계셨다면 본 자료를 통해 이기종 데이터베이스를 MariaDB로 마이그레이션 하는 작업이 어렵지 않게 수행될 수 있다는 점을 실제 사례를 통해 확인하시길 바랍니다.
웨비나 동영상
https://www.youtube.com/watch?v=xRsETZ5cKz8&t=52s
Psycopg2 - Connect to PostgreSQL using Python ScriptSurvey Department
It's the presentation slides I prepared for my college workshop. This demonstrates how you can talk with PostgreSql db using python scripting.For queries, mail at dipeshsuwal@gmail.com
Triggers allow functions to be executed automatically in response to events like INSERT, UPDATE, or DELETE statements. Triggers can be set to fire once per statement or for each row affected. They can fire before or after the triggering event.
The document provides examples of using triggers: 1) To automatically compute a full name field from separate name fields. 2) To update count and total price fields in another table in response to item inserts/updates/deletes. 3) To keep related tables in sync by denormalizing and checking constraints.
This document discusses using FastAPI as the mechanism for exposing APIs in a hexagonal architecture. It provides an overview of FastAPI's key features like automatic documentation, data validation with Pydantic, dependency injection, and background tasks. It also shows how FastAPI fits into the hexagonal architecture pattern by calling use cases in the application layer which work with the domain layer. The benefits of this approach are improved isolation of the domain/business logic from external mechanisms, as well as improved scalability and readiness for change.
The latest version of my PostgreSQL introduction for IL-TechTalks, a free service to introduce the Israeli hi-tech community to new and interesting technologies. In this talk, I describe the history and licensing of PostgreSQL, its built-in capabilities, and some of the new things that were added in the 9.1 and 9.2 releases which make it an attractive option for many applications.
Java is Object Oriented Programming. Java 8 is the latest version of the Java which is used by many companies for the development in many areas. Mobile, Web, Standalone applications.
(** MYSQL DBA Certification Training https://www.edureka.co/mysql-dba **)
This Edureka PPT on SQL Joins will discuss the various types of Joins used in SQL Server with examples. The following topics will be covered in this PPT:
Introduction to SQL
What are Joins?
Types of Joins
FAQs about Joins
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
This is a introduction to PostgreSQL that provides a brief overview of PostgreSQL's architecture, features and ecosystem. It was delivered at NYLUG on Nov 24, 2014.
http://www.meetup.com/nylug-meetings/events/180533472/
by Mahesh Pakal, AWS
PostgreSQL is a powerful, enterprise class open source object-relational database system with an emphasis on extensibility and standards-compliance. PostgreSQL boasts many sophisticated features and runs stored procedures in more than a dozen programming languages. We’ll explore the advantages and limitations of PostgreSQL, examples of where it is best suited for use, and examples of who is using PostgreSQL to power their applications.
The document discusses Java Database Connectivity (JDBC) and how it allows Java programs to connect to databases. It describes the four types of JDBC drivers, the core JDBC interfaces like Driver, Connection, and Statement, and how to use JDBC to perform CRUD operations. The key interfaces allow establishing a database connection and executing SQL statements to retrieve and manipulate data.
The document describes the syntax for creating, altering, and dropping tables in SQL. It provides examples of creating tables with column constraints, default values, primary keys, foreign keys, and unique constraints. It also shows how to add, modify, and drop columns from existing tables using ALTER TABLE statements. The final sections cover DML statements for inserting, updating, deleting, and selecting data from tables.
Introduction to Spring's Dependency InjectionRichard Paul
This document provides an overview of dependency injection in Spring. It defines dependency injection as a form of inversion of control where objects are provided to classes rather than having classes create their own dependencies. It discusses the benefits of dependency injection such as loose coupling, easy switching of implementations, and enhanced testability. It also compares constructor injection and setter injection and describes how to configure dependency injection using XML, annotations, and Java configuration in Spring.
The document provides an overview of PostgreSQL performance tuning. It discusses caching, query processing internals, and optimization of storage and memory usage. Specific topics covered include the PostgreSQL configuration parameters for tuning shared buffers, work memory, and free space map settings.
Generics and Collections
The document discusses generics and collections in Java. It defines generics as a style of programming that allows algorithms to operate on objects of different types while providing compile-time type safety. The Java collections framework supports generics to specify the type of objects stored in a collection. Common collection classes like ArrayList, LinkedList, and HashMap are discussed along with their key characteristics.
In this Java Spring Training session, you will learn Spring – Inversion of Control, Dependency Injection and Bean definitions. Topics covered in this session are:
For more information, visit this link:
Spring Framework
• Core Container
• Data Access/Integration
• Web Layer
• Spring Setup
• Key features
• Spring Bean
• Dependency Injection
• Relation between DI and IoC
• Spring IoC Containers
• Spring DI
https://www.mindsmapped.com/courses/software-development/spring-fundamentals-learn-spring-framework-and-spring-boot/
This document discusses various SQL concepts including joins, aggregation functions, and grouping. It begins with an overview of installing MySQL Workbench and loading sample data. It then covers SELECT statements and functions like COUNT, SUM, AVG. It describes different types of joins like inner, left, right, and self joins. It provides examples of joining tables to retrieve related data and performing self joins to combine rows from the same table. It also explains how to use the GROUP BY clause to divide data into groups and apply aggregation functions.
"PostgreSQL and Python" Lightning Talk @EuroPython2014Henning Jacobs
PL/Python allows users to write PostgreSQL functions and procedures using Python. It enables accessing PostgreSQL data and running Python code from within SQL queries. For example, a function could query a database table, process the results in Python by accessing modules, and return a value to the SQL query. This opens up possibilities to leverage Python's extensive libraries and expressiveness to expose data and perform complex validation from PostgreSQL.
This document provides an overview of sockets programming in Python. It discusses:
1) The basic Python sockets modules (Socket and SocketServer) which provide low-level networking and simplified server development.
2) Examples of creating stream and datagram sockets, binding addresses, listening for connections, and accepting clients.
3) How the SocketServer module simplifies creating TCP servers with a basic "Hello World" example server.
This document discusses functional programming in Python. It begins by defining functional programming and some of its key concepts like immutable data, functions as first-class citizens, and recursion. It then shows how Python supports functional programming with features like first-class functions, lambda expressions, and built-in functions like map, filter and reduce. Finally, it discusses other functional programming techniques in Python like partial function application, currying, and tail call optimization, while noting some of Python's limitations for functional programming like its non-pure nature and lack of pattern matching.
Josh Williams
You may be familiar with connecting to a database using Python, but did you know it's possible for your database itself to use Python? PostgreSQL has the ability to write functions and procedures in PL/Python, which can use Python to both work with data inside your database, and bring in information from the outside world. This tutorial-format demonstration is designed to show you how to get up and running on PL/Python, and some of the cool things you can accomplish using it.
This document discusses the Go programming language and why it has become popular. It notes that Go is an optional language released in 2012 that does not force developers to use it for certain applications like Java does for Android. The document states that the one main reason Go has become popular is that "It just works" - Go makes development simpler by handling things like concurrency and deployment automatically while still exposing lower-level functionality. It recommends using Go for distributed systems, portable command line tools, and situations where team productivity is important.
Www Kitebird Com Articles Pydbapi Html Toc 1AkramWaseem
The document discusses using Python and the DB-API module to write scripts that interact with MySQL databases. It provides an example of a short script that connects to a MySQL database, issues a query to get the server version, and prints the result. It then discusses a more extensive script that handles errors, issues different statement types like INSERT and SELECT, and retrieves result rows using fetchone() and fetchall() methods. The document provides information on installing prerequisites like Python and MySQLdb, and executing the example scripts.
This document summarizes a presentation about RethinkDB, an open-source database built on JSON documents. It discusses key features of RethinkDB like supporting queries, being distributed, and ease of administration. It also compares RethinkDB to other NoSQL databases. The document provides examples of using the ReQL query language in Python to create and query a database. It demonstrates how to perform operations like counts, filters, and map-reduce queries.
Succumbing to the Python in Financial Marketsdcerezo
This document discusses the advantages of using Python for financial markets and algorithmic trading. It provides code samples for implementing combo orders, basket options, and Bermuda swaps in Python using various libraries. It also discusses some challenges, such as dynamic typing leading to runtime errors, and the importance of forward testing strategies rather than backtesting to avoid overfitting.
Massively Parallel Processing with Procedural Python (PyData London 2014)Ian Huston
The Python data ecosystem has grown beyond the confines of single machines to embrace scalability. Here we describe one of our approaches to scaling, which is already being used in production systems. The goal of in-database analytics is to bring the calculations to the data, reducing transport costs and I/O bottlenecks. Using PL/Python we can run parallel queries across terabytes of data using not only pure SQL but also familiar PyData packages such as scikit-learn and nltk. This approach can also be used with PL/R to make use of a wide variety of R packages. We look at examples on Postgres compatible systems such as the Greenplum Database and on Hadoop through Pivotal HAWQ. We will also introduce MADlib, Pivotal’s open source library for scalable in-database machine learning, which uses Python to glue SQL queries to low level C++ functions and is also usable through the PyMADlib package.
O documento compara as linguagens de programação Python e Java, discutindo suas características, exemplos de código, ferramentas de desenvolvimento, tipos, processos de desenvolvimento e vantagens/desvantagens de cada uma. Apresenta também o Jython, que permite integrar Python e Java, e recomenda uma leitura sobre as restrições da plataforma Java.
This document discusses using SQLAlchemy to access relational databases from Python. It provides an overview of SQLAlchemy, describing its core SQL expression language and object-relational mapper (ORM). SQLAlchemy provides tools and components to assist with database access while maintaining a consistent interface over the Python DB-API. It allows generating SQL statements and mapping database rows to Python objects for a more object-oriented programming experience.
Python é uma linguagem de programação de alto nível, interpretada e orientada a objetos. Ela possui tipagem dinâmica, é fácil de aprender e muito produtiva. Python pode ser usada em diversos ambientes como web, GUI, embarcados e scripts. Ela é multiplataforma e possui uma forte comunidade e filosofia de desenvolvimento.
MySQL User Conference 2009: Python and MySQLTed Leung
This document discusses various Python database technologies including:
1. Python-DB and the DB-API standard for database access from Python. It also discusses MySQLdb for MySQL access.
2. Using MySQLdb to connect to a MySQL database and execute queries to retrieve and fetch data.
3. The Django web framework's ORM and how it implements the Active Record pattern for mapping database tables to model classes.
4. Other ORMs like SQLObject which also uses the Active Record pattern, and SQLAlchemy which provides both low-level SQL and a high-level ORM.
This document provides an agenda and background information for a presentation on PostgreSQL. The agenda includes topics such as practical use of PostgreSQL, features, replication, and how to get started. The background section discusses the history and development of PostgreSQL, including its origins from INGRES and POSTGRES projects. It also introduces the PostgreSQL Global Development Team.
1. The document describes how Oracle allocates CU blocks and CR blocks in the buffer cache when updating column values from A to I through consecutive commits.
2. It shows the expected outcome of 6 CR blocks being allocated for the 6 updates before a new CU block is needed.
3. An analysis using ODI Analyzer on an Oracle database shows this expected behavior occurring, with CR blocks 1-6 being allocated and reused for each update before a new CU block is created on the 7th update.
안드로이드 앱의 빌드 툴인 Gradle은 빌드 스크립트로 Groovy DSL을 사용합니다. DSL은 큰 학습 없이 사용할 수 있다는 장점이 있지만, 각 구문의 역할이나 의미를 정확히 알기는 어렵습니다. 이에 대한 기본적인 이해가 생긴다면, 직접 코드를 추가하거나 기존 기능을 개선시키는 등 적극적으로 빌드 과정을 조절하는데 도움이 될 것입니다. 이 세션에서는 Groovy 문법을 간단하게 소개하고, Gradle 파일들을 구문별로 의미하는 바를 짚어보며 gradle 파일을 읽는 법을 알아봅니다. 그리고 원하는 기능을 찾기 위해서 어떤 레퍼런스를 찾아야 하는지에 대한 팁을 공유합니다.
This document summarizes the key features and changes in PostgreSQL 9.0 beta release. It highlights major new features like replication, permissions, and anonymous code blocks. It also briefly outlines many other enhancements, including performance improvements, monitoring tools, JSON/XML output for EXPLAIN, and mobile app contest. The presentation aims to excite developers about trying the new beta version.
The Ring programming language version 1.2 book - Part 32 of 84Mahmoud Samir Fayed
The document discusses user registration and login functionality in Ring. It describes classes for users (Model, View & Controller), form views for registration and login, and code to handle registration, login, and checking authentication. It also summarizes classes for database access (Database), model objects (ModelBase), and controllers (ControllerBase).
The Ring programming language version 1.6 book - Part 46 of 189Mahmoud Samir Fayed
This document summarizes code from the Ring documentation related to user registration, login, and database classes. It describes classes for users, models, views, controllers, and languages that allow for user registration, login, form views, and routing. It also summarizes the Database, ModelBase, and ControllerBase classes that provide functionality for connecting to databases, executing queries, and managing model data.
Emerging Languages: A Tour of the HorizonAlex Payne
A tour of a number of new programming languages, organized by the job they're best suited for. Presented at Philadelphia Emerging Technology for the Enterprise 2012.
Relational Database Access with Python ‘sans’ ORM Mark Rees
This document discusses various approaches for accessing relational databases from Python, including ORM libraries like Django and SQLAlchemy, raw SQL queries using the Python DB-API standard, and template libraries like SpringPython. It provides code examples for common database operations like SELECT, INSERT, and comparing database schemas. A number of Python database adapters are also described, supporting databases like PostgreSQL, MySQL, SQLite and more.
CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak PROIDEA
This document summarizes a presentation about using DTrace on OS X. It introduces DTrace as a dynamic tracing tool for user and kernel space. It discusses the D programming language used for writing DTrace scripts, including data types, variables, operators, and actions. Example one-liners and scripts are provided to demonstrate syscall tracking, memory allocation snooping, and hit tracing. The presentation outlines some past security work using DTrace and similar dynamic tracing tools. It concludes with proposing future work like more kernel and USDT tracing as well as Python bindings for DTrace.
This document discusses Go web development using the Gin web framework. It provides an overview of Gin's features and file structure conventions. It also describes using Orator ORM for database migrations in Go applications. Benchmark results show the json-iterator library provides better JSON performance than the standard encoding/json package in Go. The document concludes with recommendations for Nginx SSL and security header parameters.
This document discusses refactoring Java code to Clojure using macros. It provides examples of refactoring Java code that uses method chaining to equivalent Clojure code using the threading macros (->> and -<>). It also discusses other Clojure features like type hints, the doto macro, and polyglot projects using Leiningen.
The Ring programming language version 1.7 book - Part 48 of 196Mahmoud Samir Fayed
This document provides code examples and documentation for Ring's web library (weblib.ring). It describes classes and methods for generating HTML pages, forms, tables and other elements. This includes the Page class for adding common elements like text, headings, paragraphs etc., the Application class for handling requests, cookies and encoding, and classes representing various HTML elements like forms, inputs, images etc. It also provides an overview of how to create pages dynamically using View and Controller classes along with Model classes for database access.
The Ring programming language version 1.5.2 book - Part 43 of 181Mahmoud Samir Fayed
This document discusses Ring code for implementing CRUD (create, read, update, delete) functionality using an MVC (model-view-controller) pattern. It includes code for classes that represent a Salary model, controller, and view. It also includes code for classes that handle user registration and login functionality, including models, views, controllers, and language files. The document provides code examples for connecting to a database, implementing base model and controller classes, and performing common database operations like searching, counting, inserting, updating, and finding records.
OrientDB - The 2nd generation of (multi-model) NoSQLRoberto Franchini
This document provides an overview of OrientDB, a multi-model database that combines features of document, graph, and other databases. It discusses data modeling and schema, querying and traversing graph data, full-text and spatial search, deployment scenarios, and APIs. Examples show creating classes and properties, inserting and querying graph data, and live reactive queries in OrientDB.
Graph Algorithms: Analytics for Understanding Data RelationshipsNeo4j
This document discusses Neo4j, a native graph database. It highlights Neo4j's capabilities like being ACID-compliant, supporting powerful analytics on graphs through integration with tools like Cypher and APOC, and its evolution over time to support features like user-defined procedures and functions. The document also provides examples of using algorithms like PageRank and visualization libraries like NeoVis to analyze and explore graph data in Neo4j.
This document summarizes a presentation about Norikra, an open source SQL stream processing engine written in Ruby. Some key points:
- Norikra allows for schema-less stream processing using SQL queries without needing to restart for new queries. It supports windows, joins, UDFs.
- Example queries demonstrate counting events by field values over time windows. Nested fields can be queried directly.
- Norikra is used in production at LINE for analytics like API error reporting and a Lambda architecture with real-time and batch processing.
- It is built on JRuby to leverage Java libraries and Ruby gems, and can handle 10k-100k events/sec on typical hardware. The
The Ring programming language version 1.5 book - Part 8 of 31Mahmoud Samir Fayed
This document summarizes key classes and methods from the Ring web library (weblib.ring).
The Application class contains methods for encoding, decoding, cookies, and more. The Page class contains methods for generating common HTML elements and structures. Model classes like UsersModel manage data access and object relational mapping. Controller classes handle requests and coordinate the view and model.
2 BytesC++ course_2014_c3_ function basics¶meters and overloadingkinan keshkeh
The document discusses functions in C++. It explains that functions can be defined in two ways: with declaration/calling/definition or with just declaration and definition. It provides examples of declaring a function that calculates the average of two numbers, calling that function, and defining the function. It also discusses local and global variables and their scopes. Finally, it lists some common predefined functions in C++ like sqrt, pow, abs, and rand.
Benchy, python framework for performance benchmarking of Python ScriptsMarcel Caraciolo
Benchy is a lightweight Python framework for performing benchmarks on code. It allows generating performance and memory usage graphs to compare different code implementations. Benchmarks can be written as objects and executed via a BenchmarkRunner to obtain results. Results are stored in a SQLite database and full reports can be generated in reStructuredText format. The framework aims to provide an easy way to integrate benchmarks into the development workflow.
The Ring programming language version 1.4.1 book - Part 13 of 31Mahmoud Samir Fayed
This document provides documentation on Ring's web library API for generating HTML pages and elements. It describes classes and methods for creating pages, adding content and attributes, handling forms, and more. The Page class allows adding various HTML elements to the page content through methods like text(), html(), h1(), etc. The Application class contains methods for encoding, cookies, and page structure. WebLib enables generating complete HTML pages in Ring code.
Managing Large-scale Networks with Triggerjathanism
Trigger is a network automation toolkit that allows users to programmatically configure, monitor, and manage network devices. Written in Python, it uses SSH, Telnet, and Junoscript to remotely execute commands on network devices from all major vendors. Trigger handles tasks like command execution, change management, and metadata storage for network devices in a centralized, scalable, and reliable way. It aims to simplify network automation through an easy to use API and extensibility features like custom command classes.
The Ring programming language version 1.9 book - Part 53 of 210Mahmoud Samir Fayed
This document provides code examples and documentation for Ring's web application framework. It includes code for user authentication using a database, classes for database access and web controllers, and descriptions of the main classes and methods in the WebLib API for generating HTML pages and handling requests. The document covers key concepts like generating pages dynamically based on request parameters, working with databases using Model classes, and common tasks like cookies, file uploads, and URL encoding.
Similar to Programming with Python and PostgreSQL (20)
This document provides an overview of PL/Proxy, a database partitioning system implemented as a PostgreSQL procedural language extension. PL/Proxy allows applications to perform database operations like inserts, updates, deletes and queries across multiple PostgreSQL database partitions in a transparent manner. It works by routing operations to the appropriate partition based on the value of a partitioning key. The document discusses PL/Proxy concepts, areas of application, example usage, installation, backend and frontend functions, configuration options and more.
Is putting archives of binaries on a CD image still the way to serve the users? In the face of the likes of Google and Amazon impacting the way
users interact with software and systems, and eroding the four freedoms, how can Linux distributions keep up? Distribute QEMU images? Write a free GMail clone? Offer community-managed web email hosting? Can this work, and who is going to pay for it?
Based on user feedback, I discuss the most requested features for PostgreSQL, their implementation status, difficulties, blockers, and future plans. Items include replication, materialized views, parallel queries, in-place upgrade.
Porting Oracle applications to PostgreSQL can be difficult due to differences in SQL syntax, data types, functions, and PL/SQL implementations between the databases. While many elements like table definitions and queries may port easily, issues arise with data types, functions, outer joins, null values, triggers, date/time handling, and PL/SQL syntax. A full rewrite may be preferable to porting in many cases. Careful evaluation and planning is needed to determine the best approach.
This document outlines the challenges of porting Oracle applications to PostgreSQL. It discusses porting SQL syntax, data types, functions, sequences, outer joins, and default parameters. Many changes are required such as modifying data types, functions like DECODE, sequence syntax, outer join syntax, and handling default parameters. The document emphasizes that porting projects are difficult and compatibility is limited, but success can be rewarding.
The document discusses PostgreSQL's current and future support for XML. It outlines current features like the XML data type, XML publishing functions, XML export, and XPath support. Future plans include adding validation against DTDs and XML schemas, annotated schema decomposition, XSLT transformations, improving performance, full-text search on XML data, and more advanced indexing. Several examples are provided to illustrate current XML functionality in PostgreSQL.
This document summarizes Peter Eisentraut's presentation on XML support in PostgreSQL. It discusses the types of XML support including an XML data type, XML export format, and mapping XML documents to SQL databases. It also outlines specifications like SQL/XML, features of the XML data type, functions for input, output, and querying XML, and the status and future of XML support in PostgreSQL.
The Road to the XML Type: Current and Future DevelopmentsPeter Eisentraut
The document discusses current and future developments related to XML support in PostgreSQL. It describes current features like the XML data type, XML publishing functions, and XML export functions. Future plans include adding XPath support and further developing areas like XML validation, indexing XML data, and XQuery support to comply with SQL standards. The goal is to improve PostgreSQL's capabilities for storing, querying, and exporting XML content and schemas.
This document summarizes PL/Java, which allows writing server-side functions in Java for PostgreSQL. It discusses how to define and deploy Java functions, configure PL/Java, handle parameters and return types, use JDBC from functions, and write triggers in Java. While compatible with Oracle's SQL/JRT standard, PL/Java has some limitations around memory usage and performance. It works best on Linux and is a stable option for adding Java code to PostgreSQL databases.
This document discusses various goals, techniques, and solutions for replicating PostgreSQL databases. The goals covered are high availability, performance for reads and writes, supporting wide area networks, and handling offline peers. Techniques include master-slave and multi-master replication, proxies, and using standby systems. Specific solutions described are Slony-I, Slony-II, PGCluster, DBMirror, pgpool, WAL replication, Sequoia, DRBD, and shared storage. The document provides an overview of how each solution can help achieve different replication goals.
PostgreSQL 8.1 was recently released with hundreds of changes and new features including:
1) Bitmap scans allow using more than one index per table by combining index hits in memory.
2) Two-phase commit support allows prepared transactions to be preserved across server restarts.
3) The new role system unifies users and groups and roles can own database objects.
4) Constraint exclusion avoids lookups on child tables when constraints make rows impossible.
Collateral Damage: Consequences of Spam and Virus Filtering for the E-Mail Sy...Peter Eisentraut
The document discusses the collateral damage caused by spam and virus filtering techniques. It analyzes various techniques like DNS blacklists, bounce messages, greylisting, SPF, blocking port 25, and challenge-response systems. Many techniques are found to be ineffective against spam, annoy users, violate privacy, or break functionality. It warns against inventing your own filters and notes legal issues around privacy, database building, and user consent with filtering. The conclusion is that email reliability has decreased due to both spammers and inappropriate filter applications.
Collateral Damage:
Consequences of Spam and Virus Filtering for the E-Mail S...Peter Eisentraut
This paper takes a critical look at the impact that contemporary spam
and virus filter techniques have on the stability, performance, and usability
of the e-mail system.
Immer nur Daten speichern und abfragen ist auf die Dauer vielleicht ein bisschen langweilig. Wer sonst schon alles kennt, kann hier entdecken, wozu Datenbank-Hacker mit zu viel Zeit und Inspiration fähig sind: Programmieren in LOLCODE, PostgreSQL auf dem Handy, Daten aus dem Internet einbinden, PostgreSQL als Dateimanager oder umgekehrt, Fraktale malen mit SQL, und mehr.
Zwischen den Zeilen lassen sich ernsthaft die aktuellen Möglichkeiten von Open-Source-Datenbanken und die einzigartige Schaffenskraft der Open-Source-Community erfahren.
http://chemnitzer.linux-tage.de/2009/vortraege/detail.html?idx=114
The Common Debian Build System (CDBS) provides makefile fragments to simplify Debian package building. It includes classes that handle common build systems like autotools and distutils. CDBS aims to standardize packaging and automatically implement policy changes. While it helps most packages, it may be unnecessary for simple packages or those with unusual build systems. CDBS maintenance involves addressing bugs, feature requests, outdated documentation, and ensuring compatibility with Debian subpolicies.
Increase Quality with User Access Policies - July 2024Peter Caitens
⭐️ Increase Quality with User Access Policies ⭐️, presented by Peter Caitens and Adam Best of Salesforce. View the slides from this session to hear all about “User Access Policies” and how they can help you onboard users faster with greater quality.
Top 12 AI Technology Trends For 2024.pdfMarrie Morris
Technology has become an irreplaceable component of our daily lives. The role of AI in technology revolutionizes our lives for the betterment of the future. In this article, we will learn about the top 12 AI technology trends for 2024.
How UiPath Discovery Suite supports identification of Agentic Process Automat...DianaGray10
📚 Understand the basics of the newly persona-based LLM-powered Agentic Process Automation and discover how existing UiPath Discovery Suite products like Communication Mining, Process Mining, and Task Mining can be leveraged to identify APA candidates.
Topics Covered:
💡 Idea Behind APA: Explore the innovative concept of Agentic Process Automation and its significance in modern workflows.
🔄 How APA is Different from RPA: Learn the key differences between Agentic Process Automation and Robotic Process Automation.
🚀 Discover the Advantages of APA: Uncover the unique benefits of implementing APA in your organization.
🔍 Identifying APA Candidates with UiPath Discovery Products: See how UiPath's Communication Mining, Process Mining, and Task Mining tools can help pinpoint potential APA candidates.
🔮 Discussion on Expected Future Impacts: Engage in a discussion on the potential future impacts of APA on various industries and business processes.
Enhance your knowledge on the forefront of automation technology and stay ahead with Agentic Process Automation. 🧠💼✨
Speakers:
Arun Kumar Asokan, Delivery Director (US) @ qBotica and UiPath MVP
Naveen Chatlapalli, Solution Architect @ Ashling Partners and UiPath MVP
Cracking AI Black Box - Strategies for Customer-centric Enterprise ExcellenceQuentin Reul
The democratization of Generative AI is ushering in a new era of innovation for enterprises. Discover how you can harness this powerful technology to deliver unparalleled customer value and securing a formidable competitive advantage in today's competitive market. In this session, you will learn how to:
- Identify high-impact customer needs with precision
- Harness the power of large language models to address specific customer needs effectively
- Implement AI responsibly to build trust and foster strong customer relationships
Whether you're at the early stages of your AI journey or looking to optimize existing initiatives, this session will provide you with actionable insights and strategies needed to leverage AI as a powerful catalyst for customer-driven enterprise success.
Keynote : AI & Future Of Offensive SecurityPriyanka Aash
In the presentation, the focus is on the transformative impact of artificial intelligence (AI) in cybersecurity, particularly in the context of malware generation and adversarial attacks. AI promises to revolutionize the field by enabling scalable solutions to historically challenging problems such as continuous threat simulation, autonomous attack path generation, and the creation of sophisticated attack payloads. The discussions underscore how AI-powered tools like AI-based penetration testing can outpace traditional methods, enhancing security posture by efficiently identifying and mitigating vulnerabilities across complex attack surfaces. The use of AI in red teaming further amplifies these capabilities, allowing organizations to validate security controls effectively against diverse adversarial scenarios. These advancements not only streamline testing processes but also bolster defense strategies, ensuring readiness against evolving cyber threats.
Choosing the Best Outlook OST to PST Converter: Key Features and Considerationswebbyacad software
When looking for a good software utility to convert Outlook OST files to PST format, it is important to find one that is easy to use and has useful features. WebbyAcad OST to PST Converter Tool is a great choice because it is simple to use for anyone, whether you are tech-savvy or not. It can smoothly change your files to PST while keeping all your data safe and secure. Plus, it can handle large amounts of data and convert multiple files at once, which can save you a lot of time. It even comes with 24*7 technical support assistance and a free trial, so you can try it out before making a decision. Whether you need to recover, move, or back up your data, Webbyacad OST to PST Converter is a reliable option that gives you all the support you need to manage your Outlook data effectively.
UiPath Community Day Amsterdam: Code, Collaborate, ConnectUiPathCommunity
Welcome to our third live UiPath Community Day Amsterdam! Come join us for a half-day of networking and UiPath Platform deep-dives, for devs and non-devs alike, in the middle of summer ☀.
📕 Agenda:
12:30 Welcome Coffee/Light Lunch ☕
13:00 Event opening speech
Ebert Knol, Managing Partner, Tacstone Technology
Jonathan Smith, UiPath MVP, RPA Lead, Ciphix
Cristina Vidu, Senior Marketing Manager, UiPath Community EMEA
Dion Mes, Principal Sales Engineer, UiPath
13:15 ASML: RPA as Tactical Automation
Tactical robotic process automation for solving short-term challenges, while establishing standard and re-usable interfaces that fit IT's long-term goals and objectives.
Yannic Suurmeijer, System Architect, ASML
13:30 PostNL: an insight into RPA at PostNL
Showcasing the solutions our automations have provided, the challenges we’ve faced, and the best practices we’ve developed to support our logistics operations.
Leonard Renne, RPA Developer, PostNL
13:45 Break (30')
14:15 Breakout Sessions: Round 1
Modern Document Understanding in the cloud platform: AI-driven UiPath Document Understanding
Mike Bos, Senior Automation Developer, Tacstone Technology
Process Orchestration: scale up and have your Robots work in harmony
Jon Smith, UiPath MVP, RPA Lead, Ciphix
UiPath Integration Service: connect applications, leverage prebuilt connectors, and set up customer connectors
Johans Brink, CTO, MvR digital workforce
15:00 Breakout Sessions: Round 2
Automation, and GenAI: practical use cases for value generation
Thomas Janssen, UiPath MVP, Senior Automation Developer, Automation Heroes
Human in the Loop/Action Center
Dion Mes, Principal Sales Engineer @UiPath
Improving development with coded workflows
Idris Janszen, Technical Consultant, Ilionx
15:45 End remarks
16:00 Community fun games, sharing knowledge, drinks, and bites 🍻
TrustArc Webinar - Innovating with TRUSTe Responsible AI CertificationTrustArc
In a landmark year marked by significant AI advancements, it’s vital to prioritize transparency, accountability, and respect for privacy rights with your AI innovation.
Learn how to navigate the shifting AI landscape with our innovative solution TRUSTe Responsible AI Certification, the first AI certification designed for data protection and privacy. Crafted by a team with 10,000+ privacy certifications issued, this framework integrated industry standards and laws for responsible AI governance.
This webinar will review:
- How compliance can play a role in the development and deployment of AI systems
- How to model trust and transparency across products and services
- How to save time and work smarter in understanding regulatory obligations, including AI
- How to operationalize and deploy AI governance best practices in your organization
Retrieval Augmented Generation Evaluation with RagasZilliz
Retrieval Augmented Generation (RAG) enhances chatbots by incorporating custom data in the prompt. Using large language models (LLMs) as judge has gained prominence in modern RAG systems. This talk will demo Ragas, an open-source automation tool for RAG evaluations. Christy will talk about and demo evaluating a RAG pipeline using Milvus and RAG metrics like context F1-score and answer correctness.
The Challenge of Interpretability in Generative AI Models.pdfSara Kroft
Navigating the intricacies of generative AI models reveals a pressing challenge: interpretability. Our blog delves into the complexities of understanding how these advanced models make decisions, shedding light on the mechanisms behind their outputs. Explore the latest research, practical implications, and ethical considerations, as we unravel the opaque processes that drive generative AI. Join us in this insightful journey to demystify the black box of artificial intelligence.
Dive into the complexities of generative AI with our blog on interpretability. Find out why making AI models understandable is key to trust and ethical use and discover current efforts to tackle this big challenge.
Finetuning GenAI For Hacking and DefendingPriyanka Aash
Generative AI, particularly through the lens of large language models (LLMs), represents a transformative leap in artificial intelligence. With advancements that have fundamentally altered our approach to AI, understanding and leveraging these technologies is crucial for innovators and practitioners alike. This comprehensive exploration delves into the intricacies of GenAI, from its foundational principles and historical evolution to its practical applications in security and beyond.
4. Why Python?
Pros:
• widely used
• easy
• strong typing
• scripting, interactive use
• good PostgreSQL support
• client and server (PL) interfaces
• open source, community-based
5. Why Python?
Pros:
• widely used
• easy
• strong typing
• scripting, interactive use
• good PostgreSQL support
• client and server (PL) interfaces
• open source, community-based
Pros:
• no static syntax checks, must rely on test coverage
• Python community has varying interest in RDBMS
7. Example
import psycopg2
dbconn = psycopg2.connect('dbname=dellstore2')
cursor = dbconn.cursor()
cursor.execute("""
SELECT firstname, lastname
FROM customers
ORDER BY 1, 2
LIMIT 10
""")
for row in cursor.fetchall():
print "Name: %s %s" % (row[0], row[1])
cursor.close()
db.close()
8. Drivers
Name License Platforms Py Versions
Psycopg LGPL Unix, Win 2.4–3.2
PyGreSQL BSD Unix, Win 2.3–2.6
ocpgdb BSD Unix 2.3–2.6
py-postgresql BSD pure Python 3.0+
bpgsql (alpha) LGPL pure Python 2.3–2.6
pg8000 BSD pure Python 2.5–3.0+
9. Drivers
Name License Platforms Py Versions
Psycopg LGPL Unix, Win 2.4–3.2
PyGreSQL BSD Unix, Win 2.3–2.6
ocpgdb BSD Unix 2.3–2.6
py-postgresql BSD pure Python 3.0+
bpgsql (alpha) LGPL pure Python 2.3–2.6
pg8000 BSD pure Python 2.5–3.0+
More details
• http://wiki.postgresql.org/wiki/Python
• http://wiki.python.org/moin/PostgreSQL
10. DB-API 2.0
• the standard Python database API
• all mentioned drivers support it
• defined in PEP 249
• discussions: db-sig@python.org
• very elementary (from a PostgreSQL perspective)
• outdated relative to Python language development
• lots of extensions and incompatibilities possible
22. Fetching Query Results
cursor.execute("SELECT firstname, lastname FROM ...")
for row in cursor.fetchall():
print "Name: %s %s" % (row[0], row[1])
23. Fetching Query Results
cursor.execute("SELECT firstname, lastname FROM ...")
for row in cursor.fetchall():
print "Name: %s %s" % (row[0], row[1])
Note: field access only by number
24. Fetching Query Results
cursor.execute("SELECT firstname, lastname FROM ...")
row = cursor.fetchone()
if row is not None:
print "Name: %s %s" % (row[0], row[1])
25. Fetching Query Results
cursor.execute("SELECT firstname, lastname FROM ...")
for row in cursor:
print "Name: %s %s" % (row[0], row[1])
26. Fetching Query Results in Batches
cursor = dbconn.cursor(name='mycursor')
cursor.arraysize = 500 # default: 1
cursor.execute("SELECT firstname, lastname FROM ...")
while True:
batch = cursor.fetchmany()
break if not batch
for row in batch:
print "Name: %s %s" % (row[0], row[1])
27. Fetching Query Results in Batches
cursor = dbconn.cursor(name='mycursor')
cursor.execute("SELECT firstname, lastname FROM ...")
cursor.itersize = 2000 # default
for row in cursor:
print "Name: %s %s" % (row[0], row[1])
28. Getting Query Metadata
cursor.execute("SELECT DISTINCT state, zip FROM
customers")
print cursor.description[0].name
print cursor.description[0].type_code
print cursor.description[1].name
print cursor.description[1].type_code
state
1043 # == psycopg2.STRING
zip
23 # == psycopg2.NUMBER
30. Passing Parameters
Not to be confused with (totally evil):
cursor.execute("""
UPDATE customers
SET password = '%s'
WHERE customerid = %d
""" % ["sekret", 37])
31. Passing Parameters
cursor.execute("INSERT INTO foo VALUES (%s)",
"bar") # WRONG
cursor.execute("INSERT INTO foo VALUES (%s)",
("bar")) # WRONG
cursor.execute("INSERT INTO foo VALUES (%s)",
("bar",)) # correct
cursor.execute("INSERT INTO foo VALUES (%s)",
["bar"]) # correct
(from Psycopg documentation)
40. Binary Data
Standard way:
from psycopg2 import Binary
cursor.mogrify("SELECT %s", [Binary("foo")])
"SELECT E'x666f6f'::bytea"
41. Binary Data
Standard way:
from psycopg2 import Binary
cursor.mogrify("SELECT %s", [Binary("foo")])
"SELECT E'x666f6f'::bytea"
Other ways:
cursor.mogrify("SELECT %s", [buffer("foo")])
"SELECT E'x666f6f'::bytea"
cursor.mogrify("SELECT %s",
[bytearray.fromhex(u"deadbeef")])
"SELECT E'xdeadbeef'::bytea"
There are more. Check the documentation. Check the versions.
42. Date/Time
Standard ways:
from psycopg2 import Date, Time, Timestamp
cursor.mogrify("SELECT %s, %s, %s",
[Date(2011, 3, 23),
Time(9, 0, 0),
Timestamp(2011, 3, 23, 9, 0, 0)])
"SELECT '2011-03-23'::date, '09:00:00'::time,
'2011-03-23T09:00:00'::timestamp"
45. Tuples
foo = (1, 2, 3)
cursor.mogrify("SELECT * FROM customers WHERE
customerid IN %s",
[foo])
'SELECT * FROM customers WHERE customerid IN (1, 2, 3)'
47. Unicode Support
Cause all result strings to be returned as Unicode strings:
psycopg2.extensions.register_type(psycopg2.extensions.
UNICODE)
psycopg2.extensions.register_type(psycopg2.extensions.
UNICODEARRAY)
48. Transaction Control
Transaction blocks are used by default. Must use
dbconn.commit()
or
dbconn.rollback()
54. Connection and Cursor Factories
Want: accessing result columns by name
Recall:
dbconn = psycopg2.connect(dsn='...')
cursor = dbconn.cursor()
cursor.execute("""
SELECT firstname, lastname
FROM customers
ORDER BY 1, 2
LIMIT 10
""")
for row in cursor.fetchall():
print "Name: %s %s" % (row[0], row[1]) # stupid :(
55. Connection and Cursor Factories
Solution 1: Using DictConnection:
import psycopg2.extras
dbconn = psycopg2.connect(dsn='...',
connection_factory=psycopg2.extras.DictConnection)
cursor = dbconn.cursor()
cursor.execute("""
SELECT firstname, lastname
FROM customers
ORDER BY 1, 2
LIMIT 10
""")
for row in cursor.fetchall():
print "Name: %s %s" % (row['firstname'], # or row[0]
row['lastname']) # or row[1]
56. Connection and Cursor Factories
Solution 2: Using RealDictConnection:
import psycopg2.extras
dbconn = psycopg2.connect(dsn='...',
connection_factory=psycopg2.extras.RealDictConnection)
cursor = dbconn.cursor()
cursor.execute("""
SELECT firstname, lastname
FROM customers
ORDER BY 1, 2
LIMIT 10
""")
for row in cursor.fetchall():
print "Name: %s %s" % (row['firstname'],
row['lastname'])
57. Connection and Cursor Factories
Solution 3: Using NamedTupleConnection:
import psycopg2.extras
dbconn = psycopg2.connect(dsn='...',
connection_factory=psycopg2.extras.NamedTupleConnection)
cursor = dbconn.cursor()
cursor.execute("""
SELECT firstname, lastname
FROM customers
ORDER BY 1, 2
LIMIT 10
""")
for row in cursor.fetchall():
print "Name: %s %s" % (row.firstname, # or row[0]
row.lastname) # or row[1]
58. Connection and Cursor Factories
Alternative: Using
DictCursor/RealDictCursor/NamedTupleCursor:
import psycopg2.extras
dbconn = psycopg2.connect(dsn='...')
cursor = dbconn.cursor(cursor_factory=psycopg2.extras.
DictCursor/RealDictCursor/NameTupleCursor)
cursor.execute("""
SELECT firstname, lastname
FROM customers
ORDER BY 1, 2
LIMIT 10
""")
for row in cursor.fetchall():
print "Name: %s %s" % (row['firstname'],
row['lastname'])
# (resp. row.firstname, row.lastname)
59. Supporting New Data Types
Only a finite list of types is supported by default: Date, Binary,
etc.
• map new PostgreSQL data types into Python
• map new Python data types into PostgreSQL
60. Mapping New PostgreSQL Types Into
Python
import psycopg2
import psycopg2.extensions
def cast_oidvector(value, _cursor):
"""Convert oidvector to Python array"""
if value is None:
return None
return map(int, value.split(' '))
OIDVECTOR = psycopg2.extensions.new_type((30,),
'OIDVECTOR', cast_oidvector)
psycopg2.extensions.register_type(OIDVECTOR)
61. Mapping New Python Types into
PostgreSQL
from psycopg2.extensions import adapt,
register_adapter, AsIs
class Point(object):
def __init__(self, x, y):
self.x = x
self.y = y
def adapt_point(point):
return AsIs("'(%s, %s)'" % (adapt(point.x),
adapt(point.y)))
register_adapter(Point, adapt_point)
cur.execute("INSERT INTO atable (apoint) VALUES (%s)",
(Point(1.23, 4.56),))
(from Psycopg documentation)
62. Connection Pooling With Psycopg
from psycopg2.pool import SimpleConnectionPool
pool = SimpleConnectionPool(1, 20, dsn='...')
dbconn = pool.getconn()
...
pool.putconn(dbconn)
pool.closeall()
63. Connection Pooling With Psycopg
for non-threaded applications:
from psycopg2.pool import SimpleConnectionPool
pool = SimpleConnectionPool(1, 20, dsn='...')
dbconn = pool.getconn()
...
pool.putconn(dbconn)
pool.closeall()
for non-threaded applications:
from psycopg2.pool import ThreadedConnectionPool
pool = ThreadedConnectionPool(1, 20, dsn='...')
dbconn = pool.getconn()
cursor = dbconn.cursor()
...
pool.putconn(dbconn)
pool.closeall()
64. Connection Pooling With DBUtils
import psycopg2
from DBUtils.PersistentDB import PersistentDB
dbconn = PersistentDB(psycopg2, dsn='...')
cursor = dbconn.cursor()
...
see http://pypi.python.org/pypi/DBUtils/
65. The Other Stuff
• thread safety: can share connections, but not cursors
• COPY support: cursor.copy_from(), cursor.copy_to()
• large object support: connection.lobject()
• 2PC: connection.xid(), connection.tpc_begin(), . . .
• query cancel: dbconn.cancel()
• notices: dbconn.notices
• notifications: dbconn.notifies
• asynchronous communication
• coroutine support
• logging cursor
67. Setup
• included with PostgreSQL
• configure --with-python
• apt-get/yum install postgresql-plpython
• CREATE LANGUAGE plpythonu;
• Python 3: CREATE LANGUAGE plpython3u;
• “untrusted”, superuser only
68. Basic Examples
CREATE FUNCTION add(a int, b int) RETURNS int
LANGUAGE plpythonu
AS $$
return a + b
$$;
CREATE FUNCTION longest(a text, b text) RETURNS text
LANGUAGE plpythonu
AS $$
if len(a) > len(b):
return a
elif len(b) > len(a):
return b
else:
return None
$$;
69. Using Modules
CREATE FUNCTION json_to_array(j text) RETURNS text[]
LANGUAGE plpythonu
AS $$
import json
return json.loads(j)
$$;
70. Database Calls
CREATE FUNCTION clear_passwords() RETURNS int
LANGUAGE plpythonu
AS $$
rv = plpy.execute("UPDATE customers SET password =
NULL")
return rv.nrows
$$;
71. Database Calls With Parameters
CREATE FUNCTION set_password(username text, password
text) RETURNS boolean
LANGUAGE plpythonu
AS $$
plan = plpy.prepare("UPDATE customers SET password = $1
WHERE username= $2", ['text', 'text'])
rv = plpy.execute(plan, [username, password])
return rv.nrows == 1
$$;
72. Avoiding Prepared Statements
CREATE FUNCTION set_password(username text, password
text) RETURNS boolean
LANGUAGE plpythonu
AS $$
rv = plpy.execute("UPDATE customers SET password = %s
WHERE username= %s" %
(plpy.quote_nullable(username),
plpy.quote_literal(password)))
return rv.nrows == 1
$$;
(available in 9.1-to-be)
73. Caching Plans
CREATE FUNCTION set_password2(username text, password
text) RETURNS boolean
LANGUAGE plpythonu
AS $$
if 'myplan' in SD:
plan = SD['myplan']
else:
plan = plpy.prepare("UPDATE customers SET password
= $1 WHERE username= $2", ['text', 'text'])
SD['myplan'] = plan
rv = plpy.execute(plan, [username, password])
return rv.nrows == 1
$$;
74. Processing Query Results
CREATE FUNCTION get_customer_name(username text)
RETURNS boolean
LANGUAGE plpythonu
AS $$
plan = plpy.prepare("SELECT firstname || ' ' ||
lastname AS ""name"" FROM customers WHERE username =
$1", ['text'])
rv = plpy.execute(plan, [username], 1)
return rv[0]['name']
$$;
75. Compare: PL/Python vs. DB-API
PL/Python:
plan = plpy.prepare("SELECT ...")
for row in plpy.execute(plan, ...):
plpy.info(row["fieldname"])
DB-API:
dbconn = psycopg2.connect(...)
cursor = dbconn.cursor()
cursor.execute("SELECT ...")
for row in cursor.fetchall() do:
print row[0]
76. Set-Returning and Table Functions
CREATE FUNCTION get_customers(id int) RETURNS SETOF
customers
LANGUAGE plpythonu
AS $$
plan = plpy.prepare("SELECT * FROM customers WHERE
customerid = $1", ['int'])
rv = plpy.execute(plan, [id])
return rv
$$;
77. Triggers
CREATE FUNCTION delete_notifier() RETURNS trigger
LANGUAGE plpythonu
AS $$
if TD['event'] == 'DELETE':
plpy.notice("one row deleted from table %s" %
TD['table_name'])
$$;
CREATE TRIGGER customers_delete_notifier AFTER DELETE
ON customers FOR EACH ROW EXECUTE PROCEDURE
delete_notifier();
78. Exceptions
CREATE FUNCTION test() RETURNS text
LANGUAGE plpythonu
AS $$
try:
rv = plpy.execute("SELECT ...")
except plpy.SPIError, e:
plpy.notice("something went wrong")
The transaction is still aborted in < 9.1.
79. New in PostgreSQL 9.1
• SPI calls wrapped in subtransactions
• custom SPI exceptions: subclass per SQLSTATE,
.sqlstate attribute
• plpy.subtransaction() context manager
• support for OUT parameters
• quoting functions
• validator
• lots of internal improvements