nyuuzyou/wikis huggingface dataset:
Development projects

__NOTOC__
If you are working on a PostgreSQL project and collaborating using the wiki, please add a link to your page(s) below.
== Active Projects ==
* Scaleout Design
* Hot Standby and TODO items - 9.0
* Streaming Replication - async is done in 9.0 / sync in 9.1
* Extensions
* Performances QA testing
* Temporal Extensions
* In-place upgrade
* Table partitioning
* JDBC
* Security-Enhanced PostgreSQL
* Clustering Development Projects
* Serializable
* SQL/MED
* Event Triggers - a patch series for 9.3
== Developer project trackers ==
* Simon Riggs' Development Projects
* Greg Stark's Development Projects
* Peter Eisentraut's Page
* Aster's Development Projects
* Robert Haas' Development Projects
== General feature wishlists ==
* DataWarehousing
* Statistics the planner doesn't have that it really needs
* Partitioning Requirements
* Logging Brainstorm
* Refactor Type System
== Pending Projects ==
* Updatable views
* GUCS Overhaul
* FreeSpaceMapRewrite
* C++ Compatibility
== Completed Projects ==
* 64bit Windows port - 9.0
* Default ACL Properties for DB Objects - 9.0
* Google Summer of Code 2008
* XML Support (XML Todo) - 8.3
* Enumerated Types - 8.3
* Wishlist For 8.3
* Gborg migration
* Tracker Discussion
!
Directory Permissions

== Overview ==
The purpose of this feature is to allow non-superuser roles read and write capability on system directories through PostgreSQL. Ultimately, this feature is motivated by the principle of least privilege and would contribute to the goal of minimizing the need for superuser privileges for routine tasks that are outside typical system administration. This feature is accomplished by creating a superuser controlled configuration that grants a user/role read and/or write permissions to a specific path that is local to the servers file system (including NFS mounts).
== Use Cases ==
* Allow non-superuser roles access to log files without needing access to the server (pg_read_file, etc). Also, it provide non-superuser roles the ability to select and load a specific range of log files.
* Allow non-superuser roles to load data files utilizing pg_background, thus eliminating the need for DBA to maintain a backend connection from remote system. As well, facilitate general ETL by eliminating the need to pass all data through an intermediary layer or application.
* Allow non-superuser roles ability to CREATE TABLESPACE.
* Allow non-superuser roles to utilize COPY (server side import/export).
* Allow non-superuser roles to utilize Large Objects.
* Allow non-superuser roles to utilize file_fdw.
* Allow DBA's to keep distinct data sets separate and available only to authorized roles.
== Design Proposals ==
* PGC_SUSET GUC - A set of GUC's that can be set per role.
** Keep a "whitelist" of directories stored in a GUC.
** Benefits are that this is fairly light weight/simple.
** Potential issues are that multiple GUCs would be required to provide read/write capability. As well, might not provide the full capability required to provide full feature support.
* Directory Alias
** A catalog that maintains role, path and permission association.
*** Entry are maintained through corresponding CREATE, ALTER and DROP.
*** Permissions are granted via GRANT or ALTER command.
*** Can utilize an ACL scheme to facilitate more complex permissions (beyond READ/WRITE) if necessary.
** Utility functions provide permission checks on path and role.
== Similar Features In Other RDBMSs ==
The following are not meant to serve as 1-to-1 models for this proposed feature. The features of these other systems range in similarity to the proposed functionality. Some are more restrictive than others, while some present some interesting. The purpose of listing these features is to help demonstrate a general need and utility for such a feature.
* MySQL
* Oracle
* MSSQL Server
* DB2
== Considerations ==
* Should such a configuration be "dump-able"? Perhaps not since it is very likely that paths will not be the same across systems?
Distance in km

To get the distance between two points (lat1, long1, lat2, long2), and accounting for the curvature of the Earth. Note, the plperlu function is not exact, but should be pretty close.
This example uses the contrib modules "Earthdistance" and "Cube" and yields virtually the same results as the Math::Trig function below
 select ROUND( ('(33.0, 97.1)'::point <@> '(24.0, 88.6)')::NUMERIC * 1.609344 ) as km;
If you are unable to/do not want to install earthdistance and cube contrib modules, you can write a plperlu function to get simiar results
create or replace function distance_in_km (numeric,numeric,numeric,numeric) returns numeric as $body$
use strict;
use Math::Trig qw(great_circle_distance deg2rad);
# from http://perldoc.perl.org/Math/Trig.html
my $lat1 = shift(@_);
my $lon1 = shift(@_);
my $lat2 = shift(@_);
my $lon2 = shift(@_);
#elog WARNING, "$lat1, $lon1, $lat2, $lon2\n";
# Notice the 90 - latitude: phi zero is at the North Pole.
sub NESW { deg2rad($_[0]), deg2rad(90 - $_[1]) }
my @L = NESW( $lat1, $lon1 );
my @T = NESW( $lat2, $lon2 );
my $km = great_circle_distance(@L, @T, 6378);
return $km;
$body$ language plperlu strict security definer;
 select ROUND(km) as km from distance_in_km(33.0,97.1,24.0,88.6) as km;
 km 
 -----
 945
Written by bricklen, feel free to correct or enhance!
Category:PL/Perl
Distributed Deadlock Detection

Hello. Since Postgres-XC project slowed down, I didn't make good contribution to PG community. Now I'm back and I'd like to open discussions and provide materials on distributed transaction handling in PostgreSQL.
This will include
* Deadlock detection in distributed transactions, I mean, deadlock among group of transactions waiting for each other in the remote, by 2PC or simple transaction blocks,
* Parallel recovery both for standalone PostgreSQL and log-shipping replication, based on physical WAL replay.
* Solutions for distributed read anomaly. I will show very simple example and bring up some ideas how to solve this.
Documentation Proofreading

In an effort to improve the quality of the official PostgreSQL documentation, this group is attempting to read through sections of the documentation to improve wording, clarify phrases, and correct errors. These are examples (diff 1,
 diff2 )
of changes made by Bruce Momjian to the first 500 manual pages. The diff changes only two lines per page, on average, meaning the PostgreSQL documentation is already very good. Proofreading the documentation is simply an attempt to take the documentation from good to great.
The current plan is for individuals to work on the remaining sections. The process involves:
* print or download the documentation in a format that can be easily marked up
* read the documentation and make adjustments to improve wording, clarify phrases, and correct errors
* email your changes in any electronic format or postal mail the marked-up printout to Bruce Momjian.
Bruce will review your changes and see that the changes are merged into the official documentation. If you would like print your section locally, Bruce can have EnterpriseDB reimburse you for the expense --- the cost per section is usually around USD $20. PDF versions of the development documentation are available (A4, US). You can build a more recent version using the instructions at Documentation if you're lucky--getting the docs to build can be difficult.
Please claim an item by putting your name and the date next to the item you would like to proofread. Proofreading can be both rewarding and mind-numbing, so feel free to claim only part of a book by splitting the table entries.
Book 	Pages	% of Manual	Notes 	Proofreader 	Start Date	End Date
Tutorial 	24 	1% 	 	Bruce Momjian 	2008-03-01	2009-04-01
SQL Language 	325 	15% 	 	Bruce Momjian 	2008-03-01	2009-04-01
Server Administration 	201 	9% 	 	Bruce Momjian 	2009-04-01	2010-02-03
Client Interfaces 	105 	5% 	Except chapters: 31 libpq C Library 	 	 	
libpq 	70 	3% 	 	Leslie S Satenstein	 	2011-01-10
Server Programming 	150 	7% 	Except chapters: 36. The Rule System,39. PL/TCL Procedural Language, and 42. Server Programming Interface	Erik Rijkers 	2010-01-22	2010-11-01
Server Programming 	89 	4% 	Only chapters: 36. The Rule System,39. PL/TCL Procedural Language, and 42. Server Programming Interface 	 	 	
Reference: SQL Commands	376 	17% 	 	gabrielle 	2011-01-13	
Client Applications 	85 	4% 	First draft done, 2009-02-16 	gabrielle 	2010-01-22	2010-03-23
Server Applications 	22 	1% 	 	gabrielle 	2011-01-13	2011-03-09
Internals 	168 	8% 	 	Greg Smith 	2010-01-22	
Appendixes 	536 	25% 	Skip release notes 	 	 	
Category:Documentation
Documenting NULL

= Documenting NULL Tracking Document =
* If you wish to mark a section as ready-to-commit please add your name next to it.
* If you think it isn't ready please add a note under the section as to why.
* General comments holding back commit can be added in the ToDo Note section
== Commenters ==
* v1 to v3
** David Rowley
** Laurenz Albe
** Thom Brown
** Tom Lane
** Yugo NAGATA
* v4 (first full proposal)
** jian he
** Marcos Pegoraro
** Jeff Davis
* v5
** Marcos Pegoraro
** jian he
* v6
== ToDo Note ==
* Check on implementation of comment regarding not null constraints (Laurenz)
* Examples feedback and editing pass (\pset null, quantity of) (jian)
* Consider another section with more guidance instead of rules (Jeff Davis)
* Consider one or more combined examples (Jeff Davis)
* Consider whether to call out count(*) on an empty set producing 0 instead of null (Jeff Davis)
== Related Changes ==
* Syntax for The Null Value Constant
* Rewording tri-valued boolean logic
== Main Section2s ==
* Meaning
** Included the meanings/terms used in the PL languages included in core. (Marcos)
* Usage
** Reconsider use of formal language (Jeff Davis).
** Add subsections to this covering input/output/usage. (DGJ)
** Mention that examples use \pset null <NULL>
* Distinctness
* Null-Valued Operands
* Null Values in Domains
* Testing Multi-Element Values with Null Elements
* Multi-Element Predicates and Scalars
* Multi-Element Comparisons
* Null-Valued Arguments in Normal Function Calls
* Null-Valued Arguments in Aggregate and Window Functions
* Null Values When Filtering
** Frame up examples better and including/swapping-in a DISTINCT-using one (Marcos)
* Null Values in Table Constraints
* Null Values When Grouping
* Null Values When Ordering
* Null Values in Indexes
* Null Values in Partition Keys
** Double-negative (jian)
* Null-Valued Settings
* Null Values in JSON
** JSON Path considerations, is distinct from exclusion (Marcos)
** Clean up wording around SQL null compare/contrast JSON null (jian)
** Mention, as an aside, the case-sensitivity of the JSON null type's value. (Marcos)
DotConnect ADO.NET Provider for PostgreSQL

== About ==
dotConnect for PostgreSQL is an ADO.NET provider for working with PostgreSQL data using the standard ADO.NET or Entity Framework interfaces. It allows you to easily integrate PostgreSQL data into your .NET applications (C# or VB.NET), as well as integrate PostgreSQL with widely used data-oriented technologies.
== Key Features: ==
* RAD Approach. dotConnect for PostgreSQL provides a vast number of GUI tools that increase your productivity. It integrates into Visual Studio Server Explorer and other tools, and provides advanced visual component editors to simplify component tweaking. DataSet tools, such as DataSet Wizard, DataSet Editor, DataSet Manager, provide you an easy way to create and edit typed and untyped DataSets.
* ORM Support. dotConnect for PostgreSQL offers enhanced ORM support with a bundled visual designer for ORM models - Entity Developer. It offers you advanced support for Model-First and Database-First design approaches and flexible T4 template-based code generation for the model. dotConnect for PostgreSQL supports Entity Framework v1 - v6.1 and and Entity Framework Core 1.1 and 2.0, NHibernate, and LinqConnect (formerly known as LINQ to PostgreSQL). dotConnect for PostgreSQL supports Entity Framework Spatials, Code First, Code First Migrations 
* dotConnect for PostgreSQL offers both high performance connectivity to the PostgreSQL database and a number of innovative development tools and technologies. It supports a wide range of PostgreSQL-specific features, such as secure SSL connections, PostgreSQL notifications, PostgreSQL bulk data loading, GEOMETRY, PostgreSQL ARRAY types, and others.
 
* Advanced integration with Visual Studio 2010, 2012, 2013, 2015 and 2017
* Support for .NET Framework 2.0-4.7, and .NET Core 1.x and 2.0
Category:Tool
Driver JDBC4 com suporte a XML

= O que é? =
É uma modificação do driver JDBC4 do [site oficial] para que o driver permita o uso de mapeamento objeto-relacional através dos frameworks JPA, Hibernate, Oracle TopLink, OpenJPA, entre outros.
O driver está em fase final de testes, seu feedback é bastante bem vindo para que possamos evoluir esse desenvolvimento.
= Download =
;Binário (driver):Postgresql-jdbc-8.4dev-700-NSDmod-1.1
;Source:<ainda nao carregado>
= Como usar? =
Para usar, basta criar a coluna em seu banco de dados com o tipo XML nativo. Em seguida, mapeie o campo respectivo na entidade como String. O nome do campo deve começar com prefixo XML. Ex: 
private String XMLForm;
O uso do prefixo "XML" é usado como convenção ao driver jdbc modificado ao invés do uso de alguma configuração em arquivo.
= Contato =
Dúvidas, sugestões e/ou disposição a colaborar? Por favor entre em contato.
Emerson Moretto
emoretto@lsi.usp.br
Category:JDBC
Category:Português
DTrace

DTrace is a technology for tracing arbitrary points in program execution. Originally developed for Solaris, it has since become available in one form or another on Mac OS and FreeBSD. PostgreSQL has included basic DTrace support since version 8.2, with newer versions (8.4 in particular) expanding the number of probe points in the database available.
Introduction to PostgreSQl and DTrace:
* Dynamic Tracing - official manual section on DTrace probes available
* PostgreSQL DTrace Users Guide
* PostgreSQL performance through the eyes of DTrace and Looking under the hood with Solaris. The pg_file_stress utility there is being migrated to Tasty Treats for PostgreSQL.
General DTrace information:
* DTrace at Wikipedia
Example PostgreSQL DTrace scripts:
* DTrace & Postgresql - io tuning
* Some quick numbers about SDD for PostgreSQL
== SystemTap & Linux ==
It's also possible to use the PostgreSQL DTrace probes on some recent Linux systems through the Systemtap user space markers feature:
* PostgreSQL with SystemTap
* Probing PostgreSQL with DTrace and SystemTap
Category:Operating system
Dynamic DDL

In many examples in this section, an SQL query produces as output a list of DDL statements to be subsequently executed. This is a fairly common administrative requirement.
The following trivial function allows such queries to be executed directly with no intermediate step. Doing this also takes advantage of PostgreSQL's ability to do transactional DDL; either all changes are made, or all are rolled back. Of course, for safety one would typically do an explicit BEGIN; first, and inspect the list of commands and, if necessary, the resulting changes to the database, before doing a COMMIT;.
create function exec(text) returns text language plpgsql volatile
 as $f$
 begin
 execute $1;
 return $1;
 end;
$f$;
The format() function (available in PostgreSQL 9.1+) is handy to construct dynamic statements. The following function combines exec(format()) into a single function:
create function exec(text, variadic anyarray) returns text language plpgsql volatile
 as $f$
 DECLARE
 cmd text;
 BEGIN
 cmd := format($1, variadic $2);
 EXECUTE cmd;
 RETURN cmd;
 END;
$f$;
Note that "variadic" expects at least one argument, so you will need both of the above functions for full flexibility.
Category:PL/pgSQL
Ecosystem:Apache Ignite

== Test procedure ==
There are the following ways to use the combination of Apache Ignite and PostgreSQL.
# Ignite persists in-memory cached objects to PostgreSQL via JDBC (CachedJdbcBlobStore and CachedJdbcPojoStore)
# Ignite does not directly interact with PostgreSQL, but is used as a second-level cache of Hibernate ORM
# Ignite acts as a replacement for memcached, and PostgreSQL server processes cache data via the pgmemcache extension
Here I show the use as a memcached replacement. First, download the Apache Ignite binary distribution and unzip it.
Then start the Ignite server. The Ignite server starts accepting memcached binary protocol at port 11211.
$ cd ${Ignite_home_dir}
$ bin/ignite.sh examples/config/example-cache.xml
Install the pgmemcache extension as described in ${pgmemcache_dir}/README.rst. Start the PostgreSQL server.
To run the pgmemcache regression test, change the port number to 11211 in the first line of ${pgmemcache_dir}/test.sql as follows:
SELECT memcache_server_add('localhost:11211');
Run the test.
$ psql -f test.sql postgres
However, incrementing/decrementing an integer value with memcache_incr()/memcache_decr() doesn't seem to work. If you try to increment/decrement an object that was previously cached by memcache_add()/memcache_set(), the function call reports a warning message and returns -1. But subsequent calls to memcache_incr()/memcache_decr() create a new cache entry and increment/decrement its value. This is probably due to some defect of Ignite, because pgmemcache works fine with memcached proper.
Category:Ecosystem
Ecosystem:Application server (.NET)

== Internet Information Services ==
* Provider -- Microsoft Corporation
* Website -- https://www.iis.net/
* License -- proprietary
* Interoperability level -- interoperable via generic ODBC/.NET connection
* Verified PostgreSQL versions -- didn't actually run the program, but just checked the documentation
* Last update (YYYY-MM-DD) -- 2018-3-11
* Description -- Internet Information Services (IIS) for Windows Server is a flexible, secure and manageable Web server for hosting anything on the Web. From media streaming to web applications, IIS's scalable and open architecture is ready to handle the most demanding tasks.
* Additional info -- click here
Category:Ecosystem
Ecosystem:Application server (PHP)

== Zend Server ==
* Provider -- Zend Technologies
* Website -- http://www.zend.com/en/products/zend_server
* License -- proprietary
* Interoperability level -- explicitly supports PostgreSQL (no specific version is specified)
* Verified PostgreSQL versions -- didn't actually run the program, but just checked the documentation
* Last update (YYYY-MM-DD) -- 2018-3-11
* Description -- Zend Server is the Professional PHP Distribution with Advanced Value-add Capabilities.
* Additional info -- click here
Category:Ecosystem
Ecosystem:Business process management (BPM)

== Interstage Business Process Manager Analytics ==
* Provider -- Fujitsu Limited
* Website -- http://www.fujitsu.com/jp/products/software/middleware/business-middleware/interstage/products/bpmanalytics/
* License -- proprietary
* Interoperability level -- explicitly supports PostgreSQL (no specific version is specified)
* Verified PostgreSQL versions -- didn't actually run the program, but just checked the documentation
* Last update (YYYY-MM-DD) -- 2017-4-26
* Description -- Interstage Business Process Manager Analytics visualizes the business situation in real time intuitively by graphing business data and alert notification based on threshold. This enables you to grasp the business situation quickly and support quick judgment and coping. In addition, since Fujitsu's proprietary technology makes it possible to visualize the overall picture of the process, you can grasp the problems in the business process such as bottleneck and efficiently improve business operations.
* Additional info -- click here
Category:Ecosystem
Ecosystem:DataNucleus

== Test procedure ==
Create a database cluster, start a server instance, and create two databases.
$ initdb -E UTF8 --locale=C -U postgres
$ pg_ctl -w start
$ createdb -U postgres nucleus
$ createdb -U postgres nucleus2
Download the test suite of DataNucleus AccessPlatform. The test suite is a separate bundle from the DataNucleus AccessPlatform.
Perform some preliminary builds in the test suite by following the steps described here.
i.e.
$ cd framework
$ mvn clean install
$ cd ../framework.maven
$ mvn clean install
$ cd ../samples
$ mvn clean install
Finally, run various tests. I ran the following command in jdo/general, jdo/jta, jdo/rdbms, jpa/general, jpa/jta, jpa/rdbms.
$ mvn clean test -Ppostgresql
Category:Ecosystem
Ecosystem:Data security

== SQL Firewall ==
* Provider -- 2ndQuadrant
* Website -- https://www.2ndquadrant.com/
* License -- Proprietary
* Interoperability level -- explicitly supports PostgreSQL 9.4 or higher
* Verified PostgreSQL versions -- https://www.2ndquadrant.com/en/resources/postgresql-security-firewall/
* Last update (YYYY-MM-DD) -- 2018-04-04
* Description -- SQL Firewall is an easy-to-use extension to PostgreSQL, developed by 2ndQuadrant for statement-level whitelisting for individual users. It is completely independent of the application layer which means existing applications will not require a change in order to use it, nor will you need to design new applications to cater to SQL Firewall’s functionality.
* Additional info -- click here
Ecosystem:Disaster recovery

== Barman - Backup and Recovery Manager for PostgreSQL ==
* Provider -- 2ndQuadrant
* Website -- https://www.2ndquadrant.com/
* License -- GPL v3
* Interoperability level -- See: http://www.pgbarman.org/
* Verified PostgreSQL versions -- https://www.2ndquadrant.com/en/resources/barman/
* Last update (YYYY-MM-DD) -- 2020-07-09
* Description -- Barman (Backup and Recovery Manager) is an open-source administration tool for disaster recovery of PostgreSQL databases with high business continuity requirements. Barman allows remote backups of multiple servers in business critical environments and helps DBAs during the recovery phase.
* Additional info -- http://www.pgbarman.org/
Ecosystem:Education

== Moodle ==
* Provider -- Moodle community
* Website -- https://moodle.org/
* License -- open source (GPLv3+)
* Interoperability level -- explicitly supports PostgreSQL (no specific version is specified)
* Verified PostgreSQL versions -- didn't actually run the program, but just checked the documentation
* Last update (YYYY-MM-DD) -- 2017-6-19
* Description -- Moodle is a free, online Learning Management system enabling educators to create their own private website filled with dynamic courses that extend learning, any time, anywhere. Whether you're a teacher, student or administrator, Moodle can meet your needs. Moodle’s extremely customisable core comes with many standard features. PostgreSQL is the recommended database.
* Additional info -- click here
Category:Ecosystem
Ecosystem:Ehcache

== Test procedure ==
Ehcache itself does not interact with databases, so here we test it as a second-level cache of Hibernate ORM, with PostgreSQL as a backing database.
Hibernate has a regression test suite to test integration with Ehcache. It resides in the directory hibernate-ehcache. You can run it exactly like other Hibernate test suites. See here for the procedure.
Category:Ecosystem
Ecosystem:Hibernate ORM

== Test procedure ==
Create a database cluster, start a server instance, and create a test database.
$ initdb -E UTF8 --locale=C -U hibernate_orm_test
$ pg_ctl -w start
$ createdb -U hibernate_orm_test hibernate_orm_test
Download Hibernate ORM. It includes the source code and test suites as well as the binaries.
Run various tests. I ran the following command in documentation, hibernate-core, hibernate-envers.
$ gradle clean test -Pdb=pgsql
Category:Ecosystem