<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.postgresql.org/skins/common/feed.css?207"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.postgresql.org/index.php?title=Special:Contributions&amp;feed=atom&amp;target=Petere</id>
		<title>PostgreSQL wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.postgresql.org/index.php?title=Special:Contributions&amp;feed=atom&amp;target=Petere"/>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/Special:Contributions/Petere"/>
		<updated>2013-05-24T01:17:12Z</updated>
		<subtitle>From PostgreSQL wiki</subtitle>
		<generator>MediaWiki 1.15.5-2squeeze5</generator>

	<entry>
		<id>http://wiki.postgresql.org/wiki/Switching_PostgreSQL_documentation_from_SGML_to_XML</id>
		<title>Switching PostgreSQL documentation from SGML to XML</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/Switching_PostgreSQL_documentation_from_SGML_to_XML"/>
				<updated>2013-05-22T02:59:30Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;/* Arguments on SGML vs XML */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For about the last 10 years, there have been occasional discussions about switching the PostgreSQL documentation from SGML to XML (whatever that might mean).  Here are some points to consider.&lt;br /&gt;
&lt;br /&gt;
== Technical points ==&lt;br /&gt;
There is a distinction between changing the source format from SGML to XML versus switching the tool chain from DSSSL to XSLT.  Even though DSSSL is typically associated with SGML and XSLT with XML, in fact all combinations work more or less equally well.&lt;br /&gt;
&lt;br /&gt;
== Arguments on SGML vs XML ==&lt;br /&gt;
* DocBook 5, the next major version, will no longer publish an SGML DTD.  But DocBook 5 has been in the works for years and it might be many more years until it is the standard version and all previous versions have disappeared.&lt;br /&gt;
* SGML is easier to edit than XML, because of tag minimization and some other simplifications.&lt;br /&gt;
* SGML supports conditional sections (used to build the INSTALL file, for example).  That needs a different solution for XML.&lt;br /&gt;
* There might be more editing tools that support XML, but this needs to be substantiated.&lt;br /&gt;
* Translation teams are using XML.&lt;br /&gt;
* We'd probably want to rename *.sgml -&amp;gt; *.xml.  Easier now with Git, but needs some planning.&lt;br /&gt;
* With xmllint, we could a sort of pgindent on the documentation.&lt;br /&gt;
&lt;br /&gt;
== Arguments on DSSSL vs XSLT ==&lt;br /&gt;
* The DSSSL tools have been unmaintained for years.&lt;br /&gt;
* Small question marks on FOP (XSLT to PDF tool): Is it maintained, is there a stable version (as opposed to endless development pre-releases), can it run on an entirely free Java installation?  Should dblatex be used instead of FOP?&lt;br /&gt;
* The customizations that we have done to the DSSSL stylesheets would have to be ported to XSLT.  This work could start already.&lt;br /&gt;
* The XSLT build is currently a ''lot'' slower than the DSSSL build.&lt;br /&gt;
* XSLT might offer more flexibility such as partial builds.&lt;br /&gt;
* There are more tools that work with XSLT in various ways.&lt;br /&gt;
&lt;br /&gt;
== Formats We Generate ==&lt;br /&gt;
&lt;br /&gt;
A compleat solution needs to be able to generate all of the following output forms, &lt;br /&gt;
* HTML&lt;br /&gt;
* Manual pages&lt;br /&gt;
* RTF&lt;br /&gt;
* PDF and Postscript&lt;br /&gt;
** A4 format&lt;br /&gt;
** US format&lt;br /&gt;
* TeXinfo&lt;br /&gt;
&lt;br /&gt;
== Toolchain Components ==&lt;br /&gt;
In order to do a switchover, it will be necessary to replace all of the components.  It is worth enumerating these components, so that nobody makes the error of thinking that some partial solution to one part represents a complete solution.&lt;br /&gt;
&lt;br /&gt;
; docbook-utils&lt;br /&gt;
: Consists of scripts that transform DocBook into some useful forms (html, pdf, rtf, man pages)&lt;br /&gt;
; docbook-dsssl&lt;br /&gt;
: These are the DSSSL stylesheets used to render DocBook into various output forms.  They might be replaced by XSLT stylesheets.&lt;br /&gt;
; jade&lt;br /&gt;
: A DSSSL engine&lt;br /&gt;
; openjade&lt;br /&gt;
: An alternative DSSSL engine&lt;br /&gt;
; jadetex&lt;br /&gt;
: A DSSSL engine generating TeX-based output&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/PgCon_2013_Developer_Meeting</id>
		<title>PgCon 2013 Developer Meeting</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/PgCon_2013_Developer_Meeting"/>
				<updated>2013-04-15T20:07:22Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;/* Proposed Agenda Items */ Add names, based on history&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A meeting of the most active PostgreSQL developers is being planned for Wednesday 22nd May, 2013 near the University of Ottawa, prior to pgCon 2013. In order to keep the numbers manageable, this meeting is '''by invitation only'''. Unfortunately it is quite possible that we've overlooked important code developers during the planning of the event - if you feel you fall into this category and would like to attend, please contact Dave Page (dpage@pgadmin.org). &lt;br /&gt;
&lt;br /&gt;
Please note that this year the attendee numbers have been kept low in order to keep the meeting more productive. Invitations have been sent only to developers that have been highly active on the database server over the 9.3 release cycle. We have not invited any contributors based on their contributions to related projects, or seniority in regional user groups or sponsoring companies, unlike in previous years.&lt;br /&gt;
&lt;br /&gt;
This is a PostgreSQL Community event. Room and refreshments/food sponsored by EnterpriseDB. Other companies sponsored attendance for their developers.&lt;br /&gt;
 &lt;br /&gt;
== Time &amp;amp; Location ==&lt;br /&gt;
&lt;br /&gt;
The meeting will be from 8:30AM to 5PM, and will be in the &amp;quot;Red Experience&amp;quot; room at:&lt;br /&gt;
&lt;br /&gt;
 Novotel Ottawa&lt;br /&gt;
 33 Nicholas Street&lt;br /&gt;
 Ottawa&lt;br /&gt;
 Ontario&lt;br /&gt;
 K1N 9M7&lt;br /&gt;
 &lt;br /&gt;
Food and drink will be provided throughout the day, including breakfast from 8AM.&lt;br /&gt;
&lt;br /&gt;
[http://maps.google.ca/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=novotel+ottawa&amp;amp;aq=&amp;amp;sll=49.891235,-97.15369&amp;amp;sspn=36.237851,79.013672&amp;amp;ie=UTF8&amp;amp;hq=novotel+ottawa&amp;amp;hnear=&amp;amp;ll=45.421528,-75.683699&amp;amp;spn=0.036869,0.077162&amp;amp;z=14&amp;amp;iwloc=A&amp;amp;layer=c&amp;amp;cbll=45.425741,-75.689638&amp;amp;panoid=Z4FUGnkZkdHAOkIxyjjS9Q&amp;amp;cbp=12,25.83,,0,-0.6 View on Google Maps]&lt;br /&gt;
&lt;br /&gt;
== Attendees ==&lt;br /&gt;
&lt;br /&gt;
The following people have RSVPed to the meeting (in alphabetical order, by surname):&lt;br /&gt;
&lt;br /&gt;
* Jeff Davis&lt;br /&gt;
* Andrew Dunstan&lt;br /&gt;
* Peter Eisentraut&lt;br /&gt;
* Dimitri Fontaine&lt;br /&gt;
* Andres Freund&lt;br /&gt;
* Stephen Frost&lt;br /&gt;
* Peter Geoghegan&lt;br /&gt;
* Kevin Grittner&lt;br /&gt;
* Robert Haas&lt;br /&gt;
* Magnus Hagander&lt;br /&gt;
* Fujii Masao&lt;br /&gt;
* Noah Misch&lt;br /&gt;
* Bruce Momjian&lt;br /&gt;
* Tom Lane&lt;br /&gt;
* Dave Page&lt;br /&gt;
* Simon Riggs&lt;br /&gt;
* KaiGai Kohei&lt;br /&gt;
&lt;br /&gt;
== Proposed Agenda Items ==&lt;br /&gt;
&lt;br /&gt;
Please list proposed agenda items here:&lt;br /&gt;
&lt;br /&gt;
* 9.4 Commitfest schedule&lt;br /&gt;
* [http://wiki.postgresql.org/wiki/Parallel_Query_Execution Parallel Query Execution] (Bruce)&lt;br /&gt;
* logical changeset generation review &amp;amp; integration (Andres)&lt;br /&gt;
* utilization of upcoming non-volatile RAM device (Kaigai)&lt;br /&gt;
* pluggable plan/exec nodes (Kaigai)&lt;br /&gt;
** to offload targetlist calculation, sorting, aggregates, ...&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/Homebrew</id>
		<title>Homebrew</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/Homebrew"/>
				<updated>2013-04-09T02:20:49Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;Added petere/postgresql tap&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://mxcl.github.com/homebrew/ Homebrew] is a package manager for Mac OS X that builds software from its source code.  It includes a version of PostgreSQL packaged by what it refers to as a formula.  This type of installation might be preferred by people who are comfortable using the command line to install programs, such as software developers.&lt;br /&gt;
&lt;br /&gt;
Notes on Homebrew:&lt;br /&gt;
&lt;br /&gt;
* [http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x Install PostgreSQL 9 on OS X] (2010-11-25) - Easy install using Homebrew package manager.&lt;br /&gt;
* [http://nextmarvel.net/blog/2011/09/brew-install-postgresql-on-os-x-lion/ Brew Install Postgresql on OS X Lion] - Resolving conflicts with the built-in PostgreSQL libraries shipping with OS X 10.7 'Lion'&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2012-04/msg00010.php Discussion comparing Homebrew and EDB OS X installers]&lt;br /&gt;
* [https://github.com/petere/homebrew-postgresql &amp;lt;code&amp;gt;petere/postgresql&amp;lt;/code&amp;gt;] tap for installing multiple PostgreSQL versions in parallel&lt;br /&gt;
&lt;br /&gt;
[[Category:Tool]]&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/PGDay_NYC_2013_Talks</id>
		<title>PGDay NYC 2013 Talks</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/PGDay_NYC_2013_Talks"/>
				<updated>2013-03-25T18:37:24Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;Add my talk&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= PGDay NYC 2013 Talks =&lt;br /&gt;
&lt;br /&gt;
== Friday March 22nd, 2013 ==&lt;br /&gt;
&lt;br /&gt;
=== Liberty Hall C ===&lt;br /&gt;
&lt;br /&gt;
* [http://momjian.us/main/writings/pgsql/locking.pdf Understanding the Postgres Lock Manager (Bruce Momjian)]&lt;br /&gt;
* [http://plv8-talk.herokuapp.com/ Embracing the Web with JSON and PLV8 (Will Leinweber)]&lt;br /&gt;
&lt;br /&gt;
=== Liberty Hall A ===&lt;br /&gt;
&lt;br /&gt;
*  [[:File:PPCD.pdf|Postgres Plus Cloud Database (Dave Page)]]&lt;br /&gt;
* [https://github.com/petere/logging-hooks-presentation Toward real-time log analysis (Peter Eisentraut)]&lt;br /&gt;
&lt;br /&gt;
[[Category:PostgreSQL Events]]&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/NLS</id>
		<title>NLS</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/NLS"/>
				<updated>2012-10-30T18:44:52Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;/* Translating */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= PostgreSQL National Language Support =&lt;br /&gt;
&lt;br /&gt;
This page contains some information about the PostgreSQL National Language Support effort.  Please read the [http://developer.postgresql.org/docs/postgres/nls.html information about NLS in the PostgreSQL Documentation] for background and technical information.  Some of the information on this page may eventually be migrated there as it stabilizes. There's also the [http://www.gnu.org/software/gettext/manual/gettext.html GNU Gettext Manual], which is only partially relevant for us, but it might be good to look at anyway.&lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
&lt;br /&gt;
The [http://babel.postgresql.org/ status tables] shows which areas of the PostgreSQL source are prepared for translation, and the progress of those translations.  There you can also download freshly baked PO files that are merged up against the latest program sources.  No PostgreSQL source tree is needed for translation work.&lt;br /&gt;
&lt;br /&gt;
== Communicating ==&lt;br /&gt;
&lt;br /&gt;
If you have any questions about the PostgreSQL translation project, including&lt;br /&gt;
* you want to start a new translation or continue an existing one and you want to avoid duplicating your work with someone else,&lt;br /&gt;
* you're looking for other people who want to work with you on translating,&lt;br /&gt;
* you're having technical questions about tools, the source tree, the meaning of terms, etc.,&lt;br /&gt;
then write to the mailing list mailto:pgtranslation-translators@pgfoundry.org.  More information about our [http://pgfoundry.org/mail/?group_id=1000064 mailing lists] is available.&lt;br /&gt;
&lt;br /&gt;
== Howto ==&lt;br /&gt;
&lt;br /&gt;
Here is how to get set up for translation work.  It is assumed here that you already know your way around gettext message catalogs.  If you're new to this, read the chapter on NLS in the PostgreSQL Documentation.&lt;br /&gt;
&lt;br /&gt;
=== Translating ===&lt;br /&gt;
&lt;br /&gt;
# To continue an existing translation, download a new PO file by following the links in the [http://babel.postgresql.org/ status tables].  Fill in the file as much as you want.&lt;br /&gt;
# To start a new translation, download a POT file by clicking on one of the catalog names in the left column of the [http://babel.postgresql.org/ status tables].  First, fill in all the fields in the header and remove the fuzzy flag.  Particularly, the character set information is very important and must not be left out!  Then fill in the rest of the file as much as you want.&lt;br /&gt;
# When you are done editing, check the file for errors.  If you're using the Emacs PO mode, press V.  From the command line, run &amp;lt;code&amp;gt;msgfmt -o /dev/null -v -c yourfile.po&amp;lt;/code&amp;gt;.  Or copy the file into the main PostgreSQL source tree and run &amp;lt;code&amp;gt;gmake maintainer-check-po&amp;lt;/code&amp;gt;.  If you don't do this, your file might contain bugs that cause program crashes, which will quickly disenchant users from PostgreSQL and internationalized software in general.&lt;br /&gt;
# Submit the resulting file to the [http://pgfoundry.org/tracker/?atid=320&amp;amp;group_id=1000064 Patch Tracker].  Please do not send patches; send the whole file.  If you're concerned that the file is too big, run it through a compression program.  If you are sending many files, put them into a tar archive.  Please don't open a ticket per file, or create many attachments.  Both of these rules make it easier for the person installing your files.  One of the registered developers will install your file into the source code repository. Make sure you specify which branch your file is for (see below about branches).  People who have contributed for a while will be registered as developers and are able to commit their files into the source code repository by themselves.&lt;br /&gt;
&lt;br /&gt;
=== Tools ===&lt;br /&gt;
&lt;br /&gt;
Please don't edit the PO files with a plain text editor. You're making your life unnecessarily hard. There are several tools that make editing PO files really easy.&lt;br /&gt;
* GNU Emacs and XEmacs have PO editing modes.&lt;br /&gt;
* [http://kbabel.kde.org/ KBabel] is for those who like KDE-based tools.&lt;br /&gt;
* [http://www.poedit.net/ Poedit] is yet another tool, which even works under Windows&lt;br /&gt;
&lt;br /&gt;
=== Team Building ===&lt;br /&gt;
&lt;br /&gt;
If you are new, please check on the [http://babel.postgresql.org/ status tables] whether your language is already being worked on.  If so, look into the translation files near the top to find out where to contact the last translator or the translation team.  Please contact them about contributing.  If the last translator cannot be reached or if it has been a long time since the last update to the file, you can just take over.  But remember that communicating first avoids duplicate work later.&lt;br /&gt;
&lt;br /&gt;
=== Tips ===&lt;br /&gt;
&lt;br /&gt;
Check out the home of the [http://translationproject.org/html/welcome.html GNU Translation Project].  There you can find out about mailing lists, web sites, and other resources for translation efforts to your language.  Some of these resources are GNU-oriented, but others are not.&lt;br /&gt;
&lt;br /&gt;
== Release Management ==&lt;br /&gt;
&lt;br /&gt;
You can work in several branches. There is a current branch and several back branches.&lt;br /&gt;
&lt;br /&gt;
The back branches belong to past releases of PostgreSQL. It is usually a good idea to finish translations for the recent back branches first, because those are the ones that people currently use. When a new back branch release is made (something like 8.0.5 or 8.1.1), updated translations will be included.&lt;br /&gt;
&lt;br /&gt;
By contrast, the current branch is often under heavy development, meaning that error messages change, and translation work done today might become obsolete tomorrow. Therefore, translations in the current branch should normally only be done during the beta phase or after a release if no new branch for the development release has been made yet. (The [http://babel.postgresql.org/ status page] informs about the status of the branches.)&lt;br /&gt;
&lt;br /&gt;
Information about release schedules and so on will also be posted to the mailing list mailto:pgtranslation-translators@pgfoundry.org (see [http://pgfoundry.org/mail/?group_id=1000064 mailing lists]), which you are encouraged to read.&lt;br /&gt;
&lt;br /&gt;
=== Minimum Translation ===&lt;br /&gt;
&lt;br /&gt;
A PO file must have at least 80% of its strings translated before it is considered for inclusion in a PostgreSQL major release.  This is to prevent presenting users with a strange mix of English and non-English messages.  This criterion will be regularly evaluated in the time before a major release, in particular during the beta phase.  Files that do not meet this criterion will not be included or removed if they have previously been included.&lt;br /&gt;
&lt;br /&gt;
If a file drops below the threshold after the major release during the maintenance period of a branch, it will not be removed because of that.&lt;br /&gt;
&lt;br /&gt;
This is a new policy as of April 2009; we will see how it goes.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/Oracle_Compatibility_Tasks</id>
		<title>Oracle Compatibility Tasks</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/Oracle_Compatibility_Tasks"/>
				<updated>2012-06-30T17:07:26Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;remove done stuff&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Implementation Jobs for Improving Oracle Compatibility in PostgreSQL =&lt;br /&gt;
&lt;br /&gt;
Here are a few jobs and research projects for improving Oracle compatibility in and around PostgreSQL.  This is based upon [http://www.pgcon.org/2008/schedule/events/62.en.html Peter Eisentraut's talk at PGCon 2008].  Please add your thoughts.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
* Quoted identifiers, upper vs. lower case folding&lt;br /&gt;
&lt;br /&gt;
* MINUS vs. EXCEPT (check whether Oracle also supports EXCEPT)&lt;br /&gt;
&lt;br /&gt;
== Data Types ==&lt;br /&gt;
&lt;br /&gt;
* Implement varchar2 as alias for varchar [orafce]&lt;br /&gt;
&lt;br /&gt;
* Implement clob as alias for text [PG core]&lt;br /&gt;
&lt;br /&gt;
* Implement long as alias for text or clob? [orafce]&lt;br /&gt;
&lt;br /&gt;
* Implement nchar, nvarchar2, nclob as appropriate [orafce and PG core]&lt;br /&gt;
&lt;br /&gt;
* Implement number as alias for numeric [orafce]&lt;br /&gt;
&lt;br /&gt;
* Implement binary_float, binary_double as aliases for float4, float8 [orafce]&lt;br /&gt;
&lt;br /&gt;
* Implement blob [PG core]&lt;br /&gt;
&lt;br /&gt;
* Implement raw, long raw [orafce]&lt;br /&gt;
&lt;br /&gt;
* Figure out some way to allow Oracle-behavior with date (???)&lt;br /&gt;
&lt;br /&gt;
* Fix interval type to be compatible with SQL standard.&lt;br /&gt;
&lt;br /&gt;
== Null Behavior ==&lt;br /&gt;
&lt;br /&gt;
I would like to see a detailed analysis and definition of how null values&lt;br /&gt;
really behave in Oracle.  We can probably implement workarounds to make the&lt;br /&gt;
behavior optionally more similar, but at the moment the Oracle behavior just&lt;br /&gt;
appears weird and totally inconsistent.&lt;br /&gt;
&lt;br /&gt;
== Sequences ==&lt;br /&gt;
&lt;br /&gt;
* Add NOCACHE clause to CREATE SEQUENCE&lt;br /&gt;
&lt;br /&gt;
== Formatting ==&lt;br /&gt;
&lt;br /&gt;
* Add more features and robustness to to_char.&lt;br /&gt;
&lt;br /&gt;
* Maybe add custom variables for the NLS_ settings that internally change the right PostgreSQL settings.&lt;br /&gt;
&lt;br /&gt;
== Triggers ==&lt;br /&gt;
&lt;br /&gt;
* Allow creating triggers and associated functions in one statement.  The function would be created automatically as a depend&lt;br /&gt;
&lt;br /&gt;
== PL/pgSQL ==&lt;br /&gt;
&lt;br /&gt;
* Make DECLARE optional&lt;br /&gt;
&lt;br /&gt;
* Make PERFORM optional for procedure calls&lt;br /&gt;
&lt;br /&gt;
[[Category:Oracle]]&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/User:Petere</id>
		<title>User:Petere</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/User:Petere"/>
				<updated>2012-06-30T17:04:18Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;remove old stuff&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Peter Eisentraut's PostgreSQL Activities=&lt;br /&gt;
&lt;br /&gt;
These pages contain some information about my activities related to the PostgreSQL project.  If you want to follow what I'm up to, check my [http://petereisentraut.blogspot.com/ blog] or follow me on [http://twitter.com/petereisentraut Twitter].&lt;br /&gt;
&lt;br /&gt;
==Long-term Projects==&lt;br /&gt;
* [[Usability Challenges]]&lt;br /&gt;
* [[Oracle Compatibility Tasks]]&lt;br /&gt;
&lt;br /&gt;
==Publishing==&lt;br /&gt;
&lt;br /&gt;
I have written a few books about PostgreSQL:&lt;br /&gt;
* [http://www.oreilly.de/catalog/postgresqladmger/ PostgreSQL-Administration], 2009&lt;br /&gt;
* [http://mitp.de/vmi/mitp/detail/pWert/1493 PostgreSQL GE-PACKT], 2005&lt;br /&gt;
* [http://mitp.de/vmi/mitp/detail/pWert/513371 PostgreSQL: Das offizielle Handbuch], 2003 (also available [http://www.postgresql.org/docs/books/pghandbuch.html.de online])&lt;br /&gt;
&lt;br /&gt;
See also the [http://www.postgresql.org/docs/books/ PostgreSQL book list].&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/FAQ</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/FAQ"/>
				<updated>2012-06-17T08:34:20Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;Add: Why do my strings sort incorrectly?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
[[:Category:FAQ|Additional FAQ Entries on this Wiki]]&lt;br /&gt;
&lt;br /&gt;
== Translations of this Document ==&lt;br /&gt;
&lt;br /&gt;
* [[Häufig gestellte Fragen|German]]&lt;br /&gt;
* [[Perguntas Frequentes|Portuguese]]&lt;br /&gt;
* [[Preguntas Frecuentes|Spanish]]&lt;br /&gt;
* [[Часто Задаваемые Вопросы|Русский]]&lt;br /&gt;
&lt;br /&gt;
== Platform-specific questions ==&lt;br /&gt;
&lt;br /&gt;
Windows users should also read the [[Running &amp;amp; Installing PostgreSQL On Native Windows|platform FAQ for Windows]]. There are [[Frequently Asked Questions#Platform FAQs|FAQs for other platforms]] too.&lt;br /&gt;
&lt;br /&gt;
== General Questions ==&lt;br /&gt;
&lt;br /&gt;
=== What is PostgreSQL? How is it pronounced? What is Postgres? ===&lt;br /&gt;
  &lt;br /&gt;
PostgreSQL is pronounced Post-Gres-Q-L. (For those curious about how&lt;br /&gt;
to say &amp;quot;PostgreSQL&amp;quot;, an [http://www.postgresql.org/files/postgresql.mp3 audio file] is available.)&lt;br /&gt;
&lt;br /&gt;
PostgreSQL is an object-relational database system that has the&lt;br /&gt;
features of traditional proprietary database systems with enhancements&lt;br /&gt;
to be found in next-generation DBMS systems. PostgreSQL is free and&lt;br /&gt;
the complete source code is available.&lt;br /&gt;
&lt;br /&gt;
PostgreSQL development is performed by a team of mostly volunteer&lt;br /&gt;
developers spread throughout the world and communicating via the&lt;br /&gt;
Internet. It is a community project and is not controlled by any&lt;br /&gt;
company. To get involved, see the [[Developer_FAQ | Developer FAQ]].&lt;br /&gt;
&lt;br /&gt;
Postgres is a widely-used nickname for PostgreSQL. It was the original&lt;br /&gt;
name of the project at Berkeley and is strongly preferred over other&lt;br /&gt;
nicknames. If you find 'PostgreSQL' hard to pronounce, call it&lt;br /&gt;
'Postgres' instead.&lt;br /&gt;
&lt;br /&gt;
=== Who controls PostgreSQL? ===&lt;br /&gt;
  &lt;br /&gt;
If you are looking for a PostgreSQL gatekeeper, central committee, or&lt;br /&gt;
controlling company, give up --- there isn't one. We do have a core&lt;br /&gt;
committee and CVS committers, but these groups are more for&lt;br /&gt;
administrative purposes than control. The project is directed by the&lt;br /&gt;
community of developers and users, which anyone can join. All you need&lt;br /&gt;
to do is subscribe to the mailing lists and participate in the&lt;br /&gt;
discussions. (See the [[Developer FAQ|Developer's FAQ]] for information on how to get&lt;br /&gt;
involved in PostgreSQL development.)&lt;br /&gt;
&lt;br /&gt;
=== Who is the PostgreSQL Global Development Group? ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;PGDG&amp;quot; is an international, unincorporated association of&lt;br /&gt;
individuals and companies who have contributed to the PostgreSQL&lt;br /&gt;
project.  The PostgreSQL Core Team generally act as spokespeople&lt;br /&gt;
for the PGDG.&lt;br /&gt;
&lt;br /&gt;
=== Who is the PostgreSQL Core Team? ===&lt;br /&gt;
&lt;br /&gt;
A committee of five to seven (currently six) senior contributors to&lt;br /&gt;
PostgreSQL who do the following for the project: (a) set release dates,&lt;br /&gt;
(b) handle confidential matters for the project, (c) act as spokespeople&lt;br /&gt;
for the PGDG when required, and (d) arbitrate community decisions which&lt;br /&gt;
are not settled by consensus.  The current Core Team is listed on top of&lt;br /&gt;
[http://www.postgresql.org/community/contributors/ the contributors page]&lt;br /&gt;
&lt;br /&gt;
=== What about the various PostgreSQL foundations? ===&lt;br /&gt;
&lt;br /&gt;
While the PostgreSQL project utilizes non-profit corporations in the&lt;br /&gt;
USA, Europe, Brazil and Japan for fundraising and project coordination,&lt;br /&gt;
these entities do not own the PostgreSQL code.&lt;br /&gt;
&lt;br /&gt;
=== What is the license of PostgreSQL? ===&lt;br /&gt;
  &lt;br /&gt;
PostgreSQL is distributed under a license similar to BSD and MIT. Basically, it&lt;br /&gt;
allows users to do anything they want with the code, including&lt;br /&gt;
reselling binaries without the source code. The only restriction is&lt;br /&gt;
that you not hold us legally liable for problems with the software.&lt;br /&gt;
There is also the requirement that this copyright appear in all copies&lt;br /&gt;
of the software. Here is the license we use:&lt;br /&gt;
&lt;br /&gt;
 PostgreSQL Database Management System&lt;br /&gt;
 (formerly known as Postgres, then as Postgres95)&lt;br /&gt;
 &lt;br /&gt;
 Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group&lt;br /&gt;
 &lt;br /&gt;
 Portions Copyright (c) 1994, The Regents of the University of California&lt;br /&gt;
 &lt;br /&gt;
 Permission to use, copy, modify, and distribute this software and its&lt;br /&gt;
 documentation for any purpose, without fee, and without a written agreement&lt;br /&gt;
 is hereby granted, provided that the above copyright notice and this&lt;br /&gt;
 paragraph and the following two paragraphs appear in all copies.&lt;br /&gt;
 &lt;br /&gt;
 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR&lt;br /&gt;
 DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING&lt;br /&gt;
 LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS&lt;br /&gt;
 DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE&lt;br /&gt;
 POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
 &lt;br /&gt;
 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,&lt;br /&gt;
 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY&lt;br /&gt;
 AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS&lt;br /&gt;
 ON AN &amp;quot;AS IS&amp;quot; BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO&lt;br /&gt;
 PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.&lt;br /&gt;
&lt;br /&gt;
=== What platforms does PostgreSQL support? ===&lt;br /&gt;
  &lt;br /&gt;
In general, any modern Unix-compatible platform should be able to run&lt;br /&gt;
PostgreSQL. The platforms that have received recent explicit testing&lt;br /&gt;
can be seen in the [http://buildfarm.postgresql.org/ Build farm].&lt;br /&gt;
The documentation contains more details about supported platforms at http://www.postgresql.org/docs/current/static/supported-platforms.html.&lt;br /&gt;
&lt;br /&gt;
PostgreSQL also runs natively on Microsoft Windows NT-based operating&lt;br /&gt;
systems like Win2000 SP4, WinXP, and Win2003. A prepackaged installer&lt;br /&gt;
is available at http://www.postgresql.org/download/windows.&lt;br /&gt;
MSDOS-based versions of Windows (Win95, Win98, WinMe) can run&lt;br /&gt;
PostgreSQL using Cygwin.&lt;br /&gt;
&lt;br /&gt;
=== Where can I get PostgreSQL? ===&lt;br /&gt;
&lt;br /&gt;
There are binary distributions for various operating systems and platforms; see [http://www.postgresql.org/download our download area].&lt;br /&gt;
&lt;br /&gt;
The source code can be obtained [http://www.postgresql.org/ftp/ via web browser] or [ftp://ftp.postgresql.org/pub/ through ftp].&lt;br /&gt;
&lt;br /&gt;
=== What is the most recent release? ===&lt;br /&gt;
  &lt;br /&gt;
The latest release of PostgreSQL is shown on the front page of [http://www.postgresql.org/ our website].&lt;br /&gt;
&lt;br /&gt;
We typically have a major release every year, with minor releases every few months.&lt;br /&gt;
Minor releases are usually made at the same time for all supported major-release branches.&lt;br /&gt;
For more about major versus minor releases, see&lt;br /&gt;
http://www.postgresql.org/support/versioning.&lt;br /&gt;
&lt;br /&gt;
=== Where can I get support? ===&lt;br /&gt;
  &lt;br /&gt;
The PostgreSQL community provides assistance to many of its users via&lt;br /&gt;
email. The main web site to subscribe to the email lists is&lt;br /&gt;
http://www.postgresql.org/community/lists/. The general or bugs lists&lt;br /&gt;
are a good place to start. For best results, consider reading the &lt;br /&gt;
[[guide to reporting problems]] before you post to make sure you&lt;br /&gt;
include enough information for people to help you.&lt;br /&gt;
&lt;br /&gt;
The major IRC channel is #postgresql on Freenode (irc.freenode.net).&lt;br /&gt;
A Spanish one also&lt;br /&gt;
exists on the same network, (#postgresql-es), a French one,&lt;br /&gt;
(#postgresqlfr), and a Brazilian one, (#postgresql-br). There is also&lt;br /&gt;
a PostgreSQL channel on EFNet.&lt;br /&gt;
&lt;br /&gt;
A list of support companies is available at&lt;br /&gt;
http://www.postgresql.org/support/professional_support.&lt;br /&gt;
&lt;br /&gt;
=== How do I submit a bug report? ===&lt;br /&gt;
  &lt;br /&gt;
Visit the PostgreSQL bug form at&lt;br /&gt;
http://www.postgresql.org/support/submitbug to submit your bug&lt;br /&gt;
report to the pgsql-bugs mailing list. Also check out our ftp&lt;br /&gt;
site ftp://ftp.postgresql.org/pub/ to see if there is a more recent&lt;br /&gt;
PostgreSQL version.&lt;br /&gt;
&lt;br /&gt;
For a prompt and helpful response, it is important for you to read the &lt;br /&gt;
[[guide to reporting problems]] to make sure that you include the &lt;br /&gt;
information required to fully understand and act on your report.&lt;br /&gt;
&lt;br /&gt;
Bugs submitted using the bug form or posted to any PostgreSQL mailing&lt;br /&gt;
list typically generates one of the following replies:&lt;br /&gt;
* It is not a bug, and why&lt;br /&gt;
* It is a known bug and is already on the TODO list&lt;br /&gt;
* The bug has been fixed in the current release&lt;br /&gt;
* The bug has been fixed but is not packaged yet in an official release&lt;br /&gt;
* A request is made for more detailed information:&lt;br /&gt;
** Operating system&lt;br /&gt;
** PostgreSQL version&lt;br /&gt;
** Reproducible test case&lt;br /&gt;
** Debugging information&lt;br /&gt;
** [[Generating_a_stack_trace_of_a_PostgreSQL_backend|Debugger backtrace output]]&lt;br /&gt;
* The bug is new. The following might happen:&lt;br /&gt;
** A patch is created and will be included in the next major or minor release&lt;br /&gt;
** The bug cannot be fixed immediately and is added to the TODO list&lt;br /&gt;
&lt;br /&gt;
=== How do I find out about known bugs or missing features? ===&lt;br /&gt;
  &lt;br /&gt;
PostgreSQL supports an extended subset of SQL:2008. See our [[Todo|TODO list]]&lt;br /&gt;
for known bugs, missing features, and future plans.&lt;br /&gt;
&lt;br /&gt;
A feature request usually results in one of the following replies:&lt;br /&gt;
* The feature is already on the TODO list&lt;br /&gt;
* The feature is not desired because:&lt;br /&gt;
** It duplicates existing functionality that already follows the SQL standard&lt;br /&gt;
** The feature would increase code complexity but add little benefit&lt;br /&gt;
** The feature would be insecure or unreliable&lt;br /&gt;
* The new feature is added to the TODO list&lt;br /&gt;
    &lt;br /&gt;
PostgreSQL does not use a bug tracking system because we find it more&lt;br /&gt;
efficient to respond directly to email and keep the TODO list&lt;br /&gt;
up-to-date. In practice, bugs don't last very long in the software,&lt;br /&gt;
and bugs that affect a large number of users are fixed rapidly. The&lt;br /&gt;
only place to find all changes, improvements, and fixes in a&lt;br /&gt;
PostgreSQL release is to read the CVS log messages. Even the release&lt;br /&gt;
notes do not list every change made to the software.&lt;br /&gt;
&lt;br /&gt;
=== A bug I'm encountering is fixed in a newer minor release of PostgreSQL, but I don't want to upgrade. Can I get a patch for just this issue? ===&lt;br /&gt;
&lt;br /&gt;
No. Nobody will make a custom patch for you so you can (say) extract a fix from 8.4.3 and apply it to 8.4.1 . &lt;br /&gt;
That's because there should never be any need to do that.&lt;br /&gt;
&lt;br /&gt;
PostgreSQL has a strict policy that only bug fixes are back-patched into point releases, as per the [http://www.postgresql.org/support/versioning version policy]. It is safe to upgrade from 8.4.1 to 8.4.3,&lt;br /&gt;
for example. Binary compatibility will be maintained, no dump and reload is required, nothing will break, but bugs that might &lt;br /&gt;
cause problems have been fixed. Even if you are not yet encountering a particular bug, you might later, and it is wise to upgrade promptly.&lt;br /&gt;
You just have to install the update and re-start the database server, nothing more.&lt;br /&gt;
&lt;br /&gt;
Upgrading from 8.3 to 8.4, or 8.4 to 9.0, is a major upgrade that does not come with the same guarantees. However, if a bug&lt;br /&gt;
is discovered in 9.0 then it will generally be fixed in all maintained older versions like 8.4 and 8.3 if it is safe and&lt;br /&gt;
practical to do so.&lt;br /&gt;
&lt;br /&gt;
This means that if you're running 8.1.0, upgrading to 8.1.21 is &amp;lt;b&amp;gt;strongly&amp;lt;/b&amp;gt; recommended and very safe. On the other hand,&lt;br /&gt;
upgrading to the next major release, 8.2.x, may require changes to your app, and will certainly require a dump and reload.&lt;br /&gt;
&lt;br /&gt;
If you want to be careful about all upgrades, you should read the [http://www.postgresql.org/docs/current/static/release.html release notes] &lt;br /&gt;
for each point release between your current one and the latest minor version of the same major release carefully. If you're&lt;br /&gt;
exceptionally paranoid about upgrades, you can fetch the source code to each set of point release changes from [http://git.postgresql.org/ PostgreSQL's git repository] and examine it.&lt;br /&gt;
&lt;br /&gt;
It is strongly recommended that you &amp;lt;b&amp;gt;always&amp;lt;/b&amp;gt; upgrade to the latest minor release. Avoid trying to extract and apply individual fixes&lt;br /&gt;
from point releases; by doing so you're bypassing all the QA done by the PostgreSQL team when they prepare a release, and are creating your&lt;br /&gt;
own custom version that &amp;lt;i&amp;gt;nobody else has ever used&amp;lt;/i&amp;gt;. It's a lot safer to just update to the latest tested, safe release. &amp;lt;i&amp;gt;Patching your own custom, non-standard build will also take more time/effort, and will require the same amount of downtime as a normal upgrade.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== I have a program that says it wants PostgreSQL x.y.1. Can I use PostgreSQL x.y.2 instead? ===&lt;br /&gt;
&lt;br /&gt;
Any program that works with a particular version, like 8.4.1, should work with any other minor version in the same major version. That means that if a program says it wants (eg) 8.4.1, you can and should install the latest in the 8.4 series instead.&lt;br /&gt;
&lt;br /&gt;
See the previous question for more details.&lt;br /&gt;
&lt;br /&gt;
=== What documentation is available? ===&lt;br /&gt;
  &lt;br /&gt;
PostgreSQL includes extensive documentation, including a large manual,&lt;br /&gt;
manual pages, and some test examples. See the /doc directory. You can&lt;br /&gt;
also browse the manuals online at http://www.postgresql.org/docs.&lt;br /&gt;
&lt;br /&gt;
There are a number of PostgreSQL&lt;br /&gt;
books available for purchase; two of them are also available online.  A list of books can be found at&lt;br /&gt;
http://www.postgresql.org/docs/books/.  One of the most popular ones is the one by Korry &amp;amp; Susan&lt;br /&gt;
Douglas.&lt;br /&gt;
&lt;br /&gt;
There is also a collection of&lt;br /&gt;
PostgreSQL technical articles on the &lt;br /&gt;
[[Community_Generated_Articles%2C_Guides%2C_and_Documentation | wiki]].&lt;br /&gt;
&lt;br /&gt;
The command line client program psql has some \d commands to show&lt;br /&gt;
information about types, operators, functions, aggregates, etc. - use&lt;br /&gt;
\? to display the available commands.&lt;br /&gt;
&lt;br /&gt;
=== How can I learn SQL? ===&lt;br /&gt;
&lt;br /&gt;
First,  consider the PostgreSQL-specific books mentioned above. Many of&lt;br /&gt;
our users also like The Practical SQL Handbook, Bowman, Judith S., et&lt;br /&gt;
al., Addison-Wesley. Others like The Complete Reference SQL, Groff et&lt;br /&gt;
al., McGraw-Hill.&lt;br /&gt;
&lt;br /&gt;
Many people consider the PostgreSQL documentation to be an excellent guide&lt;br /&gt;
for learning SQL its self, as well as for PostgreSQL's implementation of it.&lt;br /&gt;
For best results use PostgreSQL alongside another full-featured SQL database as&lt;br /&gt;
you learn, so you get used to SQL without becoming reliant on PostgreSQL-specific&lt;br /&gt;
features. The PostgreSQL documentation generally mentions when features are PostgreSQL&lt;br /&gt;
extensions of the standard.&lt;br /&gt;
&lt;br /&gt;
There are also many nice tutorials available online:&lt;br /&gt;
* http://www.intermedia.net/support/sql/sqltut.shtm&lt;br /&gt;
* http://sqlcourse.com&lt;br /&gt;
* http://www.w3schools.com/sql/default.asp&lt;br /&gt;
* http://mysite.verizon.net/Graeme_Birchall/id1.html&lt;br /&gt;
* http://sqlzoo.net&lt;br /&gt;
&lt;br /&gt;
=== How do I submit a patch or join the development team? ===&lt;br /&gt;
  &lt;br /&gt;
See the [[Developer FAQ|Developer's FAQ]].&lt;br /&gt;
&lt;br /&gt;
=== How does PostgreSQL compare to other DBMSs? ===&lt;br /&gt;
  &lt;br /&gt;
There are several ways of measuring software: features, performance,&lt;br /&gt;
reliability, support, and price.&lt;br /&gt;
&lt;br /&gt;
==== Features ====&lt;br /&gt;
&lt;br /&gt;
PostgreSQL has most features present in large proprietary DBMSs,&lt;br /&gt;
like transactions, subselects, triggers, views, foreign key&lt;br /&gt;
referential integrity, and sophisticated locking. We have some&lt;br /&gt;
features they do not have, like user-defined types,&lt;br /&gt;
inheritance, rules, and multi-version concurrency control to&lt;br /&gt;
reduce lock contention.&lt;br /&gt;
       &lt;br /&gt;
==== Performance ====&lt;br /&gt;
&lt;br /&gt;
PostgreSQL's performance is comparable to other proprietary and&lt;br /&gt;
open source databases. It is faster for some things, slower for&lt;br /&gt;
others. Our performance is usually +/-10% compared to other databases.&lt;br /&gt;
       &lt;br /&gt;
==== Reliability ====&lt;br /&gt;
&lt;br /&gt;
We realize that a DBMS must be reliable, or it is worthless. We&lt;br /&gt;
strive to release well-tested, stable code that has a minimum&lt;br /&gt;
of bugs. Each release has at least one month of beta testing,&lt;br /&gt;
and our release history shows that we can provide stable, solid&lt;br /&gt;
releases that are ready for production use. We believe we&lt;br /&gt;
compare favorably to other database software in this area.&lt;br /&gt;
       &lt;br /&gt;
==== Support ====&lt;br /&gt;
&lt;br /&gt;
Our mailing lists provide contact with a large group of&lt;br /&gt;
developers and users to help resolve any problems encountered.&lt;br /&gt;
While we cannot guarantee a fix, proprietary DBMSs do not always&lt;br /&gt;
supply a fix either. Direct access to developers, the user&lt;br /&gt;
community, manuals, and the source code often make PostgreSQL&lt;br /&gt;
support superior to other DBMSs. There is commercial&lt;br /&gt;
per-incident support available for those who need it. (See [[#Where_can_I_get_support.3F | section 1.7]]).&lt;br /&gt;
&lt;br /&gt;
==== Price ====&lt;br /&gt;
&lt;br /&gt;
We are free for all use, both proprietary and open source.&lt;br /&gt;
You can add our code to your product with no limitations,&lt;br /&gt;
except those outlined in our BSD-style license stated above.       &lt;br /&gt;
&lt;br /&gt;
=== Can PostgreSQL be embedded? ===&lt;br /&gt;
&lt;br /&gt;
PostgreSQL is designed as a client/server architecture, which requires&lt;br /&gt;
separate processes for each client and server, and various helper&lt;br /&gt;
processes. Many embedded architectures can support such requirements.&lt;br /&gt;
However, if your embedded architecture requires the database server to&lt;br /&gt;
run inside the application process, you cannot use Postgres and should&lt;br /&gt;
select a lighter-weight database solution.&lt;br /&gt;
&lt;br /&gt;
Popular embeddable options include [http://sqlite.org SQLite] and [http://firebirdsql.org Firebird SQL].&lt;br /&gt;
&lt;br /&gt;
=== How do I unsubscribe from the PostgreSQL email lists? How do I avoid receiving duplicate emails? ===&lt;br /&gt;
  &lt;br /&gt;
The PostgreSQL Majordomo page allows subscribing or unsubscribing from&lt;br /&gt;
any of the PostgreSQL email lists. (You might need to have your&lt;br /&gt;
Majordomo password emailed to you to log in.)&lt;br /&gt;
&lt;br /&gt;
All PostgreSQL email lists are configured so a group reply goes to the&lt;br /&gt;
email list and the original email author. This is done so users&lt;br /&gt;
receive the quickest possible email replies. If you would prefer not&lt;br /&gt;
to receive duplicate email from the list in cases where you already&lt;br /&gt;
receive an email directly, check eliminatecc from the Majordomo Change&lt;br /&gt;
Settings page. You can also prevent yourself from receiving copies of&lt;br /&gt;
emails you post to the lists by unchecking selfcopy.&lt;br /&gt;
&lt;br /&gt;
== User Client Questions ==&lt;br /&gt;
                                   &lt;br /&gt;
=== What interfaces are available for PostgreSQL? ===&lt;br /&gt;
  &lt;br /&gt;
The PostgreSQL install includes only the C and embedded C interfaces.&lt;br /&gt;
All other interfaces are independent projects that are downloaded&lt;br /&gt;
separately; being separate allows them to have their own release&lt;br /&gt;
schedule and development teams.&lt;br /&gt;
&lt;br /&gt;
Some programming languages like PHP include an interface to&lt;br /&gt;
PostgreSQL. Interfaces for languages like Perl, TCL, Python, and many&lt;br /&gt;
others are available at http://pgfoundry.org.&lt;br /&gt;
&lt;br /&gt;
=== What tools are available for using PostgreSQL with Web pages? ===&lt;br /&gt;
  &lt;br /&gt;
A nice introduction to Database-backed Web pages can be seen at:&lt;br /&gt;
http://www.webreview.com&lt;br /&gt;
&lt;br /&gt;
For Web integration, PHP (http://www.php.net) is an excellent&lt;br /&gt;
interface.&lt;br /&gt;
&lt;br /&gt;
For complex cases, many use the Perl and DBD::Pg with CGI.pm or&lt;br /&gt;
mod_perl.&lt;br /&gt;
&lt;br /&gt;
=== Does PostgreSQL have a graphical user interface? ===&lt;br /&gt;
  &lt;br /&gt;
There are a large number of GUI Tools that are available for&lt;br /&gt;
PostgreSQL from both proprietary and open source developers. A detailed&lt;br /&gt;
list can be found in the [[Community Guide to PostgreSQL GUI Tools]].&lt;br /&gt;
&lt;br /&gt;
== Administrative Questions ==&lt;br /&gt;
                                   &lt;br /&gt;
=== How do I install PostgreSQL somewhere other than /usr/local/pgsql? ===&lt;br /&gt;
  &lt;br /&gt;
Specify the --prefix option when running configure.&lt;br /&gt;
&lt;br /&gt;
=== I'm installing PostgreSQL and don't know the password for the postgres user ===&lt;br /&gt;
&lt;br /&gt;
Dave Page wrote a [http://pgsnake.blogspot.com/2010/07/postgresql-passwords-and-installers.html blog post] explaining what the different passwords are used for, and how to overcome common problems such as resetting them.&lt;br /&gt;
&lt;br /&gt;
=== How do I control connections from other hosts? ===&lt;br /&gt;
  &lt;br /&gt;
By default, PostgreSQL only allows connections from the local machine&lt;br /&gt;
using Unix domain sockets or TCP/IP connections. Other machines will&lt;br /&gt;
not be able to connect unless you modify listen_addresses in the&lt;br /&gt;
postgresql.conf file, enable host-based authentication by modifying&lt;br /&gt;
the $PGDATA/pg_hba.conf file, and restart the database server.&lt;br /&gt;
&lt;br /&gt;
=== How do I tune the database engine for better performance? ===&lt;br /&gt;
  &lt;br /&gt;
There are three major areas for potential performance improvement:&lt;br /&gt;
&lt;br /&gt;
==== Query Changes ====&lt;br /&gt;
This involves modifying queries to obtain better performance:&lt;br /&gt;
       &lt;br /&gt;
* Creation of indexes, including expression and partial indexes&lt;br /&gt;
* Use of COPY instead of multiple INSERTs&lt;br /&gt;
* Grouping of multiple statements into a single transaction to reduce commit overhead&lt;br /&gt;
* Use of CLUSTER when retrieving many rows from an index&lt;br /&gt;
* Use of LIMIT for returning a subset of a query's output&lt;br /&gt;
* Use of Prepared queries&lt;br /&gt;
* Use of ANALYZE to maintain accurate optimizer statistics&lt;br /&gt;
* Regular use of VACUUM or pg_autovacuum&lt;br /&gt;
* Dropping of indexes during large data changes&lt;br /&gt;
         &lt;br /&gt;
==== Server Configuration ====&lt;br /&gt;
A number of postgresql.conf settings affect performance. For&lt;br /&gt;
more details, see Administration Guide/Server Run-time&lt;br /&gt;
Environment/Run-time Configuration.&lt;br /&gt;
&lt;br /&gt;
==== Hardware Selection ====&lt;br /&gt;
The effect of hardware on performance is detailed in&lt;br /&gt;
http://www.powerpostgresql.com/PerfList/ and&lt;br /&gt;
http://momjian.us/main/writings/pgsql/hw_performance/index.html.&lt;br /&gt;
&lt;br /&gt;
=== What debugging features are available? ===&lt;br /&gt;
  &lt;br /&gt;
There are many log_* server configuration variables at http://www.postgresql.org/docs/current/interactive/runtime-config-logging.html that enable printing of query and process statistics which can be very useful for debugging and performance measurements.&lt;br /&gt;
&lt;br /&gt;
=== Why do I get &amp;quot;Sorry, too many clients&amp;quot; when trying to connect? ===&lt;br /&gt;
  &lt;br /&gt;
You have reached the default limit of 100 database sessions. You need&lt;br /&gt;
to increase the server's limit on how many concurrent backend&lt;br /&gt;
processes it can start by changing the max_connections value in&lt;br /&gt;
postgresql.conf and restarting the server.&lt;br /&gt;
&lt;br /&gt;
=== What is the upgrade process for PostgreSQL? ===&lt;br /&gt;
  &lt;br /&gt;
See http://www.postgresql.org/support/versioning for a general&lt;br /&gt;
discussion about upgrading, and&lt;br /&gt;
http://www.postgresql.org/docs/current/static/install-upgrading.html&lt;br /&gt;
for specific instructions.&lt;br /&gt;
&lt;br /&gt;
=== Will PostgreSQL handle recent daylight saving time changes in various countries? ===&lt;br /&gt;
&lt;br /&gt;
PostgreSQL releases 8.0 and up depend on the widely-used tzdata database&lt;br /&gt;
(also called the zoneinfo database or the [http://www.twinsun.com/tz/tz-link.htm Olson timezone database]) for&lt;br /&gt;
daylight savings information.  To deal with a DST law change that affects you,&lt;br /&gt;
install a new tzdata file set and restart the server.&lt;br /&gt;
&lt;br /&gt;
All PostgreSQL update releases include the latest available tzdata files,&lt;br /&gt;
so keeping up-to-date on minor releases for your major version is usually&lt;br /&gt;
sufficient for this.&lt;br /&gt;
&lt;br /&gt;
On platforms that receive regular software updates including new tzdata files,&lt;br /&gt;
it may be more convenient to rely on the system's copy of the tzdata files.&lt;br /&gt;
This is possible as a compile-time option.  Most Linux distributions choose&lt;br /&gt;
this approach for their pre-built versions of PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
PostgreSQL releases before 8.0 always rely on the operating system's timezone&lt;br /&gt;
information.&lt;br /&gt;
&lt;br /&gt;
=== What computer hardware should I use? ===&lt;br /&gt;
  &lt;br /&gt;
Because PC hardware is mostly compatible, people tend to believe that&lt;br /&gt;
all PC hardware is of equal quality. It is not. ECC RAM, SCSI, and&lt;br /&gt;
quality motherboards are more reliable and have better performance&lt;br /&gt;
than less expensive hardware. PostgreSQL will run on almost any&lt;br /&gt;
hardware, but if reliability and performance are important it is wise&lt;br /&gt;
to research your hardware options thoroughly. &lt;br /&gt;
&lt;br /&gt;
Database servers, unlike many other applications, are usually I/O and memory constrained, so it is wise to focus on the I/O subsystem first, then memory capacity, and lastly consider CPU issues.  For example, a disk controller with a&lt;br /&gt;
battery-backed cache is often the cheapest and easiest way to improve database performance. Our email lists can be used to discuss hardware options and tradeoffs.&lt;br /&gt;
&lt;br /&gt;
=== How does PostgreSQL use CPU resources? ===&lt;br /&gt;
  &lt;br /&gt;
The PostgreSQL server is process-based (not threaded), and uses one operating system process per database session.  A single database session (connection) cannot utilize more than one CPU.  Of course, multiple sessions are automatically spread across all available CPUs by your operating system.  Client applications can easily use threads and create multiple database connections from each thread.&lt;br /&gt;
&lt;br /&gt;
A single complex and CPU-intensive query is unable to use more than one CPU to do the processing for the query. The OS may still be able to use others for disk I/O etc, but you won't see much benefit from more than one spare core.&lt;br /&gt;
&lt;br /&gt;
=== Why does PostgreSQL have so many processes, even when idle? ===&lt;br /&gt;
&lt;br /&gt;
As noted in [[FAQ#How does PostgreSQL use CPU resources?|the answer above]], PostgreSQL is process based, so it starts one &amp;lt;code&amp;gt;postgres&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;postgres.exe&amp;lt;/code&amp;gt; on Windows) instance per connection. The postmaster (which accepts connections and starts new postgres instances for them) is always running. In addition, PostgreSQL generally has one or more &amp;quot;helper&amp;quot; processes like the stats collector, background writer, autovacuum daemon, walsender, etc, all of which show up as &amp;quot;postgres&amp;quot; instances in most system monitoring tools.&lt;br /&gt;
&lt;br /&gt;
Despite the number of processes, they actually use very little in the way of real resources. See [[FAQ#Why does PostgreSQL show up as using so much memory in my system monitoring tool?|the next answer]].&lt;br /&gt;
&lt;br /&gt;
=== Why does PostgreSQL use so much memory? ===&lt;br /&gt;
&lt;br /&gt;
Despite appearances, this is absolutely normal, and there's actually nowhere near as much memory being used as tools like &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; or the Windows process monitor say PostgreSQL is using.&lt;br /&gt;
&lt;br /&gt;
Tools like &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; and the Windows process monitor may show many &amp;lt;code&amp;gt;postgres&amp;lt;/code&amp;gt; instances (see above), each of which appears to use a huge amount of memory. Often, when added up, the amount the postgres instances use is many times the amount of memory actually installed in the computer!&lt;br /&gt;
&lt;br /&gt;
This is a consequence of how these tools report memory use. They generally don't understand shared memory very well, and show it as if it was memory used individually and exclusively by each postgres instance. PostgreSQL uses a big chunk of shared memory to communicate between its backends and cache data. Because these tools count that shared memory block once per &amp;lt;code&amp;gt;postgres&amp;lt;/code&amp;gt; instance instead of counting it once for &amp;lt;i&amp;gt;all&amp;lt;/i&amp;gt; &amp;lt;code&amp;gt;postgres&amp;lt;/code&amp;gt; instances, they massively over-estimate how much memory PostgreSQL is using.&lt;br /&gt;
&lt;br /&gt;
Furthermore, many versions of these tools don't report the entire shared memory block as being used by an individual instance immediately when it starts, but rather count the number of shared pages it has touched since starting.  Over the lifetime of an instance, it will inevitably touch more and more of the shared memory until it has touched every page, so that its reported usage will gradually rise to include the entire shared memory block.  This is frequently misinterpreted to be a memory leak; but it is no such thing, only a reporting artifact.&lt;br /&gt;
&lt;br /&gt;
== Operational Questions ==&lt;br /&gt;
                                   &lt;br /&gt;
=== How do I SELECT only the first few rows of a query? A random row? ===&lt;br /&gt;
  &lt;br /&gt;
To retrieve only a few rows, if you know at the number of rows needed&lt;br /&gt;
at the time of the SELECT use LIMIT . If an index matches the ORDER BY&lt;br /&gt;
it is possible the entire query does not have to be executed. If you&lt;br /&gt;
don't know the number of rows at SELECT time, use a cursor and FETCH.&lt;br /&gt;
&lt;br /&gt;
To SELECT a random row, use:&lt;br /&gt;
 SELECT col&lt;br /&gt;
 FROM tab&lt;br /&gt;
 ORDER BY random()&lt;br /&gt;
 LIMIT 1;&lt;br /&gt;
&lt;br /&gt;
See also this [http://blog.rhodiumtoad.org.uk/2009/03/08/selecting-random-rows-from-a-table/ blog entry by Andrew Gierth]&lt;br /&gt;
that has more information on this topic.&lt;br /&gt;
&lt;br /&gt;
=== How do I find out what tables, indexes, databases, and users are defined? How do I see the queries used by psql to display them? ===&lt;br /&gt;
  &lt;br /&gt;
Use the \dt command to see tables in psql. For a complete list of&lt;br /&gt;
commands inside psql you can use \?. Alternatively you can read the&lt;br /&gt;
source code for psql in file pgsql/src/bin/psql/describe.c, it&lt;br /&gt;
contains SQL commands that generate the output for psql's backslash&lt;br /&gt;
commands. You can also start psql with the -E option so it will print&lt;br /&gt;
out the queries it uses to execute the commands you give. PostgreSQL&lt;br /&gt;
also provides an SQL compliant INFORMATION SCHEMA interface you can&lt;br /&gt;
query to get information about the database.&lt;br /&gt;
&lt;br /&gt;
There are also system tables beginning with pg_ that describe these&lt;br /&gt;
too.&lt;br /&gt;
&lt;br /&gt;
Use psql -l will list all databases.&lt;br /&gt;
&lt;br /&gt;
Also try the file pgsql/src/tutorial/syscat.source. It illustrates&lt;br /&gt;
many of the SELECTs needed to get information from the database system&lt;br /&gt;
tables.&lt;br /&gt;
&lt;br /&gt;
=== How do you change a column's data type? ===&lt;br /&gt;
  &lt;br /&gt;
Changing the data type of a column can be done easily in 8.0 and later&lt;br /&gt;
with ALTER TABLE ALTER COLUMN TYPE.&lt;br /&gt;
&lt;br /&gt;
In earlier releases, do this:&lt;br /&gt;
 BEGIN;&lt;br /&gt;
 ALTER TABLE tab ADD COLUMN new_col new_data_type;&lt;br /&gt;
 UPDATE tab SET new_col = CAST(old_col AS new_data_type);&lt;br /&gt;
 ALTER TABLE tab DROP COLUMN old_col;&lt;br /&gt;
 COMMIT;&lt;br /&gt;
&lt;br /&gt;
You might then want to do VACUUM FULL tab to reclaim the disk space&lt;br /&gt;
used by the expired rows.&lt;br /&gt;
&lt;br /&gt;
=== What is the maximum size for a row, a table, and a database? ===&lt;br /&gt;
  &lt;br /&gt;
These are the limits:&lt;br /&gt;
&lt;br /&gt;
 Maximum size for a database? unlimited (32 TB databases exist)&lt;br /&gt;
 Maximum size for a table? 32 TB&lt;br /&gt;
 Maximum size for a row? 400 GB&lt;br /&gt;
 Maximum size for a field? 1 GB&lt;br /&gt;
 Maximum number of rows in a table? unlimited&lt;br /&gt;
 Maximum number of columns in a table? 250-1600 depending on column types&lt;br /&gt;
 Maximum number of indexes on a table? unlimited&lt;br /&gt;
&lt;br /&gt;
Of course, these are not actually unlimited, but limited to available&lt;br /&gt;
disk space and memory/swap space. Performance may suffer when these&lt;br /&gt;
values get unusually large.&lt;br /&gt;
&lt;br /&gt;
The maximum table size of 32 TB does not require large file support&lt;br /&gt;
from the operating system. Large tables are stored as multiple 1 GB&lt;br /&gt;
files so file system size limits are not important.&lt;br /&gt;
&lt;br /&gt;
The maximum table size, row size, and maximum number of columns can be&lt;br /&gt;
quadrupled by increasing the default block size to 32k. The maximum&lt;br /&gt;
table size can also be increased using table partitioning.&lt;br /&gt;
&lt;br /&gt;
One limitation is that indexes can not be created on columns longer&lt;br /&gt;
than about 2,000 characters. Fortunately, such indexes are rarely&lt;br /&gt;
needed. Uniqueness is best guaranteed by a function index of an MD5&lt;br /&gt;
hash of the long column, and full text indexing allows for searching&lt;br /&gt;
of words within the column.&lt;br /&gt;
&lt;br /&gt;
=== How much database disk space is required to store data from a typical text file? ===&lt;br /&gt;
  &lt;br /&gt;
A PostgreSQL database may require up to five times the disk space to&lt;br /&gt;
store data from a text file.&lt;br /&gt;
&lt;br /&gt;
As an example, consider a file of 100,000 lines with an integer and&lt;br /&gt;
text description on each line. Suppose the text string averages&lt;br /&gt;
twenty bytes in length. The flat file would be 2.8 MB. The size of the&lt;br /&gt;
PostgreSQL database file containing this data can be estimated as 5.2&lt;br /&gt;
MB:&lt;br /&gt;
  24 bytes: each row header (approximate)&lt;br /&gt;
  24 bytes: one int field and one text field&lt;br /&gt;
 + 4 bytes: pointer on page to tuple&lt;br /&gt;
 ----------------------------------------&lt;br /&gt;
  52 bytes per row&lt;br /&gt;
&lt;br /&gt;
The data page size in PostgreSQL is 8192 bytes (8 KB), so:&lt;br /&gt;
&lt;br /&gt;
 8192 bytes per page&lt;br /&gt;
 -------------------  =  158 rows per database page (rounded down)&lt;br /&gt;
   52 bytes per row&lt;br /&gt;
&lt;br /&gt;
  100000 data rows&lt;br /&gt;
 ------------------  =  633 database pages (rounded up)&lt;br /&gt;
  158 rows per page&lt;br /&gt;
&lt;br /&gt;
 633 database pages * 8192 bytes per page  =  5,185,536 bytes (5.2 MB)&lt;br /&gt;
&lt;br /&gt;
Indexes do not require as much overhead, but do contain the data that&lt;br /&gt;
is being indexed, so they can be large also.&lt;br /&gt;
&lt;br /&gt;
NULLs are stored as bitmaps, so they use very little space.&lt;br /&gt;
&lt;br /&gt;
Note that long values may be compressed transparently.&lt;br /&gt;
&lt;br /&gt;
See also this presentation on the topic: [[Image:How_Long_Is_a_String.pdf]].&lt;br /&gt;
&lt;br /&gt;
=== Why are my queries slow? Why don't they use my indexes? ===&lt;br /&gt;
  &lt;br /&gt;
Indexes are not used by every query. Indexes are used only if the&lt;br /&gt;
table is larger than a minimum size, and the query selects only a&lt;br /&gt;
small percentage of the rows in the table. This is because the random&lt;br /&gt;
disk access caused by an index scan can be slower than a straight read&lt;br /&gt;
through the table, or sequential scan.&lt;br /&gt;
&lt;br /&gt;
To determine if an index should be used, PostgreSQL must have&lt;br /&gt;
statistics about the table. These statistics are collected using&lt;br /&gt;
VACUUM ANALYZE, or simply ANALYZE. Using statistics, the optimizer&lt;br /&gt;
knows how many rows are in the table, and can better determine if&lt;br /&gt;
indexes should be used. Statistics are also valuable in determining&lt;br /&gt;
optimal join order and join methods. Statistics collection should be&lt;br /&gt;
performed periodically as the contents of the table change.&lt;br /&gt;
&lt;br /&gt;
Indexes are normally not used for ORDER BY or to perform joins. A&lt;br /&gt;
sequential scan followed by an explicit sort is usually faster than an&lt;br /&gt;
index scan of a large table. However, LIMIT combined with ORDER BY&lt;br /&gt;
often will use an index because only a small portion of the table is&lt;br /&gt;
returned.&lt;br /&gt;
&lt;br /&gt;
If you believe the optimizer is incorrect in choosing a sequential&lt;br /&gt;
scan, use SET enable_seqscan TO 'off' and run query again to see if an&lt;br /&gt;
index scan is indeed faster.&lt;br /&gt;
&lt;br /&gt;
When using wild-card operators such as LIKE or ~, indexes can only be&lt;br /&gt;
used in certain circumstances:&lt;br /&gt;
&lt;br /&gt;
* The beginning of the search string must be anchored to the start of the string, i.e.&lt;br /&gt;
** LIKE patterns must not start with % or _.&lt;br /&gt;
** ~ (regular expression) patterns must start with ^.&lt;br /&gt;
&lt;br /&gt;
* The search string can not start with a character class, e.g. [a-e].&lt;br /&gt;
&lt;br /&gt;
* Case-insensitive searches such as ILIKE and ~* do not utilize indexes. Instead, use expression indexes, which are described in [[#How_do_I_perform_regular_expression_searches_and_case-insensitive_regular_expression_searches.3F_How_do_I_use_an_index_for_case-insensitive_searches.3F | section 4.8]].&lt;br /&gt;
&lt;br /&gt;
* C locale must be used during initdb because sorting in a non-C locale often doesn't match the behavior of LIKE. You can create a special text_pattern_ops index that will work in such cases, but note it is only helpful for LIKE indexing.&lt;br /&gt;
&lt;br /&gt;
It is also possible to use full text indexing for word searches.&lt;br /&gt;
&lt;br /&gt;
The [[SlowQueryQuestions]] article contains some more tips and guidance.&lt;br /&gt;
&lt;br /&gt;
=== How do I see how the query optimizer is evaluating my query? ===&lt;br /&gt;
  &lt;br /&gt;
This is done with the EXPLAIN command; see [[Using EXPLAIN]].&lt;br /&gt;
&lt;br /&gt;
=== How do I change the sort ordering of textual data? ===&lt;br /&gt;
&lt;br /&gt;
PostgreSQL sorts textual data according to the ordering that is defined by the current locale, which is selected during initdb.&lt;br /&gt;
(In 8.4 and up it will be possible to select a different locale when creating a new database.)&lt;br /&gt;
If you don't like the ordering then you need to use a different locale.&lt;br /&gt;
In particular, most locales other than &amp;quot;C&amp;quot; sort according to dictionary order, which largely ignores punctuation and spacing.&lt;br /&gt;
If that's not what you want then you need &amp;quot;C&amp;quot; locale.&lt;br /&gt;
&lt;br /&gt;
=== How do I perform regular expression searches and case-insensitive regular expression searches? How do I use an index for case-insensitive searches? ===&lt;br /&gt;
  &lt;br /&gt;
The ~ operator does regular expression matching, and ~* does&lt;br /&gt;
case-insensitive regular expression matching. The case-insensitive&lt;br /&gt;
variant of LIKE is called ILIKE.&lt;br /&gt;
&lt;br /&gt;
Case-insensitive equality comparisons are normally expressed as:&lt;br /&gt;
 SELECT *&lt;br /&gt;
 FROM tab&lt;br /&gt;
 WHERE lower(col) = 'abc';&lt;br /&gt;
&lt;br /&gt;
This will not use a standard index on &amp;quot;col&amp;quot;. However, if you create an&lt;br /&gt;
expression index on &amp;quot;lower(col)&amp;quot;, it will be used:&lt;br /&gt;
 CREATE INDEX tabindex ON tab (lower(col));&lt;br /&gt;
&lt;br /&gt;
If the above index is created as UNIQUE, then the column can store&lt;br /&gt;
upper and lowercase characters, but it cannot contain identical values that&lt;br /&gt;
differ only in case. To force a particular case to be stored in the&lt;br /&gt;
column, use a CHECK constraint or a trigger.&lt;br /&gt;
&lt;br /&gt;
In PostgreSQL 8.4 and later, you can also use the contributed [http://www.postgresql.org/docs/8.4/static/citext.html CITEXT data type], which internally implements the &amp;quot;lower()&amp;quot; calls, so that you can effectively treat it as a fully case-insensitive data type. CITEXT is also [https://svn.kineticode.com/citext/trunk/ available for 8.3], and an earlier version that treats only ASCII characters case-insensitively on 8.2 and earlier is available on [http://pgfoundry.org/projects/citext/ pgFoundry].&lt;br /&gt;
&lt;br /&gt;
=== In a query, how do I detect if a field is NULL? How do I concatenate possible NULLs? How can I sort on whether a field is NULL or not? ===&lt;br /&gt;
  &lt;br /&gt;
You can test the value with IS NULL or IS NOT NULL, like this:&lt;br /&gt;
 SELECT *&lt;br /&gt;
 FROM tab&lt;br /&gt;
 WHERE col IS NULL;&lt;br /&gt;
&lt;br /&gt;
Concatenating a NULL with something else produces another NULL.&lt;br /&gt;
If that's not what you want, you can replace the NULL(s) using&lt;br /&gt;
COALESCE(), like this:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;SELECT COALESCE(col1, '') || COALESCE(col2, '')&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 FROM tab;&lt;br /&gt;
&lt;br /&gt;
To sort by the NULL status, use an IS NULL or IS NOT NULL test&lt;br /&gt;
in your ORDER BY clause. Things that are true will sort higher than&lt;br /&gt;
things that are false, so the following will put NULL entries at the&lt;br /&gt;
front of the output:&lt;br /&gt;
 SELECT *&lt;br /&gt;
 FROM tab&lt;br /&gt;
 ORDER BY (col IS NOT NULL), col;&lt;br /&gt;
&lt;br /&gt;
In PostgreSQL 8.3 and up, you can also control sort ordering of NULLs&lt;br /&gt;
using the recently-standardized NULLS FIRST/NULLS LAST modifiers,&lt;br /&gt;
like this:&lt;br /&gt;
 SELECT *&lt;br /&gt;
 FROM tab&lt;br /&gt;
 ORDER BY col NULLS FIRST;&lt;br /&gt;
&lt;br /&gt;
=== What is the difference between the various character types? ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Type&lt;br /&gt;
!Internal Name&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|VARCHAR(n) &lt;br /&gt;
|varchar&lt;br /&gt;
|size specifies maximum length, no padding&lt;br /&gt;
|-  &lt;br /&gt;
|CHAR(n)&lt;br /&gt;
|bpchar&lt;br /&gt;
|blank-padded to the specified fixed length&lt;br /&gt;
|-&lt;br /&gt;
|TEXT&lt;br /&gt;
|text&lt;br /&gt;
|no specific upper limit on length&lt;br /&gt;
|-&lt;br /&gt;
|BYTEA&lt;br /&gt;
|bytea&lt;br /&gt;
|variable-length byte array (null-byte safe)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;char&amp;quot; (with the quotes)&lt;br /&gt;
|char&lt;br /&gt;
|one byte&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You will see the internal name when examining system catalogs and in&lt;br /&gt;
some error messages.&lt;br /&gt;
&lt;br /&gt;
The first four types above are &amp;quot;varlena&amp;quot; types (i.e., the field length&lt;br /&gt;
is explicitly stored on disk, followed by the data). Thus the actual&lt;br /&gt;
space used is slightly greater than the expected size. However, long&lt;br /&gt;
values are also subject to compression, so the space on disk might&lt;br /&gt;
also be less than expected.&lt;br /&gt;
&lt;br /&gt;
VARCHAR(n) is best when storing variable-length strings if a specific&lt;br /&gt;
upper limit on the string length is required by the application.&lt;br /&gt;
TEXT is for strings of &amp;quot;unlimited&amp;quot; length (though all fields in PostgreSQL&lt;br /&gt;
are subject to a maximum value length of one gigabyte).&lt;br /&gt;
&lt;br /&gt;
CHAR(n) is for storing strings that are all the same length. CHAR(n)&lt;br /&gt;
pads with blanks to the specified length, while VARCHAR(n) only stores&lt;br /&gt;
the characters supplied.  BYTEA is for storing binary data,&lt;br /&gt;
particularly values that include zero bytes. All these types have similar&lt;br /&gt;
performance characteristics, except that the blank-padding involved&lt;br /&gt;
in CHAR(n) requires additional storage and some extra runtime.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;char&amp;quot; type (the quotes are required to distinguish it from CHAR(n))&lt;br /&gt;
is a specialized datatype that can store exactly one byte.  It is found in&lt;br /&gt;
the system catalogs but its use in user tables is generally discouraged.&lt;br /&gt;
&lt;br /&gt;
=== How do I create a serial/auto-incrementing field? ===&lt;br /&gt;
  &lt;br /&gt;
PostgreSQL supports a SERIAL data type. Actually, this isn't quite&lt;br /&gt;
a real type.  It's a shorthand for creating an integer column that&lt;br /&gt;
is fed from a sequence.&lt;br /&gt;
&lt;br /&gt;
For example, this:&lt;br /&gt;
 CREATE TABLE person (&lt;br /&gt;
     id SERIAL,&lt;br /&gt;
     name TEXT&lt;br /&gt;
 );&lt;br /&gt;
is automatically translated into this:&lt;br /&gt;
 CREATE SEQUENCE person_id_seq;&lt;br /&gt;
 CREATE TABLE person (&lt;br /&gt;
     id INTEGER NOT NULL DEFAULT nextval('person_id_seq'),&lt;br /&gt;
     name TEXT&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
The automatically created sequence is named ''table''_''serialcolumn''_seq,&lt;br /&gt;
where ''table'' and ''serialcolumn'' are the names of the table and SERIAL&lt;br /&gt;
column, respectively. See the CREATE SEQUENCE manual page for more&lt;br /&gt;
information about sequences.&lt;br /&gt;
&lt;br /&gt;
There is also BIGSERIAL, which is like SERIAL except that the resulting&lt;br /&gt;
column is of type BIGINT instead of INTEGER.  Use this type if you think&lt;br /&gt;
that you might need more than 2 billion serial values over the lifespan&lt;br /&gt;
of the table.&lt;br /&gt;
&lt;br /&gt;
=== How do I get the value of a SERIAL insert? ===&lt;br /&gt;
  &lt;br /&gt;
The simplest way is to retrieve the assigned SERIAL value with&lt;br /&gt;
RETURNING. Using the example table in the previous question, it would look like this:&lt;br /&gt;
 INSERT INTO person (name) VALUES ('Blaise Pascal') RETURNING id;&lt;br /&gt;
&lt;br /&gt;
You can also call nextval() and use that value in the INSERT, or call&lt;br /&gt;
currval() after the INSERT.&lt;br /&gt;
&lt;br /&gt;
=== Doesn't currval() lead to a race condition with other users? ===&lt;br /&gt;
  &lt;br /&gt;
No. currval() returns the latest sequence value assigned by your session,&lt;br /&gt;
independently of what is happening in other sessions.&lt;br /&gt;
&lt;br /&gt;
=== Why are there gaps in the numbering of my sequence/SERIAL column? Why aren't my sequence numbers reused on transaction abort? ===&lt;br /&gt;
  &lt;br /&gt;
To improve concurrency, sequence values are given out to running&lt;br /&gt;
transactions on-demand; the sequence object is not kept locked but is&lt;br /&gt;
immediately available for another transaction to get another sequence&lt;br /&gt;
value. This causes gaps in numbering from aborted transactions.&lt;br /&gt;
&lt;br /&gt;
=== What is an OID? ===&lt;br /&gt;
  &lt;br /&gt;
If a table is created WITH OIDS, each row includes an OID column that is automatically filled in during INSERT.&lt;br /&gt;
OIDs are sequentially assigned 4-byte integers.  Initially they are unique&lt;br /&gt;
across the entire installation. However, the OID counter wraps around at 4 billion,&lt;br /&gt;
and after that OIDs may be duplicated.&lt;br /&gt;
&lt;br /&gt;
It is possible to prevent duplication of OIDs within a single table by&lt;br /&gt;
creating a unique index on the OID column (but note that the WITH OIDS&lt;br /&gt;
clause doesn't by itself create such an index).&lt;br /&gt;
The system checks the index to see if a newly&lt;br /&gt;
generated OID is already present, and if so generates a new OID and&lt;br /&gt;
repeats.  This works well so long as no OID-containing table has&lt;br /&gt;
more than a small fraction of 4 billion rows. &lt;br /&gt;
&lt;br /&gt;
PostgreSQL uses OIDs for object identifiers in the system catalogs,&lt;br /&gt;
where the size limit is unlikely to be a problem.&lt;br /&gt;
&lt;br /&gt;
To uniquely number rows in user tables, it is best to use SERIAL&lt;br /&gt;
rather than an OID column, or BIGSERIAL if the table is expected to&lt;br /&gt;
have more than 2 billion entries over its lifespan.&lt;br /&gt;
&lt;br /&gt;
=== What is a CTID? ===&lt;br /&gt;
&lt;br /&gt;
CTIDs identify specific physical rows by their block and&lt;br /&gt;
offset positions within a table.&lt;br /&gt;
They are used by index entries to point to physical rows.&lt;br /&gt;
A logical row's CTID changes when it is updated, so the CTID&lt;br /&gt;
cannot be used as a long-term row identifier.  But it is sometimes&lt;br /&gt;
useful to identify a row within a transaction when no competing&lt;br /&gt;
update is expected.&lt;br /&gt;
&lt;br /&gt;
=== Why do I get the error &amp;quot;ERROR: Memory exhausted in AllocSetAlloc()&amp;quot;? ===&lt;br /&gt;
  &lt;br /&gt;
You probably have run out of virtual memory on your system, or your&lt;br /&gt;
kernel has a low limit for certain resources. Try this before starting&lt;br /&gt;
the server:&lt;br /&gt;
 ulimit -d 262144&lt;br /&gt;
 limit datasize 256m&lt;br /&gt;
&lt;br /&gt;
Depending on your shell, only one of these may succeed, but it will&lt;br /&gt;
set your process data segment limit much higher and perhaps allow the&lt;br /&gt;
query to complete. This command applies to the current process, and&lt;br /&gt;
all subprocesses created after the command is run. If you are having a&lt;br /&gt;
problem with the SQL client because the backend is returning too much&lt;br /&gt;
data, try it before starting the client.&lt;br /&gt;
&lt;br /&gt;
=== How do I tell what PostgreSQL version I am running? ===&lt;br /&gt;
  &lt;br /&gt;
Run this query: SELECT version();&lt;br /&gt;
&lt;br /&gt;
=== Is there a way to leave an audit trail of database operations? ===&lt;br /&gt;
&lt;br /&gt;
There's nothing built-in, but it's not too difficult to build such&lt;br /&gt;
facilities yourself.&lt;br /&gt;
&lt;br /&gt;
Simple example right in the official docs:&lt;br /&gt;
http://www.postgresql.org/docs/8.3/static/plpgsql-trigger.html#PLPGSQL-TRIGGER-AUDIT-EXAMPLE&lt;br /&gt;
&lt;br /&gt;
Project targeting this feature:  http://pgfoundry.org/projects/tablelog/&lt;br /&gt;
&lt;br /&gt;
Background information and other sample implementations: &lt;br /&gt;
http://it.toolbox.com/blogs/database-soup/simple-data-auditing-19014&lt;br /&gt;
http://www.go4expert.com/forums/showthread.php?t=7252&lt;br /&gt;
http://www.alberton.info/postgresql_table_audit.html&lt;br /&gt;
&lt;br /&gt;
=== How do I create a column that will default to the current time? ===&lt;br /&gt;
  &lt;br /&gt;
Use CURRENT_TIMESTAMP:&lt;br /&gt;
 CREATE TABLE test (x int, modtime TIMESTAMP DEFAULT CURRENT_TIMESTAMP );&lt;br /&gt;
&lt;br /&gt;
=== How do I perform an outer join? ===&lt;br /&gt;
  &lt;br /&gt;
PostgreSQL supports outer joins using the SQL standard syntax. Here&lt;br /&gt;
are two examples:&lt;br /&gt;
 SELECT *&lt;br /&gt;
 FROM t1 LEFT OUTER JOIN t2 ON (t1.col = t2.col);&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
 SELECT *&lt;br /&gt;
 FROM t1 LEFT OUTER JOIN t2 USING (col);&lt;br /&gt;
&lt;br /&gt;
These identical queries join t1.col to t2.col, and also return any&lt;br /&gt;
unjoined rows in t1 (those with no match in t2). A RIGHT join would&lt;br /&gt;
add unjoined rows of t2. A FULL join would return the matched rows&lt;br /&gt;
plus all unjoined rows from t1 and t2. The word OUTER is optional and&lt;br /&gt;
is assumed in LEFT, RIGHT, and FULL joins. Ordinary joins are called&lt;br /&gt;
INNER joins.&lt;br /&gt;
&lt;br /&gt;
=== How do I perform queries using multiple databases? ===&lt;br /&gt;
  &lt;br /&gt;
There is no way to query a database other than the current one.&lt;br /&gt;
Because PostgreSQL loads database-specific system catalogs, it is&lt;br /&gt;
uncertain how a cross-database query should even behave.&lt;br /&gt;
&lt;br /&gt;
contrib/dblink allows cross-database queries using function calls. Of&lt;br /&gt;
course, a client can also make simultaneous connections to different&lt;br /&gt;
databases and merge the results on the client side.&lt;br /&gt;
&lt;br /&gt;
=== How do I return multiple rows or columns from a function? ===&lt;br /&gt;
  &lt;br /&gt;
It is easy using set-returning functions,&lt;br /&gt;
[[Return more than one row of data from PL/pgSQL functions]].&lt;br /&gt;
&lt;br /&gt;
=== Why do I get &amp;quot;relation with OID ##### does not exist&amp;quot; errors when accessing temporary tables in PL/PgSQL functions? ===&lt;br /&gt;
  &lt;br /&gt;
In PostgreSQL versions &amp;lt; 8.3, PL/PgSQL caches function scripts, and an&lt;br /&gt;
unfortunate side effect is that if a PL/PgSQL function accesses a&lt;br /&gt;
temporary table, and that table is later dropped and recreated, and&lt;br /&gt;
the function called again, the function will fail because the cached&lt;br /&gt;
function contents still point to the old temporary table. The solution&lt;br /&gt;
is to use EXECUTE for temporary table access in PL/PgSQL. This will&lt;br /&gt;
cause the query to be reparsed every time.&lt;br /&gt;
&lt;br /&gt;
This problem does not occur in PostgreSQL 8.3 and later.&lt;br /&gt;
&lt;br /&gt;
=== What replication solutions are available? ===&lt;br /&gt;
  &lt;br /&gt;
Though &amp;quot;replication&amp;quot; is a single term, there are several technologies&lt;br /&gt;
for doing replication, with advantages and disadvantages for each.&lt;br /&gt;
Our documentation contains a good introduction to this topic at&lt;br /&gt;
http://www.postgresql.org/docs/8.3/static/high-availability.html and a&lt;br /&gt;
grid listing replication software and features is at&lt;br /&gt;
[[Replication, Clustering, and Connection Pooling]]&lt;br /&gt;
&lt;br /&gt;
Master/slave replication allows a single master to receive read/write&lt;br /&gt;
queries, while slaves can only accept read/SELECT queries. The most&lt;br /&gt;
popular freely available master-slave PostgreSQL replication solution&lt;br /&gt;
is Slony-I.&lt;br /&gt;
&lt;br /&gt;
Multi-master replication allows read/write queries to be sent to&lt;br /&gt;
multiple replicated computers. This capability also has a severe&lt;br /&gt;
impact on performance due to the need to synchronize changes between&lt;br /&gt;
servers. PGCluster is the most popular such solution freely available&lt;br /&gt;
for PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
There are also proprietary and hardware-based replication solutions&lt;br /&gt;
available supporting a variety of replication models.&lt;br /&gt;
&lt;br /&gt;
=== Is possible to create a shared-storage postgresql server cluster? ===&lt;br /&gt;
&lt;br /&gt;
PostgreSQL does not support clustering using [[Shared_Storage|shared storage]] on a SAN, SCSI backplane,&lt;br /&gt;
iSCSI volume, or other shared media. Such &amp;quot;RAC-style&amp;quot; clustering isn't supported.&lt;br /&gt;
Only replication-based clustering is currently supported.&lt;br /&gt;
&lt;br /&gt;
See [[Replication, Clustering, and Connection Pooling]] information for details.&lt;br /&gt;
&lt;br /&gt;
[[Shared_Storage|Shared-storage]] 'failover' is possible, but it is not safe to have more than one&lt;br /&gt;
postmaster running and accessing the data store at the same time. Heartbeat and&lt;br /&gt;
[http://en.wikipedia.org/wiki/STONITH STONITH] or some other hard-disconnect option are recommended.&lt;br /&gt;
&lt;br /&gt;
=== Why are my table and column names not recognized in my query? Why is capitalization not preserved? ===&lt;br /&gt;
  &lt;br /&gt;
The most common cause of unrecognized names is the use of&lt;br /&gt;
double-quotes around table or column names during table creation. When&lt;br /&gt;
double-quotes are used, table and column names (called identifiers)&lt;br /&gt;
are stored case-sensitive, meaning you must use double-quotes when&lt;br /&gt;
referencing the names in a query. Some interfaces, like pgAdmin,&lt;br /&gt;
automatically double-quote identifiers during table creation. So, for&lt;br /&gt;
identifiers to be recognized, you must either:&lt;br /&gt;
&lt;br /&gt;
* Avoid double-quoting identifiers when creating tables&lt;br /&gt;
* Use only lowercase characters in identifiers&lt;br /&gt;
* Double-quote identifiers when referencing them in queries&lt;br /&gt;
&lt;br /&gt;
=== I lost the database password.  What can I do to recover it? ===&lt;br /&gt;
&lt;br /&gt;
You can't.  However, you can reset it to something else.  To do this, you&lt;br /&gt;
&lt;br /&gt;
* edit pg_hba.conf to allow ''trust'' authorization temporarily&lt;br /&gt;
* Reload the config file (pg_ctl reload)&lt;br /&gt;
* Connect and issue ALTER ROLE / PASSWORD to set the new password&lt;br /&gt;
* edit pg_hba.conf again and restore the previous settings&lt;br /&gt;
* Reload the config file again&lt;br /&gt;
&lt;br /&gt;
=== Does PostgreSQL have stored procedures? ===&lt;br /&gt;
&lt;br /&gt;
PostgreSQL doesn't. However PostgreSQL have very powerful functions and user-defined functions capabilities that can do most things that other RDBMS stored routines (procedures and functions) can do and in many cases more.&lt;br /&gt;
&lt;br /&gt;
These functions can be of different types and can be implemented in several programming languages.&lt;br /&gt;
(Refer to documentation for more details. [http://www.postgresql.org/docs/current/static/xfunc.html User-Defined Functions])&lt;br /&gt;
&lt;br /&gt;
PostgreSQL functions can be invoked in many ways. If you want to invoke a function as you would call a stored procedure in other RDBMS (typically a function with side-effects but whose result you don't care for example because it returns void), one option would be to use [http://www.postgresql.org/docs/current/static/plpgsql.html PL/pgSQL Language] for your procedure and the [http://www.postgresql.org/docs/current/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-SQL-NORESULT PERFORM] command. Example:&lt;br /&gt;
 PERFORM theNameOfTheFunction(arg1, arg2);&lt;br /&gt;
&lt;br /&gt;
Note that invoking instead:&lt;br /&gt;
 SELECT theNameOfTheFunction(arg1, arg2);&lt;br /&gt;
would produce a result even if the function returns void (this result would be one row containing a void value).&lt;br /&gt;
&lt;br /&gt;
[http://www.postgresql.org/docs/current/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-SQL-NORESULT PERFORM] could thus be used to discard this unuseful result.&lt;br /&gt;
&lt;br /&gt;
The main limitations on Pg's stored functions - as compared to true stored procedures - are:&lt;br /&gt;
&lt;br /&gt;
* inability to return multiple result sets&lt;br /&gt;
* no support for autonomous transactions (&amp;lt;code&amp;gt;BEGIN&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;COMMIT&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ROLLBACK&amp;lt;/code&amp;gt; within a function)&lt;br /&gt;
* no support for the SQL-standard &amp;lt;code&amp;gt;CALL&amp;lt;/code&amp;gt; syntax, though the ODBC and JDBC drivers will translate calls for you.&lt;br /&gt;
&lt;br /&gt;
=== Why don't BEGIN, ROLLBACK and COMMIT work in stored procedures/functions? ===&lt;br /&gt;
&lt;br /&gt;
PostgreSQL doesn't support autonomous transactions in its stored functions. Like all PostgreSQL queries, stored functions always run in a transaction and cannot operate outside a transaction.&lt;br /&gt;
&lt;br /&gt;
If you need a stored procedure to manage transactions, you can look into the dblink interface or do the work from a client-side script instead. In some cases you can do what you need to using [http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING exception blocks in PL/PgSQL], because each BEGIN/EXCEPTION/END block creates a subtransaction.&lt;br /&gt;
&lt;br /&gt;
=== Why is &amp;quot;SELECT count(*) FROM bigtable;&amp;quot; slow? ===&lt;br /&gt;
&lt;br /&gt;
It can't be answered directly from an index. PostgreSQL has to check the visibility for each record, so it&lt;br /&gt;
forces a sequential scan of the entire table.  If you want, you can keep track of the number of rows yourself with triggers, but beware that this will slow down write access to the table.&lt;br /&gt;
&lt;br /&gt;
You can get an estimation.  The reltuples column in [http://www.postgresql.org/docs/current/static/catalog-pg-class.html pg_class] contains the information from the latest [http://www.postgresql.org/docs/current/static/sql-analyze.html ANALYZE] of the table.  On a large table this is often accurate to within a few thousandths of a percent, which is accurate enough for many purposes.&lt;br /&gt;
 &lt;br /&gt;
An &amp;quot;exact&amp;quot; count is often not exact for very long, anyway; due to [http://www.postgresql.org/docs/current/static/mvcc-intro.html MVCC] concurrency, the count will be accurate as of the moment the SELECT count(*) query (or, for stricter [http://www.postgresql.org/docs/current/static/transaction-iso.html transaction isolation] levels, its transaction) ''started'', and may well be out-of-date by the time the query completes.  In a transaction mix where the table is being modified, two count(*) executions which return at the same moment might have different values, if a modifying transaction committed between their start times.&lt;br /&gt;
&lt;br /&gt;
For more information, see [[Slow Counting]].&lt;br /&gt;
&lt;br /&gt;
=== Why is my query much slower when run as a prepared query? ===&lt;br /&gt;
&lt;br /&gt;
When PostgreSQL has the full query with all parameters known by planning time, it can use statistics in the table to find out if the values used in the query are very common or very uncommon in a column. This lets it change the way it fetches the data to be more efficient, as it knows to expect lots or very few results from a certain part of the query. For example, it might choose an sequential scan instead of doing an index scan if you search for 'active=y' and it knows that 99% of the records in the table have 'active=y', because in this case a sequential scan will be much faster.&lt;br /&gt;
&lt;br /&gt;
In a prepared query, PostgreSQL doesn't have the value of all parameters when it's creating the plan. It has to try to pick a &amp;quot;safe&amp;quot; plan that should work fairly well no matter what value you supply as the parameter when you execute the prepared query. Unfortunately, this plan might not be very appropriate if the value you supply is vastly more common, or vastly less common, than is average for some randomly selected values in the table.&lt;br /&gt;
&lt;br /&gt;
If you suspect this issue is affecting you, start by using the [http://www.postgresql.org/docs/current/static/sql-explain.html EXPLAIN] command to compare the slow and fast queries. Look at the output of &amp;lt;code&amp;gt;EXPLAIN SELECT query...&amp;lt;/code&amp;gt; and compare it to the result of &amp;lt;code&amp;gt;PREPARE query... ; EXPLAIN EXECUTE query...&amp;lt;/code&amp;gt; to see if the plans are notably different. &amp;lt;code&amp;gt;EXPLAIN ANALYZE&amp;lt;/code&amp;gt; may give you more information, such as row count estimates and counts.&lt;br /&gt;
&lt;br /&gt;
Usually people having this problem are trying to use prepared queries as a security measure to prevent SQL injection, rather than as a performance tuning option for expensive-to-plan queries frequently executed with a variety of different parameters. Those people should consider using client-side prepared statements if their client interface (eg PgJDBC) supports it.&lt;br /&gt;
&lt;br /&gt;
At present, PostgreSQL does not offer a way to request re-planning of a prepared statement using a particular set of parameter values; doing so somewhat defeats the purpose of server-side prepared statements. Running a statistics check to see if a particular parameter value is notably outside the norm and automatically re-planning in that case has been discussed, but not agreed upon or implemented as yet.&lt;br /&gt;
&lt;br /&gt;
See [[Using_EXPLAIN]]. If you're going to ask for help on the mailing lists, please read the [[Guide to reporting problems]].&lt;br /&gt;
&lt;br /&gt;
=== Why is my query much slower when run in a function than standalone? ===&lt;br /&gt;
&lt;br /&gt;
See [[FAQ#Why is my query much slower when run as a prepared query?]]. Queries in PL/PgSQL functions are prepared and cached, so they execute in much the same way as if you'd &amp;lt;code&amp;gt;PREPARE&amp;lt;/code&amp;gt;d then &amp;lt;code&amp;gt;EXECUTE&amp;lt;/code&amp;gt;d the query yourself.&lt;br /&gt;
&lt;br /&gt;
If you're having really severe issues with this that improving the table statistics or adjusting your query don't help with, you can work around it by forcing PL/PgSQL to re-prepare your query at every execution. To do this, use the &amp;lt;code&amp;gt;EXECUTE ... USING&amp;lt;/code&amp;gt; statement in PL/PgSQL to supply your query as a textual string. Alternately, the [http://www.postgresql.org/docs/current/static/functions-string.html quote_literal or quote_nullable] functions may be used to escape parameters substituted into query text.&lt;br /&gt;
&lt;br /&gt;
=== Why do my strings sort incorrectly? ===&lt;br /&gt;
&lt;br /&gt;
First, make sure you are using the locale you want to be using.  Use &amp;lt;code&amp;gt;SHOW lc_collate&amp;lt;/code&amp;gt; to show the database-wide locale in effect.  If you are using per-column collations, check those.  If everything is how you want it, then read on.&lt;br /&gt;
&lt;br /&gt;
PostgreSQL uses the C library's locale facilities for sorting strings.  So if the sort order of the strings is not what you expect, the issue is likely in the C library.  You can verify the C library's idea of sorting using the &amp;lt;code&amp;gt;sort&amp;lt;/code&amp;gt; utility on a text file, e.g.,&lt;br /&gt;
&lt;br /&gt;
 LC_COLLATE=xx_YY.utf8 sort testfile.txt&lt;br /&gt;
&lt;br /&gt;
If this results in the same order that PostgreSQL gives you, then the problem is outside of PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
PostgreSQL deviates from the libc behavior in so far as it breaks ties by sorting strings in byte order.  This should rarely make a&lt;br /&gt;
difference in practice, and is usually not the source of the problem when users complain about the sort order, but it could affect cases where, for example, combining and precombined Unicode characters are mixed.&lt;br /&gt;
&lt;br /&gt;
If the problem is in the C library, you will have to take it up with your operating system maintainers.  Note, however, that while actual bugs in locale definitions of C libraries have been known to exist, it is more likely that the C library is correct, where &amp;quot;correct&amp;quot; means it follows some recognized international or national standard.  Possibly, you are expecting one of multiple equally valid interpretations of a language's sorting rules.&lt;br /&gt;
&lt;br /&gt;
Common complaint patterns include:&lt;br /&gt;
&lt;br /&gt;
* Spaces and special characters: The sorting algorithm normally works in multiple passes.  First, all the letters are compared, ignoring spaces and punctuation.  Then, spaces and punctuation are compared to break ties.  (This is a simplification of what actually happens.)  It's not possible to change this without changing the locale definitions themselves (and even then it's difficult).  You might want to restructure your data slightly to avoid this problem.  For example, if you are sorting a name field, you could split the field into first and last name fields, avoiding the space in between.&lt;br /&gt;
&lt;br /&gt;
* Upper/lower case: Locales other than the C locale generally sort upper and lower case letters together.  So the order will be something like a A b B c C ... instead of the A B C ... a b c ... that a sort based on ASCII byte values will give.  That is correct.&lt;br /&gt;
&lt;br /&gt;
* German locale: sort order of ä as a or ae.  Both of these are valid (see http://de.wikipedia.org/wiki/Alphabetische_Sortierung), but most C libraries only provide the first one.  Fixing this would require creating a custom locale.  This is possible, but will take some work.&lt;br /&gt;
&lt;br /&gt;
* It is not in ASCII/byte order.  No, it's not, it's not supposed to be.  ASCII is an encoding, not a sort order.  If you want this, you can use the C locale, but then you use the ability to non-ASCII characters.&lt;br /&gt;
&lt;br /&gt;
That said, if you are on Mac OS X or a BSD-family operating system, and you are using UTF-8, then give up.  The locale definitions on&lt;br /&gt;
those operating systems are broken.&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/Todo</id>
		<title>Todo</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/Todo"/>
				<updated>2012-03-22T18:57:59Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;Done: Add use of 'const' for variables in source tree&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;margin: 1ex 1em; float: right;&amp;quot;&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This list contains '''all known PostgreSQL bugs and feature requests'''. If you would like to work on an item, please read the [[Developer FAQ]] first. There is also a [[Development_information|development information page]].&lt;br /&gt;
&lt;br /&gt;
* {{TodoPending}} - marks ordinary, incomplete items&lt;br /&gt;
* {{TodoEasy}} - marks items that are easier to implement&lt;br /&gt;
* {{TodoDone}} - marks changes that are done, and will appear in the PostgreSQL 9.2 release.&lt;br /&gt;
&lt;br /&gt;
For help on editing this list, please see [[Talk:Todo]]. &amp;lt;b&amp;gt;Please do not add items here without discussion on the mailing list.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 1ex 4em;&amp;quot;&amp;gt;&lt;br /&gt;
== Administration ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow administrators to cancel multi-statement idle transactions&lt;br /&gt;
|This allows locks to be released, but it is complex to report the cancellation back to the client.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01340.php &amp;lt;nowiki&amp;gt;Cancelling idle in transaction state&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00441.php &amp;lt;nowiki&amp;gt;Re: Cancelling idle in transaction state&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Check for unreferenced table files created by transactions that were in-progress when the server terminated abruptly&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00096.php &amp;lt;nowiki&amp;gt;Removing unreferenced files&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Set proper permissions on non-system schemas during db creation&lt;br /&gt;
|Currently all schemas are owned by the super-user because they are copied from the template1 database.  However, since all objects are inherited from the template database, it is not clear that setting schemas to the db owner is correct.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow log_min_messages to be specified on a per-module basis&lt;br /&gt;
|This would allow administrators to see more detailed information from specific sections of the backend, e.g. checkpoints, autovacuum, etc. Another idea is to allow separate configuration files for each module, or allow arbitrary SET commands to be passed to them. See also [[Logging Brainstorm]].}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Simplify creation of partitioned tables&lt;br /&gt;
|This would allow creation of partitioned tables without requiring creation of triggers or rules for INSERT/UPDATE/DELETE, and constraints for rapid partition selection.  Options could include range and hash partition selection. See also [[Table partitioning]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow custom variables to appear in pg_settings()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00850.php &amp;lt;nowiki&amp;gt;Re: count(*) performance improvement ideas&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have custom variables be transaction-safe&lt;br /&gt;
* {{MessageLink|4B577E9F.8000505@dunslane.net|Custom GUCs still a bit broken}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement the SQL-standard mechanism whereby REVOKE ROLE revokes only the privilege granted by the invoking role, and not those granted by other roles&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-05/msg00010.php &amp;lt;nowiki&amp;gt;Re: Grantor name gets lost when grantor role dropped&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent query cancel packets from being replayed by an attacker, especially when using SSL&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg00345.php &amp;lt;nowiki&amp;gt;Replay attack of query cancel&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a way to query the log collector subprocess to determine the name of the currently active log file&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-11/msg00418.php &amp;lt;nowiki&amp;gt;Current log files when rotating?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow simpler reporting of the unix domain socket directory and allow easier configuration of its default location&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg01555.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-10/msg01482.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow custom daemons to be automatically stopped/started along with the postmaster&lt;br /&gt;
|This allows easier administration of daemons like user job schedulers or replication-related daemons.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01701.php &amp;lt;nowiki&amp;gt;Re: scheduler in core&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve logging of prepared transactions recovered during startup&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg00092.php &amp;lt;nowiki&amp;gt;&amp;amp;quot;recovering prepared transaction&amp;amp;quot; after server restart message&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using POSIX shared memory to avoid System V shared memory kernel limits&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4DFA2673.3010009@enterprisedb.com &amp;lt;nowiki&amp;gt;POSIX shared memory patch status&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Address problem where superusers are assumed to be members of all groups&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00337.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Configuration files ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Change pg_ident.conf parsing to be the same as pg_hba.conf&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg02204.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow postgresql.conf file values to be changed via an SQL API, perhaps using SET GLOBAL&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg00764.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider normalizing fractions in postgresql.conf, perhaps using '%'&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00550.php &amp;lt;nowiki&amp;gt;Fractions in GUC variables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow Kerberos to disable stripping of realms so we can check the username@realm against multiple realms&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00009.php &amp;lt;nowiki&amp;gt;krb_match_realm patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve LDAP authentication configuration options&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01745.php &amp;lt;nowiki&amp;gt;Proposed Patch - LDAPS support for servers on port 636 w/o TLS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add external tool to auto-tune some postgresql.conf parameters&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00000.php &amp;lt;nowiki&amp;gt;Re: Overhauling GUCS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00033.php &amp;lt;nowiki&amp;gt;Simple postgresql.conf wizard&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add 'hostgss' pg_hba.conf option to allow GSS link-level encryption&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg01454.php &amp;lt;nowiki&amp;gt;Re: Plans for 8.4&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Process pg_hba.conf keywords as case-insensitive&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00432.php &amp;lt;nowiki&amp;gt;More robust pg_hba.conf parsing/error logging&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create utility to compute accurate random_page_cost value&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-04/msg00162.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-04/msg00362.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow configuration files to be independently validated&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01831.php&lt;br /&gt;
* http://archives.postgresql.org/message-id/12666.1310774573@sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow postgresql.conf settings to be accepted by backends even if some settings are invalid for those backends&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00330.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00375.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow all backends to receive postgresql.conf setting changes at the same time&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00330.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00375.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Tablespaces ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow a database in tablespace t1 with tables created in tablespace t2 to be used as a template for a new database created with default tablespace t2&lt;br /&gt;
|Currently all objects in the default database tablespace must have default tablespace specifications. This is because new databases are created by copying directories. If you mix default tablespace tables and tablespace-specified tables in the same directory, creating a new database from such a mixed directory would create a new database with tables that had incorrect explicit tablespaces.  To fix this would require modifying pg_class in the newly copied database, which we don't currently do.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow reporting of which objects are in which tablespaces&lt;br /&gt;
|This item is difficult because a tablespace can contain objects from multiple databases. There is a server-side function that returns the databases which use a specific tablespace, so this requires a tool that will call that function and connect to each database to find the objects in each database for that tablespace.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow WAL replay of CREATE TABLESPACE to work when the directory structure on the recovery computer is different from the original}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow per-tablespace quotas}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow tablespaces on RAM-based partitions for unlogged tables&lt;br /&gt;
* http://archives.postgresql.org/pgsql-advocacy/2011-05/msg00033.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow toast tables to be moved to a different tablespace&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00980.php&lt;br /&gt;
* {{messageLink|CAFEQCbH756DyyAPQ1ykh3+b+kE1-EhWRww1WO_x5v38C-uLnUg@mail.gmail.com|patch : Allow toast tables to be moved to a different tablespace}} (issues remain)&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CAFEQCbEq07OopgE5xFYv2Q3eMq45hRSJkjCBO+kvpJq9NEVhow@mail.gmail.com Allow toast tables to be moved to a different tablespace]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Collector ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow statistics last vacuum/analyze execution times to be displayed without requiring track_counts to be enabled&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2007-04/msg00028.php &amp;lt;nowiki&amp;gt;row-level stats and last analyze time&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Clear table counters on TRUNCATE&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg00169.php &amp;lt;nowiki&amp;gt;Small TRUNCATE glitch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== SSL ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SSL authentication/encryption over unix domain sockets&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00924.php &amp;lt;nowiki&amp;gt;Re: Spoofing as the postmaster&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SSL key file permission checks to be optionally disabled when sharing SSL keys with other applications&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00069.php &amp;lt;nowiki&amp;gt;BUG #3809: SSL &amp;amp;quot;unsafe&amp;amp;quot; private key permissions bug&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SSL CRL files to be re-read during configuration file reload, rather than requiring a server restart&lt;br /&gt;
|Unlike SSL CRT files, CRL (Certificate Revocation List) files are updated frequently&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-12/msg00832.php &amp;lt;nowiki&amp;gt;Automatic CRL reload&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
Alternatively or additionally supporting OCSP (online certificate security protocol) would provide real-time revocation discovery without reloading&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Allow automatic selection of SSL client certificates from a certificate store&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00406.php &amp;lt;nowiki&amp;gt;Allow multiple certificates or keys in the postgresql.crt/.key files&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Send the full certificate server chain to the client&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-12/msg00145.php BUG #5245: Full Server Certificate Chain Not Sent to client]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Point-In-Time Recovery (PITR) ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Create dump tool for write-ahead logs for use in determining transaction id for point-in-time recovery&lt;br /&gt;
|This is useful for checking PITR recovery.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow archive_mode to be changed without server restart?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01655.php &amp;lt;nowiki&amp;gt;Enabling archive_mode without restart&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider avoiding WAL switching via archive_timeout if there has been no database activity&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg01469.php &amp;lt;nowiki&amp;gt;archive_timeout behavior for no activity&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg00395.php &amp;lt;nowiki&amp;gt;Re: archive_timeout behavior for no activity&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Standby server mode ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Allow pg_xlogfile_name() to be used in recovery mode&lt;br /&gt;
* [http://archives.postgresql.org/message-id/3f0b79eb1001190135vd9f62f1sa7868abc1ea61d12@mail.gmail.com &amp;lt;nowiki&amp;gt;Streaming replication and pg_xlogfile_name()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Prevent variables inherited from the server environment from begin used for making streaming replication connections.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01011.php &amp;lt;nowiki&amp;gt;Re: Parameter name standby_mode&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
| Allow hot file system backups on standby servers&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01727.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01490.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Change walsender so that it applies per-role settings&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg00642.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
| Add more control over waiting for synchronous commit&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01611.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Restructure configuration parameters for standby mode&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg01820.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Allow time-delayed application of logs on the standby&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00992.php&lt;br /&gt;
}}&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Add -X parameter to pg_basebackup to specify a different directory for px_xlog, like initdb&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Data Types ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix data types where equality comparison is not intuitive, e.g. box&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-10/msg01643.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for public SYNONYMs&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00519.php &amp;lt;nowiki&amp;gt;Proposal for SYNONYMS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg02043.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-general/2010-12/msg00139.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for SQL-standard GENERATED/IDENTITY columns&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-07/msg00543.php &amp;lt;nowiki&amp;gt;Re: Three weeks left until feature freeze&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-08/msg00038.php &amp;lt;nowiki&amp;gt;GENERATED ... AS IDENTITY, Was: Re: Feature Freeze&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00344.php &amp;lt;nowiki&amp;gt;Behavior of GENERATED columns per SQL2003&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00076.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Behavior of GENERATED columns per SQL2003&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00604.php &amp;lt;nowiki&amp;gt;IDENTITY/GENERATED patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider placing all sequences in a single table, or create a system view&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php &amp;lt;nowiki&amp;gt;Re: newbie: renaming sequences task&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2012-02/msg00258.php Removing special case OID generation]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a special data type for regular expressions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg01067.php &amp;lt;nowiki&amp;gt;Why is there a tsquery data type?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce BIT data type overhead using short varlena headers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-12/msg00273.php &amp;lt;nowiki&amp;gt;storage size of &amp;amp;quot;bit&amp;amp;quot; data type..&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow renaming and deleting enumerated values from an existing enumerated data type&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support scoped IPv6 addresses in the inet type&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-05/msg00111.php &amp;lt;nowiki&amp;gt;strange problem with ip6&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Add a JSON (JavaScript Object Notation) data type&lt;br /&gt;
|This would behave similar to the XML data type, which is stored as text, but allows element lookup and conversion functions.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01494.php &amp;lt;nowiki&amp;gt;PATCH: Add hstore_to_json()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg00001.php &amp;lt;nowiki&amp;gt;Re: PATCH: Add hstore_to_json()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-03/msg01092.php &amp;lt;nowiki&amp;gt;Proposal: Add JSON support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00057.php &amp;lt;nowiki&amp;gt;Re: Proposal: Add JSON support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00481.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01694.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-12/msg00219.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Considering improving performance of computing CHAR() value lengths&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00900.php &amp;lt;nowiki&amp;gt;char() overhead on read-only workloads not so insignifcant as the docs claim it is...&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01787.php &amp;lt;nowiki&amp;gt;Re: [PATCH] backend: compare word-at-a-time in bcTruelen&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add overlaps geometric operators that ignore point overlaps&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-03/msg00861.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Add IMMUTABLE column attribute&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-11/msg00623.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Domains ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow functions defined as casts to domains to be called during casting&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-05/msg00072.php &amp;lt;nowiki&amp;gt;bug? non working casts for domain&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-09/msg01681.php &amp;lt;nowiki&amp;gt;TODO: Fix CREATE CAST on DOMAINs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow values to be cast to domain types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2003-06/msg01206.php &amp;lt;nowiki&amp;gt;Domain casting still doesn't work right&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00289.php &amp;lt;nowiki&amp;gt;domain casting?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00812.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make domains work better with polymorphic functions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4887.1228700773@sss.pgh.pa.us Polymorphic types vs. domains]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/15535.1238774571@sss.pgh.pa.us some difficulties with fixing it]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Dates and Times ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow infinite intervals just like infinite timestamps&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-11/msg00076.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Determine how to represent date/time field extraction on infinite timestamps&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CA+mi_8bda-Fnev9iXeUbnqhVaCWzbYhHkWoxPQfBca9eDPpRMw@mail.gmail.com extract(epoch from infinity) is not 0]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CADAkt-icuESH16uLOCXbR-dKpcvwtUJE4JWXnkdAjAAwP6j12g@mail.gmail.com converting between infinity timestamp and float8]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow TIMESTAMP WITH TIME ZONE to store the original timezone information, either zone name or offset from UTC&lt;br /&gt;
|If the TIMESTAMP value is stored with a time zone name, interval computations should adjust based on the time zone rules. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-10/msg00705.php &amp;lt;nowiki&amp;gt;timestamp with time zone a la sql99&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have timestamp subtraction not call justify_hours()?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-sql/2006-10/msg00059.php &amp;lt;nowiki&amp;gt;timestamp subtraction (was Re: formatting intervals with to_char)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve TIMESTAMP WITH TIME ZONE subtraction to be DST-aware&lt;br /&gt;
|Currently subtracting one date from another that crosses a daylight savings time adjustment can return '1 day 1 hour', but adding that back to the first date returns a time one hour in the future.  This is caused by the adjustment of '25 hours' to '1 day 1 hour', and '1 day' is the same time the next day, even if daylight savings adjustments are involved.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix interval display to support values exceeding 2^31 hours}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add overflow checking to timestamp and interval arithmetic}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add function to allow the creation of timestamps using parameters&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-06/msg00232.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Arrays ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for arrays of domains&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00114.php &amp;lt;nowiki&amp;gt;Re: updated WIP: arrays of composites&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow single-byte header storage for array elements}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add function to detect if an array is empty&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00475.php &amp;lt;nowiki&amp;gt;Re: array_length()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of empty arrays&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01033.php &amp;lt;nowiki&amp;gt;So what's an &amp;amp;quot;empty&amp;amp;quot; array anyway?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of NULLs in arrays&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-11/msg00009.php &amp;lt;nowiki&amp;gt;BUG #4509: array_cat's null behaviour is inconsistent&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg01040.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Binary Data ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve vacuum of large objects, like contrib/vacuumlo?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Auto-delete large objects when referencing row is deleted&lt;br /&gt;
|contrib/lo offers this functionality.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow read/write into TOAST values like large objects&lt;br /&gt;
|Writing might require the TOAST column to be stored EXTERNAL.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00049.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add API for 64-bit large object access&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-09/msg00781.php &amp;lt;nowiki&amp;gt;64-bit API for large objects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg01790.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== MONEY Data Type ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add locale-aware MONEY type, and support multiple currencies&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2005-08/msg01432.php &amp;lt;nowiki&amp;gt;A real currency type&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01181.php &amp;lt;nowiki&amp;gt;Money type todos?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|MONEY dumps in a locale-specific format making it difficult to restore to a system with a different locale}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Text Search ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow dictionaries to change the token that is passed on to later dictionaries&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-11/msg00081.php &amp;lt;nowiki&amp;gt;a tsearch2 (8.2.4) dictionary that only filters out stopwords&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a function-based API for '@@' searches&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00511.php &amp;lt;nowiki&amp;gt;Simplifying Text Search&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve text search error messages&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00966.php &amp;lt;nowiki&amp;gt;Poorly designed tsearch NOTICEs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg01146.php &amp;lt;nowiki&amp;gt;Re: Poorly designed tsearch NOTICEs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider changing error to warning for strings larger than one megabyte&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-02/msg00190.php &amp;lt;nowiki&amp;gt;BUG #3975: tsearch2 index should not bomb out of 1Mb limit&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-03/msg00062.php &amp;lt;nowiki&amp;gt;Re: [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|tsearch and tsdicts regression tests fail in Turkish locale on glibc&lt;br /&gt;
* [http://archives.postgresql.org/message-id/49749645.5070801@gmx.net tsearch with Turkish locale]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|tsquery negator operator treated as part of lexeme&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-06/msg00346.php BUG #4887: inclusion operator (@&amp;gt;) on tsqeries behaves not conforming to documentation]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of dash and plus signs in email address user names, and perhaps improve URL parsing&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg00772.php&lt;br /&gt;
* [http://archives.postgresql.org/message-id/E1Ri8il-0008Ct-9p@wrigleys.postgresql.org tsearch does not recognize all valid emails]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve default parser, to more easily allow adding new tokens&lt;br /&gt;
* http://archives.postgresql.org/message-id/23485.1297727826@sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add additional support functions&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00319.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== XML ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow XML arrays to be cast to other data types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00981.php &amp;lt;nowiki&amp;gt;proposal casting from XML[] to int[], numeric[], text[]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00231.php &amp;lt;nowiki&amp;gt;Re: proposal casting from XML[] to int[], numeric[], text[]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00471.php &amp;lt;nowiki&amp;gt;Re: proposal casting from XML[] to int[], numeric[], text[]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add XML Schema validation and xmlvalidate functions (SQL:2008)}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add xmlvalidatedtd variant to support validating against a DTD?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Relax-NG validation; libxml2 supports this already}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow reliable XML operation non-UTF8 server encodings (xpath(), in particular, is known to not work)&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-01/msg00135.php &amp;lt;nowiki&amp;gt;BUG #4622: xpath only work in utf-8 server encoding&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
* http://archives.postgresql.org/message-id/4110.1238973350@sss.pgh.pa.us}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add functions from SQL:2006: XMLDOCUMENT, XMLCAST, XMLTEXT}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add XMLNAMESPACES support in XMLELEMENT and elsewhere}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move XSLT from contrib/xml2 to a more reasonable location&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg00539.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Report errors returned by the XSLT library&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg00562.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve the XSLT parameter passing API&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg00416.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|XML Canonical: Convert XML documents to canonical form to compare them. libxml2 has support for this.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add pretty-printed XML output option&lt;br /&gt;
|Parse a document and serialize it back in some indented form. libxml2 might support this.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add XMLQUERY (from the SQL/XML standard)}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow XML sthredding&lt;br /&gt;
|In some cases shredding could be better option (if there is no need to keep XML docs entirely, e.g. if we have already developed tools that understand only relational data.  This would be a separate module that implements annotated schema decomposition technique, similar to DB2 and SQL Server functionality.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix Nested or repeated xpath() that apparently mess up namespaces [http://archives.postgresql.org/pgsql-bugs/2008-03/msg00097.php] [http://archives.postgresql.org/pgsql-bugs/2008-03/msg00144.php] [http://archives.postgresql.org/pgsql-general/2008-03/msg00295.php] [http://archives.postgresql.org/pgsql-bugs/2008-07/msg00054.php] [http://archives.postgresql.org/message-id/004f01c90e91$138e9d10$3aabd730$@anstett@iaas.uni-stuttgart.de]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|XPath: Adding the &amp;lt;x&amp;gt; at the root causes problems [http://archives.postgresql.org/pgsql-bugs/2008-05/msg00184.php] [http://archives.postgresql.org/pgsql-bugs/2008-07/msg00054.php] [http://archives.postgresql.org/pgsql-general/2008-07/msg00613.php]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|xpath_table needs to be implemented/implementable to get rid of contrib/xml2 [http://archives.postgresql.org/pgsql-general/2008-05/msg00823.php]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|xpath_table is pretty broken anyway [http://archives.postgresql.org/pgsql-hackers/2010-02/msg02424.php]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|better handling of XPath data types [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00616.php] [http://archives.postgresql.org/message-id/004a01c90e90$4b986d90$e2c948b0$@anstett@iaas.uni-stuttgart.de]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of PIs and DTDs in xmlconcat() [http://archives.postgresql.org/message-id/200904211211.n3LCB09p008988@wwwmaster.postgresql.org]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Restructure XML and /contrib/xml2 functionality&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02314.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00017.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow INET subnet comparisons using non-constants to be indexed}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add an INET overlaps operator, for use by exclusion constraints &lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-03/msg00845.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Enforce typmod for function inputs, function results and parameters for spi_prepare'd statements called from PLs&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg01403.php &amp;lt;nowiki&amp;gt;Re: BUG #2917: spi_prepare doesn't accept typename aliases&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg01160.php &amp;lt;nowiki&amp;gt;RFC for adding typmods to functions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix IS OF so it matches the ISO specification, and add documentation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2003-08/msg00060.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] IS OF&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00060.php &amp;lt;nowiki&amp;gt;ToDo: add documentation for operator IS OF&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement Boyer-Moore searching in LIKE queries&lt;br /&gt;
* {{messageLink|27645.1220635769@sss.pgh.pa.us|TODO item: Implement Boyer-Moore searching (First time hacker)}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent malicious functions from being executed with the permissions of unsuspecting users&lt;br /&gt;
|Index functions are safe, so VACUUM and ANALYZE are safe too.  Triggers, CHECK and DEFAULT expressions, and rules are still vulnerable. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00268.php &amp;lt;nowiki&amp;gt;Some notes about the index-functions security vulnerability&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce memory usage of aggregates in set returning functions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2008-01/msg00031.php &amp;lt;nowiki&amp;gt;Re: Performance of aggregates over set-returning functions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix /contrib/ltree operator&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-11/msg00044.php &amp;lt;nowiki&amp;gt;BUG #3720: wrong results at using ltree&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix /contrib/btree_gist's implementation of inet indexing&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2010-10/msg00099.php &amp;lt;nowiki&amp;gt;BUG #5705: btree_gist: Index on inet changes query result&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Fix inconsistent precedence of =, &amp;amp;gt;, and &amp;amp;lt; compared to &amp;amp;lt;&amp;amp;gt;, &amp;amp;gt;=, and &amp;amp;lt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00145.php &amp;lt;nowiki&amp;gt;BUG #3822: Nonstandard precedence for comparison operators&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix regular expression bug when using complex back-references&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00000.php &amp;lt;nowiki&amp;gt;BUG #3645: regular expression back references seem broken&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have /contrib/dblink reuse unnamed connections&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00895.php &amp;lt;nowiki&amp;gt;dblink un-named connection doesn't get re-used&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve formatting of pg_get_viewdef() output&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg01648.php &amp;lt;nowiki&amp;gt;pg_get_viewdef formattiing&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01885.php &amp;lt;nowiki&amp;gt;Re: pretty print viewdefs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-12/msg00906.php reprise: pretty print viewdefs]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add function to dump pg_depend information cleanly&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00226.php &amp;lt;nowiki&amp;gt;Elementary dependency look-up&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Improve relation size functions such as pg_relation_size() to avoid producing an error when called against a no longer visible relation&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28488.1286461610@sss.pgh.pa.us pg_relation_size / could not open relation with OID #]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Character Formatting ===&lt;br /&gt;
&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow to_date() and to_timestamp() to accept localized month names}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add missing parameter handling in to_char()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-12/msg00948.php &amp;lt;nowiki&amp;gt;Re: to_char and i18n&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Throw an error from to_char() instead of printing a string of &amp;quot;#&amp;quot; when a number doesn't fit in the desired output format.&lt;br /&gt;
* discussed in [http://archives.postgresql.org/message-id/37ed240d0907290836w42187222n18664dfcbcb445b1@mail.gmail.com &amp;quot;to_char, support for EEEE format&amp;quot;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow to_char() on interval values to accumulate the highest unit requested&lt;br /&gt;
|2= Some special format flag would be required to request such accumulation.  Such functionality could also be added to EXTRACT. Prevent accumulation that crosses the month/day boundary because of the uneven number of days in a month.&lt;br /&gt;
* to_char(INTERVAL '1 hour 5 minutes', 'MI') =&amp;amp;gt; 65&lt;br /&gt;
* to_char(INTERVAL '43 hours 20 minutes', 'MI' ) =&amp;amp;gt; 2600&lt;br /&gt;
* to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') =&amp;amp;gt; 0:1:19:20&lt;br /&gt;
* to_char(INTERVAL '3 years 5 months','MM') =&amp;amp;gt; 41&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix to_number() handling for values not matching the format string&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg01447.php &amp;lt;nowiki&amp;gt;Re: numeric_to_number() function skipping some digits&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Multi-Language Support ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add NCHAR (as distinguished from ordinary varchar),}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a cares-about-collation column to pg_proc, so that unresolved-collation errors can be thrown at parse time&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-03/msg01520.php &amp;lt;nowiki&amp;gt;Open issues for collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Integrate collations with text search configurations&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28887.1303579034@sss.pgh.pa.us &amp;lt;nowiki&amp;gt;Some TODO items for collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Integrate collations with to_char() and related functions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28887.1303579034@sss.pgh.pa.us &amp;lt;nowiki&amp;gt;Some TODO items for collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support collation-sensitive equality and hashing functions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-06/msg00472.php &amp;lt;nowiki&amp;gt; contrib/citext versus collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a LOCALE option to CREATE DATABASE, as a shorthand&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00119.php &amp;lt;nowiki&amp;gt; Re: 8.4 open items list&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support multiple simultaneous character sets, per SQL:2008}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve UTF8 combined character handling?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add octet_length_server() and octet_length_client()}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make octet_length_client() the same as octet_length()?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problems with wrong runtime encoding conversion for NLS message files}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add URL to more complete multi-byte regression tests&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-07/msg00272.php &amp;lt;nowiki&amp;gt;Multi-byte and client side character encoding tests for copy command..&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix contrib/fuzzystrmatch to work with multibyte encodings&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-04/msg00047.php &amp;lt;nowiki&amp;gt; soundex function returns UTF-16 characters&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00138.php &amp;lt;nowiki&amp;gt; dmetaphone woes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change memory allocation for multi-byte functions so memory is allocated inside conversion functions&lt;br /&gt;
|Currently we preallocate memory based on worst-case usage.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ability to use case-insensitive regular expressions on multi-byte characters&lt;br /&gt;
|Currently it works for UTF-8, but not other multi-byte encodings&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00433.php &amp;lt;nowiki&amp;gt;Regexps vs. locale&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* {{MessageLink|20091201210024.B1393753FB7@cvs.postgresql.org|A partial solution for UTF-8}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve encoding of connection startup messages sent to the client&lt;br /&gt;
|Currently some authentication error messages are sent in the server encoding&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-12/msg00801.php &amp;lt;nowiki&amp;gt;encoding of PostgreSQL messages&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2009-01/msg00005.php &amp;lt;nowiki&amp;gt;Re: encoding of PostgreSQL messages&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|More sensible support for Unicode combining characters, normal forms&lt;br /&gt;
* http://archives.postgresql.org/message-id/200904141532.44618.peter_e@gmx.net&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Views / Rules ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Automatically create rules on views so they are updateable, per SQL:2008&lt;br /&gt;
|We can only auto-create rules for simple views.  For more complex cases users will still have to write rules manually.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00586.php &amp;lt;nowiki&amp;gt;Proposal for updatable views&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-08/msg00255.php &amp;lt;nowiki&amp;gt;Updatable views&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg01746.php &amp;lt;nowiki&amp;gt;Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Updatable_views&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add the functionality of the WITH CHECK OPTION clause to CREATE VIEW}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow VIEW/RULE recompilation when the underlying tables change&lt;br /&gt;
|This is both difficult and controversial.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01723.php Re: About &amp;quot;Allow VIEW/RULE recompilation when the underlying tables change&amp;quot;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01724.php Re: About &amp;quot;Allow VIEW/RULE recompilation when the underlying tables change&amp;quot;]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CACk=U9NFSzWrEba8G5dZ=TZLy3_hx3QXGyCcKVWT=4iA1FjMuA@mail.gmail.com VIEW still referring to old name of field]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make it possible to use RETURNING together with conditional DO INSTEAD rules, such as for partitioning setups&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00577.php &amp;lt;nowiki&amp;gt;RETURNING and DO INSTEAD ... Intentional or not?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add the ability to automatically create materialized views&lt;br /&gt;
|Right now materialized views require the user to create triggers on the main table to keep the summary table current.  SQL syntax should be able to manage the triggers and summary table automatically.  A more sophisticated implementation would automatically retrieve from the summary table when the main table is referenced, if possible.  See [[Materialized Views]] for implementation details&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00479.php &amp;lt;nowiki&amp;gt;GSoC - proposal - Materialized Views in PostgreSQL&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve ability to modify views via ALTER TABLE&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00691.php &amp;lt;nowiki&amp;gt;Re: idea: storing view source in system catalogs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg01410.php &amp;lt;nowiki&amp;gt;modifying views&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg00300.php &amp;lt;nowiki&amp;gt;Re: patch: Add columns via CREATE OR REPLACE VIEW&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Prevent low-cost functions from seeing unauthorized view rows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg01346.php &amp;lt;nowiki&amp;gt;Using views for row-level access control is leaky&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== SQL Commands ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT&lt;br /&gt;
* [http://dissipatedheat.com/2011/11/10/how-not-to-write-a-patch-for-postgresql/ How not to write this patch.]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve type determination of unknown (NULL or quoted literal) result columns for UNION/INTERSECT/EXCEPT&lt;br /&gt;
* [http://archives.postgresql.org/message-id/9799.1302719551@sss.pgh.pa.us &amp;lt;nowiki&amp;gt;UNION construct type cast gives poor error message&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00838.php &amp;lt;nowiki&amp;gt;WIP: grouping sets support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00466.php &amp;lt;nowiki&amp;gt;Implementation of GROUPING SETS (T431: Extended grouping 	capabilities)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow prepared transactions with temporary tables created and dropped in the same transaction, and when an ON COMMIT DELETE ROWS temporary table is accessed&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00047.php &amp;lt;nowiki&amp;gt;Re: &amp;amp;quot;could not open relation 1663/16384/16584: No such file or directory&amp;amp;quot; in a specific combination of transactions with temp tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/492543D5.9050904@enterprisedb.com A suggestion on how to implement this]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a GUC variable to warn about non-standard SQL usage in queries}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add SQL-standard MERGE/REPLACE/UPSERT command&lt;br /&gt;
|MERGE is typically used to merge two tables.  REPLACE or UPSERT command does UPDATE, or on failure, INSERT. See [[SQL MERGE]] for notes on the implementation details.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add NOVICE output level for helpful messages&lt;br /&gt;
|For example, have it warn about unjoined tables.  This could also control automatic sequence/index creation messages.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow NOTIFY in rules involving conditionals}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow EXPLAIN to identify tables that were skipped because of constraint_exclusion&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Simplify dropping roles that have objects in several databases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow the count returned by SELECT, etc to be represented as an int64 to allow a higher range of values}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for WITH RECURSIVE ... CYCLE&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00291.php &amp;lt;nowiki&amp;gt;WITH RECURSIVE ... CYCLE in vanilla SQL: issues with arrays of rows&amp;lt;/nowiki&amp;gt;]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add DEFAULT .. AS OWNER so permission checks are done as the table owner&lt;br /&gt;
|This would be useful for SERIAL nextval() calls and CHECK constraints.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow DISTINCT to work in multiple-argument aggregate calls}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add comments on system tables/columns using the information in catalogs.sgml&lt;br /&gt;
|Ideally the information would be pulled from the SGML file automatically.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent the specification of conflicting transaction read/write options&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00684.php &amp;lt;nowiki&amp;gt;Re: SET TRANSACTION and SQL Standard&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support LATERAL subqueries&lt;br /&gt;
|Lateral subqueries can reference columns of tables defined outside the subquery at the same level, i.e. ''laterally''.&lt;br /&gt;
For example, a LATERAL subquery in a FROM clause could reference tables defined in the same FROM clause.&lt;br /&gt;
Currently only the columns of tables defined ''above'' subqueries are recognized.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00292.php &amp;lt;nowiki&amp;gt;LATERAL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg00991.php &amp;lt;nowiki&amp;gt;Re: LATERAL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4F5AA202.9020906@gmail.com lateral function as a subquery - WIP patch]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent temporary tables created with ON COMMIT DELETE ROWS from repeatedly truncating the table on every commit if the table is already empty&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00842.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-03/msg00392.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-04/msg00046.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow DELETE and UPDATE to be used with LIMIT and ORDER BY&lt;br /&gt;
* http://archives.postgresql.org/pgadmin-hackers/2010-04/msg00078.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg01997.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00021.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Improve caching of prepared query plans&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow PREPARE of cursors}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have DISCARD PLANS discard plans cached by functions&lt;br /&gt;
|DISCARD all should do the same.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00431.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid multiple-evaluation of BETWEEN and IN arguments containing volatile expressions&lt;br /&gt;
* http://archives.postgresql.org/message-id/4D95B605.2020709@enterprisedb.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix nested CASE-WHEN constructs&lt;br /&gt;
* http://archives.postgresql.org/message-id/4DDCEEB8.50602@enterprisedb.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== CREATE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow CREATE TABLE AS to determine column lengths for complex expressions like SELECT col1 || col2}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have WITH CONSTRAINTS also create constraint indexes&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-04/msg00149.php &amp;lt;nowiki&amp;gt;Re: CREATE TABLE LIKE INCLUDING INDEXES support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move NOT NULL constraint information to pg_constraint&lt;br /&gt;
|Currently NOT NULL constraints are stored in pg_attribute without any designation of their origins, e.g. primary keys.  One manifest problem is that dropping a PRIMARY KEY constraint does not remove the NOT NULL constraint designation.  Another issue is that we should probably force NOT NULL to be propagated from parent tables to children, just as CHECK constraints are.  (But then does dropping PRIMARY KEY affect children?)&lt;br /&gt;
* http://archives.postgresql.org/message-id/19768.1238680878@sss.pgh.pa.us&lt;br /&gt;
* http://archives.postgresql.org/message-id/200909181005.n8IA5Ris061239@wwwmaster.postgresql.org&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-07/msg01223.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent concurrent CREATE TABLE from sometimes returning a cryptic error message&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00169.php &amp;lt;nowiki&amp;gt;BUG #3692: Conflicting create table statements throw unexpected error&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add CREATE SCHEMA ... LIKE that copies a schema}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix CREATE OR REPLACE FUNCTION to not leave objects depending on the function in inconsistent state&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-08/msg00985.php indexes on functions and create or replace function]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow temporary tables to exist as empty by default in all sessions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00006.php &amp;lt;nowiki&amp;gt;what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg01329.php &amp;lt;nowiki&amp;gt;idea: global temp tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org//pgsql-hackers/2009-05/msg00016.php &amp;lt;nowiki&amp;gt;Re: idea: global temp tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg01098.php &amp;lt;nowiki&amp;gt;global temporary tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow the creation of &amp;quot;distinct&amp;quot; types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01647.php &amp;lt;nowiki&amp;gt;Distinct types&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider analyzing temporary tables when they are first used in a query&lt;br /&gt;
|Autovacuum cannot analyze or vacuum temporary tables.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00416.php &amp;lt;nowiki&amp;gt;autovacuum and temp tables support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow an unlogged table to be changed to logged&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00315.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00437.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00323.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00237.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== UPDATE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Allow UPDATE tab SET ROW (col, ...) = (SELECT...)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-07/msg01308.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] extension for sql update&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00865.php &amp;lt;nowiki&amp;gt;UPDATE using sub selects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-04/msg00315.php &amp;lt;nowiki&amp;gt;UPDATE using sub selects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-03/msg00237.php &amp;lt;nowiki&amp;gt;Re: UPDATE using sub selects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Research self-referential UPDATEs that see inconsistent row versions in read-committed mode&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00507.php &amp;lt;nowiki&amp;gt;Concurrently updating an updatable view&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00016.php &amp;lt;nowiki&amp;gt;Re: Do we need a TODO? (was Re: Concurrently updating anupdatable view)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve performance of EvalPlanQual mechanism that rechecks already-updated rows&lt;br /&gt;
|This is related to the previous item, which questions whether it even has the right semantics&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-09/msg00045.php &amp;lt;nowiki&amp;gt;BUG #4401: concurrent updates to a table blocks one update indefinitely&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-07/msg00302.php &amp;lt;nowiki&amp;gt;BUG #4945: Parallel update(s) gone wild&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== ALTER ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have ALTER TABLE RENAME of a SERIAL column rename the sequence&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php &amp;lt;nowiki&amp;gt;Re: newbie: renaming sequences task&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CADLWmXUV4LbLhMZL8rYMhCy72aZZLB5BSARPQVgoX0BrxA0FFg@mail.gmail.com renaming implicit sequences]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have ALTER SEQUENCE RENAME rename the sequence name stored in the sequence table&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-09/msg00092.php &amp;lt;nowiki&amp;gt;BUG #3619: Renaming sequence does not update its 'sequence_name' field&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00007.php &amp;lt;nowiki&amp;gt;Re: BUG #3619: Renaming sequence does not update its 'sequence_name' field&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php &amp;lt;nowiki&amp;gt;Re: newbie: renaming sequences task&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME or ALTER TABLE RENAME CONSTRAINT&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-02/msg00168.php &amp;lt;nowiki&amp;gt;ALTER CONSTRAINT RENAME patch reverted&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ALTER DOMAIN to modify the underlying data type}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow ALTER TABLESPACE to move the tablespace to different directories}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow moving system tables to other tablespaces, where possible&lt;br /&gt;
|Currently non-global system tables must be in the default database tablespace. Global system tables can never be moved.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have ALTER INDEX update the name of a constraint using that index}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow column display reordering by recording a display, storage, and permanent id for every column?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00782.php &amp;lt;nowiki&amp;gt;Re: column ordering, was Re: [PATCHES] Enums patch v2&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg01029.php &amp;lt;nowiki&amp;gt;Column reordering in pg_dump&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/message-id/1324412114-sup-9608@alvh.no-ip.org&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow deactivating (and reactivating) indexes via ALTER TABLE&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg01191.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ALTER OPERATOR ... RENAME&lt;br /&gt;
|needs to consider effects of changing operator precedence&lt;br /&gt;
* [http://archives.postgresql.org/message-id/1322948781.26266.9.camel@vanquo.pezone.net Missing rename support]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ALTER TABLE ... RENAME RULE&lt;br /&gt;
* [http://archives.postgresql.org/message-id/1322948781.26266.9.camel@vanquo.pezone.net Missing rename support]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== CLUSTER ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Automatically maintain clustering on a table&lt;br /&gt;
|This might require some background daemon to maintain clustering during periods of low usage. It might also require tables to be only partially filled for easier reorganization.  Another idea would be to create a merged heap/index data file so an index lookup would automatically access the heap data too.  A third idea would be to store heap rows in hashed groups, perhaps using a user-supplied hash function.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2004-08/msg00350.php &amp;lt;nowiki&amp;gt;Equivalent praxis to CLUSTERED INDEX?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00155.php &amp;lt;nowiki&amp;gt;Re: Grouped Index Tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://community.enterprisedb.com/git/&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2009-10/msg00346.php &amp;lt;nowiki&amp;gt;Re: maintain_cluster_order_v5.patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== COPY ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY to report error lines and continue&lt;br /&gt;
|This requires the use of a savepoint before each COPY line is processed, with ROLLBACK on COPY failure. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00572.php &amp;lt;nowiki&amp;gt;Re: VLDB Features&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY FROM to create index entries in bulk&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00811.php &amp;lt;nowiki&amp;gt;Batch update of indexes on data loading&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY in CSV mode to control whether a quoted zero-length string is treated as NULL&lt;br /&gt;
|Currently this is always treated as a zero-length string, which generates an error when loading into an integer column &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00905.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] allow CSV quote in NULL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve COPY performance&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00954.php &amp;lt;nowiki&amp;gt;Re: 8.3 / 8.2.6 restore comparison&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01882.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY to report errors sooner&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01169.php &amp;lt;nowiki&amp;gt;Timely reporting of COPY errors&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY to handle other number formats&lt;br /&gt;
|E.g. the German notation. Best would be something like WITH DECIMAL ','.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow a stalled COPY to exit if the backend is terminated&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-04/msg00067.php &amp;lt;nowiki&amp;gt;Re: possible bug not in open items&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== GRANT/REVOKE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SERIAL sequences to inherit permissions from the base table?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow dropping of a role that has connection rights&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00736.php &amp;lt;nowiki&amp;gt;DROP ROLE dependency tracking ...&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== DECLARE CURSOR ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent DROP TABLE from dropping a table referenced by its own open cursor?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide some guarantees about the behavior of cursors that invoke volatile functions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/20997.1244563664@sss.pgh.pa.us Re: Cursor with hold emits the same row more than once across commits in 8.3.7]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== INSERT ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow INSERT/UPDATE of the system-generated oid value for a row}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|In rules, allow VALUES() to contain a mixture of 'old' and 'new' references}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== SHOW/SET ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM ANALYZE, and CLUSTER}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rationalize the discrepancy between settings that use values in bytes and SHOW that returns the object count&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2008-07/msg00007.php &amp;lt;nowiki&amp;gt;Re: [ADMIN] shared_buffers and shmmax&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== ANALYZE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have EXPLAIN ANALYZE issue NOTICE messages when the estimated and actual row counts differ by a specified percentage}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have EXPLAIN ANALYZE report rows as floating-point numbers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg01363.php &amp;lt;nowiki&amp;gt;explain analyze rows=%.0f&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00108.php &amp;lt;nowiki&amp;gt;Re: explain analyze rows=%.0f&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve how ANALYZE computes in-doubt tuples&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00771.php &amp;lt;nowiki&amp;gt;VACUUM/ANALYZE counting of in-doubt tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Window Functions ===&lt;br /&gt;
See {{messageLink|357.1230492361@sss.pgh.pa.us|TODO items for window functions}}.&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support creation of user-defined window functions&lt;br /&gt;
|We have the ability to create new window functions written in C.  Is it&lt;br /&gt;
worth the effort to create an API that would let them be written in PL/pgsql, etc?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement full support for window framing clauses&lt;br /&gt;
|In addition to done clauses described in the [http://developer.postgresql.org/pgdocs/postgres/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS latest doc], these clauses are not implemented yet.&lt;br /&gt;
* RANGE BETWEEN ... PRECEDING/FOLLOWING&lt;br /&gt;
* EXCLUDE&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Investigate tuplestore performance issues&lt;br /&gt;
|The tuplestore_in_memory() thing is just a band-aid, we ought to try to solve it properly.  tuplestore_advance seems like a weak spot as well.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00152.php &amp;lt;nowiki&amp;gt;tuplestore potential performance problem&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem|Do we really need so much duplicated code between Agg and WindowAgg?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Teach planner to evaluate multiple windows in the optimal order&lt;br /&gt;
|Currently windows are always evaluated in the query-specified order.&lt;br /&gt;
* http://archives.postgresql.org/message-id/3CDAD71E9D70417290FCF66F0178D1E1@amd64&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement DISTINCT clause in window aggregates&lt;br /&gt;
|Some proprietary RDBMSs have implemented it already, so it helps with porting from those.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Integrity Constraints ==&lt;br /&gt;
=== Keys ===&lt;br /&gt;
&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve deferrable unique constraints for cases with many conflicts&lt;br /&gt;
|The current implementation fires a trigger for each potentially conflicting row.  This might not scale well for an update that changes many key values at once.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Referential Integrity ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add MATCH PARTIAL referential integrity}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change foreign key constraint for array -&amp;amp;gt; element to mean element in array?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-10/msg01814.php &amp;lt;nowiki&amp;gt;foreign keys for array/period contains relationships&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem when cascading referential triggers make changes on cascaded tables, seeing the tables in an intermediate state&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Work-in-progress referential action trigger timing&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Optimize referential integrity checks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2005-10/msg00458.php &amp;lt;nowiki&amp;gt;Re: Effects of cascading references in foreign keys&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00744.php &amp;lt;nowiki&amp;gt;Can't ri_KeysEqual() consider two nulls as equal?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Check Constraints ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Run check constraints only when affected columns are changed&lt;br /&gt;
* http://archives.postgresql.org/message-id/1326055327.15293.13.camel@vanquo.pezone.net&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Server-Side Languages ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for polymorphic arguments and return types to languages other than PL/PgSQL}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for OUT and INOUT parameters to languages other than PL/PgSQL}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add more fine-grained specification of functions taking arbitrary data types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00367.php &amp;lt;nowiki&amp;gt;RfD: more powerful &amp;amp;quot;any&amp;amp;quot; types&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement stored procedures&lt;br /&gt;
|This might involve the control of transaction state and the return of multiple result sets&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-10/msg00454.php &amp;lt;nowiki&amp;gt;PL/pgSQL stored procedure returning multiple result sets (SELECTs)?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01375.php &amp;lt;nowiki&amp;gt;Proposal: real procedures again (8.4)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg00542.php&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-04/msg01149.php &amp;lt;nowiki&amp;gt;Gathering specs and discussion on feature (post 9.1)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow holdable cursors in SPI}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Add SPI_gettypmod() to return a field's typemod from a TupleDesc&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2005-11/msg00250.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== SQL-Language Functions ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow SQL-language functions to reference parameters by parameter name&lt;br /&gt;
|Currently SQL-language functions can only refer to dollar parameters, e.g. $1&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01479.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01519.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00221.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rethink query plan caching and timing of parse analysis within SQL-language functions&lt;br /&gt;
|They should work more like plpgsql functions do ...&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2011-05/msg00078.php &amp;lt;nowiki&amp;gt;Re: BUG #6019: invalid cached plan on inherited table&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/pgSQL ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Allow listing of record column names, and access to record columns via variables, e.g. columns := r.(*), tval2 := r.(colname)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2005-07/msg00458.php &amp;lt;nowiki&amp;gt;Re: PL/PGSQL: Dynamic Record Introspection&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-05/msg00302.php &amp;lt;nowiki&amp;gt;Re: PL/PGSQL: Dynamic Record Introspection&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00031.php &amp;lt;nowiki&amp;gt;Re: PL/PGSQL: Dynamic Record Introspection&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow row and record variables to be set to NULL constants, and allow NULL tests on such variables&lt;br /&gt;
|Because a row is not scalar, do not allow assignment from NULL-valued scalars.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg00070.php &amp;lt;nowiki&amp;gt;NULL and plpgsql rows&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider keeping separate cached copies when search_path changes&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg01009.php &amp;lt;nowiki&amp;gt;pl/pgsql Plan Invalidation and search_path&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of NULL row values vs. NULL rows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg01758.php &amp;lt;nowiki&amp;gt;Null row vs. row of nulls in plpgsql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg01973.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve PERFORM handling of WITH queries or document limitation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-03/msg00309.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/Perl ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow regex operations in plperl using UTF8 characters in non-UTF8 encoded databases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/Python ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Develop a trusted variant of PL/Python.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create a new restricted execution class that will allow passing function arguments in as locals.  Passing them as globals means functions cannot be called recursively.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-02/msg01468.php &amp;lt;nowiki&amp;gt;Re: pl/python do not delete function arguments&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a DB-API compliant interface on top of the SPI interface&lt;br /&gt;
* http://petereisentraut.blogspot.com/2011/11/plpydbapi-db-api-for-plpython.html&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|For functions returning a setof record with a composite type, cache the I/O functions for the composite type&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg02007.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix loss of information during conversion of numeric type to Python float}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/Tcl ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add table function support}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Check encoding validity of values passed back to Postgres in function returns, trigger tuple changes, and SPI calls.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Clients ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a function like pg_get_indexdef() that report more detailed index information&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00166.php &amp;lt;nowiki&amp;gt;BUG #3829: Wrong index reporting from pgAdmin III (v1.8.0 rev 6766-6767)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Split out pg_resetxlog output into pre- and post-sections&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg02040.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== pg_ctl ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow pg_ctl to work properly with configuration files located outside the PGDATA directory&lt;br /&gt;
|pg_ctl can not read the pid file because it isn't located in the config directory but in the PGDATA directory.  The solution is to allow pg_ctl to read and understand postgresql.conf to find the data_directory value.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-10/msg00024.php &amp;lt;nowiki&amp;gt;BUG #5103: &amp;amp;quot;pg_ctl -w (re)start&amp;amp;quot; fails with custom unix_socket_directory&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Modify pg_ctl behavior and exit codes to make it easier to write an LSB conforming init script&lt;br /&gt;
|It may be desirable to condition some of the changes on a command-line switch, to avoid breaking existing scripts.  A Linux shell (sh) script is referenced which has been tested and seems to provide a high degree of conformance in multiple environments.  Study of this script might suggest areas where pg_ctl could be modified to make writing an LSB conforming script easier; however, some aspects of that script would be unnecessary with other suggested changes to pg_ctl, and discussion on the lists did not reach consensus on support for all aspects of this script.  Further discussion of particular changes is needed before beginning any work.&lt;br /&gt;
* [[Lsb_conforming_init_script|LSB conforming init script]]&lt;br /&gt;
These threads should be studied for other ideas on improvements:&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01390.php &amp;lt;nowiki&amp;gt;We should Axe /contrib/start-scripts&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01843.php &amp;lt;nowiki&amp;gt;Linux LSB init script&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00008.php &amp;lt;nowiki&amp;gt;Re: Linux LSB init script&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve pg_ctl's detection of running postmasters&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00000.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-committers/2011-06/msg00001.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== psql ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have psql \ds show all sequences and their settings&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00916.php &amp;lt;nowiki&amp;gt;Re: TODO item: Have psql show current values for a sequence&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00401.php &amp;lt;nowiki&amp;gt;Quick patch: Display sequence owner&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Have \d on a sequence indicate if the sequence is owned by a table}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move psql backslash database information into the backend, use mnemonic commands?&lt;br /&gt;
|This would allow non-psql clients to pull the same information out of the database as psql. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-01/msg00191.php &amp;lt;nowiki&amp;gt;Re: psql \d option list overloaded&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make psql's \d commands more consistent in their handling of schemas&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php &amp;lt;nowiki&amp;gt;Re: psql and schemas&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make psql's \d commands distinguish default privileges from no privileges&lt;br /&gt;
|ACL displays were visibly different for the two cases before we &amp;quot;improved&amp;quot; them by using array_to_string.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2011-05/msg00082.php &amp;lt;nowiki&amp;gt;BUG #6021: There is no difference between default and empty access privileges with \dp&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consistently display privilege information for all objects in psql}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Add &amp;amp;quot;auto&amp;amp;quot; expanded mode that outputs in expanded format if &amp;amp;quot;wrapped&amp;amp;quot; mode can't wrap the output to the screen width&lt;br /&gt;
|Consider using auto-expanded mode for backslash commands like \df+.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00417.php &amp;lt;nowiki&amp;gt;Re: psql wrapped format default for backslash-d commands&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg01638.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent tab completion of SET TRANSACTION from querying the database and therefore preventing the transaction isolation level from being set.&lt;br /&gt;
|Currently SET &amp;amp;lt;tab&amp;amp;gt; causes a database lookup to check all supported session variables.  This query causes problems because setting the transaction isolation level must be the first statement of a transaction.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|\s without arguments (display history) fails with libedit, doesn't use pager either&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2011-06/msg00114.php &amp;lt;nowiki&amp;gt; psql \s not working - OS X&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a \set variable to control whether \s displays line numbers&lt;br /&gt;
|Another option is to add \# which lists line numbers, and allows command execution.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00255.php &amp;lt;nowiki&amp;gt;Re: psql possible TODO&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Include the symbolic SQLSTATE name in verbose error reports&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-09/msg00438.php &amp;lt;nowiki&amp;gt;Re: Checking is TSearch2 query is valid&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add prompt escape to display the client and server versions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00310.php &amp;lt;nowiki&amp;gt;WIP patch for TODO Item: Add prompt escape to display the client and server versions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add option to wrap column values at whitespace boundaries, rather than chopping them at a fixed width.&lt;br /&gt;
|Currently, &amp;amp;quot;wrapped&amp;amp;quot; format chops values into fixed widths.  Perhaps the word wrapping could use the same algorithm documented in the W3C specification. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00404.php &amp;lt;nowiki&amp;gt;Re: psql wrapped format default for backslash-d commands&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://www.w3.org/TR/CSS21/tables.html#auto-table-layout}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support the ReST table output format&lt;br /&gt;
|Details about the ReST format:  http://docutils.sourceforge.net/rst.html#reference-documentation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg01007.php &amp;lt;nowiki&amp;gt;Proposal: new border setting in psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00518.php &amp;lt;nowiki&amp;gt;Re: Proposal: new border setting in psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00609.php &amp;lt;nowiki&amp;gt;Re: Proposal: new border setting in psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add option to print advice for people familiar with other databases&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg01845.php &amp;lt;nowiki&amp;gt;MySQL-ism help patch for psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|\dd is missing comments for several types of objects&lt;br /&gt;
|Comments are not handled at all for some object types, and are handled by both \dd and the individual backslash command for others. Consider a system view like pg_comments to manage this mess.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2009-09/msg00199.php &amp;lt;nowiki&amp;gt;comment on constraint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-09/msg01080.php &amp;lt;nowiki&amp;gt;pg_comments&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-05/msg00885.php &amp;lt;nowiki&amp;gt;patch: Allow \dd to show constraint comments&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ability to edit views with \ev&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00023.php &amp;lt;nowiki&amp;gt;Adding \ev view editor?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix FETCH_COUNT to handle SELECT ... INTO and WITH queries&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01565.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2010-05/msg00192.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent psql from sending remaining single-line multi-statement queries after reconnecting&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2010-05/msg00159.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01283.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Add \i option to bring in the specified file as a quoted literal&lt;br /&gt;
|This would be useful for creating functions and other areas.  Details still need to be worked out.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-02/msg00016.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-02/msg00020.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having psql -c read .psqlrc, for consistency&lt;br /&gt;
|psql -f already reads .psqlrc&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow processing of multiple -f (file) options&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve line drawing characters&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00386.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider improving the continuation prompt&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg01772.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== pg_dump / pg_restore ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Add full object name to the tag field.  eg. for operators we need '=(integer, integer)', instead of just '='.&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add pg_dumpall custom format dumps?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2010-05/msg00509.php pg_dumpall custom format]&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid using platform-dependent locale names in pg_dumpall output&lt;br /&gt;
|Using native locale names puts roadblocks in the way of porting a dump to another platform.  One possible solution is to get&lt;br /&gt;
CREATE DATABASE to accept some agreed-on set of locale names and fix them up to meet the platform's requirements.&lt;br /&gt;
* http://archives.postgresql.org/message-id/21396.1241716688@sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow selection of individual object(s) of all types, not just tables}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|In a selective dump, allow dumping of an object and all its dependencies}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add options like pg_restore -l and -L to pg_dump}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for multiple pg_restore -t options, like pg_dump&lt;br /&gt;
|pg_restore's -t switch is less useful than pg_dump's in quite a few ways: no multiple switches, no pattern matching, no ability to pick up indexes and other dependent items for a selected table.  It should be made to handle this switch just like pg_dump does.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Stop dumping CASCADE on DROP TYPE commands in clean mode}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pg_dump --clean to drop roles that own objects or have privileges&lt;br /&gt;
|tgl says: if this is about pg_dumpall, it's done as of 8.4.  If it's really about pg_dump, what does it mean?  pg_dump has no business dropping roles.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow pg_dump to utilize multiple CPUs and I/O channels by dumping multiple objects simultaneously&lt;br /&gt;
|The difficulty with this is getting multiple dump processes to produce a single dump output file.  It also would require several sessions to share the same snapshot. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php &amp;lt;nowiki&amp;gt;pg_dump additional options for performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00135.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00040.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg02454.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pg_restore to load different parts of the COPY data for a single table simultaneously}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Remove support for dumping from pre-7.3 servers&lt;br /&gt;
|In 7.3 and later, we can get accurate dependency information from the server.  pg_dump still contains a lot of crufty code&lt;br /&gt;
to try to deal with the lack of dependency info in older servers, but the usefulness of maintaining that code grows small.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow pre/data/post files when schema and data are dumped separately, for performance reasons&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php &amp;lt;nowiki&amp;gt;pg_dump additional options for performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00185.php &amp;lt;nowiki&amp;gt;Re: pg_dump additional options for performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00821.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00135.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Refactor handling of database attributes between pg_dump and pg_dumpall&lt;br /&gt;
|Currently only pg_dumpall emits database attributes, such as ALTER DATABASE SET commands and database-level GRANTs.&lt;br /&gt;
Many people wish that pg_dump would do that.  One proposal is to let pg_dump issue such commands if the -C switch was used,&lt;br /&gt;
but it's unclear whether that will satisfy the demand.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg01031.php &amp;lt;nowiki&amp;gt;ALTER DATABASE vs pg_dump&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2010-05/msg00010.php summary of the issues]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change pg_dump so that a comment on the dumped database is applied to the loaded database, even if the database has a different name.&lt;br /&gt;
|This will require new backend syntax, perhaps COMMENT ON CURRENT DATABASE. This is related to the previous item.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow parallel restore of tar dumps&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-02/msg01154.php &amp;lt;nowiki&amp;gt;Re: parallel restore&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow pg_dumpall to output restorable ALTER USER/DATABASE SET settings&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00916.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00394.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02359.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-10/msg00489.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== ecpg ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Docs&lt;br /&gt;
|Document differences between ecpg and the SQL standard and information about the Informix-compatibility module.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Solve cardinality &amp;amp;gt; 1 for input descriptors / variables?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a semantic check level, e.g. check if a table really exists}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|fix handling of DB attributes that are arrays}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix nested C comments}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|sqlwarn[6] should be 'W' if the PRECISION or SCALE value specified}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make SET CONNECTION thread-aware, non-standard?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow multidimensional arrays}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement COPY FROM STDIN}} &lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a way to specify size of a bytea parameter&lt;br /&gt;
* [http://archives.postgresql.org/message-id/200906192131.n5JLVoMo044178@wwwmaster.postgresql.org &amp;lt;nowiki&amp;gt;BUG #4866: ECPG and BYTEA&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Fix small memory leaks in ecpg&lt;br /&gt;
|Memory leaks in a short running application like ecpg are not really a problem, but make debugging more complicated}} &lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow reuse of cursor name variables&lt;br /&gt;
* [http://archives.postgresql.org/message-id/20100329113435.GA3430@feivel.credativ.lan &amp;lt;nowiki&amp;gt;Problems with variable cursorname in ecpg&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== libpq ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent PQfnumber() from lowercasing unquoted column names&lt;br /&gt;
|PQfnumber() should never have been doing lowercasing, but historically it has so we need a way to prevent it}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow statement results to be automatically batched to the client&lt;br /&gt;
|Currently all statement results are transferred to the libpq client before libpq makes the results available to the application.  This feature would allow the application to make use of the first result rows while the rest are transferred, or held on the server waiting for them to be requested by libpq. One complexity is that a statement like SELECT 1/col could error out mid-way through the result set.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider disallowing multiple queries in PQexec() as an additional barrier to SQL injection attacks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg00184.php &amp;lt;nowiki&amp;gt;Re: InitPostgres and flatfiles question&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add PQexecf() that allows complex parameter substitution&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01803.php &amp;lt;nowiki&amp;gt;Last minute mini-proposal (I know, know) for PQexecf()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add SQLSTATE and severity to errors generated within libpq itself&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-interfaces/2007-11/msg00015.php &amp;lt;nowiki&amp;gt;v8.1: Error severity on libpq PGconn*&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01425.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for interface/ipaddress binding to libpq&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01811.php &amp;lt;nowiki&amp;gt;SR/libpq - outbound interface/ipaddress binding&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Triggers ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve storage of deferred trigger queue&lt;br /&gt;
|Right now all deferred trigger information is stored in backend memory.  This could exhaust memory for very large trigger queues. This item involves dumping large queues into files, or doing some kind of join to process all the triggers, some bulk operation, or a bitmap. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00876.php &amp;lt;nowiki&amp;gt;Re: BUG #4204: COPY to table with FK has memory leak&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg00464.php &amp;lt;nowiki&amp;gt;Scaling up deferred unique checks and the after trigger queue&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-08/msg00023.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow triggers to be disabled in only the current session.&lt;br /&gt;
|This is currently possible by starting a multi-statement transaction, modifying the system tables, performing the desired SQL, restoring the system tables, and committing the transaction.  ALTER TABLE ... TRIGGER requires a table lock so it is not ideal for this usage.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|With disabled triggers, allow pg_dump to use ALTER TABLE ADD FOREIGN KEY&lt;br /&gt;
|If the dump is known to be valid, allow foreign keys to be added without revalidating the data.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow statement-level triggers to access modified rows}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|When statement-level triggers are defined on a parent table, have them fire only on the parent table, and fire child table triggers only where appropriate&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg01883.php &amp;lt;nowiki&amp;gt;Statement-level triggers and inheritance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow AFTER triggers on system tables&lt;br /&gt;
|System tables are modified in many places in the backend without going through the executor and therefore not causing triggers to fire. To complete this item, the functions that modify system tables will have to fire triggers.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01665.php&lt;br /&gt;
* http://wiki.postgresql.org/wiki/DDL_Triggers&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-12/msg00022.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Tighten trigger permission checks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00564.php &amp;lt;nowiki&amp;gt;Security leak with trigger functions?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow BEFORE INSERT triggers on views&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-02/msg01466.php &amp;lt;nowiki&amp;gt;Re: Why can't I put a BEFORE EACH ROW trigger on a view?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add database and transaction-level triggers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00451.php &amp;lt;nowiki&amp;gt;Proposal for db level triggers&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00620.php &amp;lt;nowiki&amp;gt;triggers on prepare, commit, rollback... ?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce locking requirements for creating a trigger&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00635.php &amp;lt;nowiki&amp;gt;Re: Change lock requirements for adding a trigger&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid requirement for &amp;quot;AFTER&amp;quot; trigger functions to return a value&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02384.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow creation of inline triggers&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2012-02/msg00708.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Inheritance ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow inherited tables to inherit indexes, UNIQUE constraints, and primary/foreign keys&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-05/msg00285.php &amp;lt;nowiki&amp;gt;Partitioning/inherited tables vs FKs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00039.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00305.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Honor UNIQUE INDEX on base column in INSERTs/UPDATEs on inherited table, e.g.  INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail&lt;br /&gt;
|The main difficulty with this item is the problem of creating an index that can span multiple tables.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Determine whether ALTER TABLE / SET SCHEMA should work on inheritance hierarchies (and thus support ONLY).  If yes, implement it.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|ALTER TABLE variants sometimes support recursion and sometimes not, but this is poorly/not documented, and the ONLY marker would then be silently ignored. Clarify the documentation, and reject ONLY if it is not supported.}}&lt;br /&gt;
&lt;br /&gt;
== Indexes ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent index uniqueness checks when UPDATE does not modify the column&lt;br /&gt;
|Uniqueness (index) checks are done when updating a column even if the column is not modified by the UPDATE.&lt;br /&gt;
However, HOT already short-circuits this in common cases, so more work might not be helpful.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow the creation of on-disk bitmap indexes which can be quickly combined with other bitmap indexes&lt;br /&gt;
|Such indexes could be more compact if there are only a few distinct values. Such indexes can also be compressed.  Keeping such indexes updated can be costly.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2005-07/msg00512.php &amp;lt;nowiki&amp;gt;Re: Bitmap index AM&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg01107.php &amp;lt;nowiki&amp;gt;Bitmap index thoughts&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00265.php &amp;lt;nowiki&amp;gt;Stream bitmaps&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01214.php &amp;lt;nowiki&amp;gt;Re: Bitmapscan changes - Requesting further feedback&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00013.php &amp;lt;nowiki&amp;gt;Updated bitmap index patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00741.php &amp;lt;nowiki&amp;gt;Reviewing new index types (was Re: [PATCHES] Updated bitmap indexpatch)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01023.php &amp;lt;nowiki&amp;gt;Bitmap Indexes: request for feedback&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/message-id/800923.27831.qm@web29010.mail.ird.yahoo.com &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow accurate statistics to be collected on indexes with more than one column or expression indexes, perhaps using per-index statistics&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2006-10/msg00222.php &amp;lt;nowiki&amp;gt;Re: Simple join optimized badly?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01131.php &amp;lt;nowiki&amp;gt;Stats for multi-column indexes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00741.php &amp;lt;nowiki&amp;gt;Cross-column statistics revisited&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg01431.php &amp;lt;nowiki&amp;gt;Multi-Dimensional Histograms&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00913.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg02179.php &lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00459.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02054.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg01731.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00894.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-09/msg00679.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having a larger statistics target for indexed columns and expression indexes. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider smaller indexes that record a range of values per heap page, rather than having one index entry for every heap row&lt;br /&gt;
|This is useful if the heap is clustered by the indexed values. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00341.php &amp;lt;nowiki&amp;gt;Grouped Index Tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg01264.php &amp;lt;nowiki&amp;gt;Grouped Index Tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00465.php &amp;lt;nowiki&amp;gt;Grouped Index Tuples / Clustered Indexes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-03/msg00163.php &amp;lt;nowiki&amp;gt;Bitmapscan changes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00014.php &amp;lt;nowiki&amp;gt;Re: GIT patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00487.php &amp;lt;nowiki&amp;gt;Re: Index Tuple Compression Approach?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01589.php &amp;lt;nowiki&amp;gt;Re: Index AM change proposals, redux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add REINDEX CONCURRENTLY, like CREATE INDEX CONCURRENTLY&lt;br /&gt;
|This is difficult because you must upgrade to an exclusive table lock to replace the existing index file.  CREATE INDEX CONCURRENTLY does not have this complication.  This would allow index compaction without downtime. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-08/msg00289.php &amp;lt;nowiki&amp;gt;Re: When/if to Reindex&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow multiple indexes to be created concurrently, ideally via a single heap scan&lt;br /&gt;
|pg_restore allows parallel index builds, but it is done via subprocesses, and there is no SQL interface for this.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-04/msg00093.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider sorting entries before inserting into btree index&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-01/msg01010.php &amp;lt;nowiki&amp;gt;Re: ATTN: Clodaldo was Performance problem. Could it be related to 8.3-beta4?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow index scans to return matching index keys, not just the matching heap locations&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01657.php &amp;lt;nowiki&amp;gt;Re: Is this TODO item done?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01477.php &amp;lt;nowiki&amp;gt;Index-only quals&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow creation of an index that can do comparisons to test if a value is between two column values&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00757.php &amp;lt;nowiki&amp;gt;Proposal: temporal extension &amp;amp;quot;period&amp;amp;quot; data type&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using &amp;quot;effective_io_concurrency&amp;quot; for index scans&lt;br /&gt;
* Currently only bitmap scans use this, which might be fine because most multi-row index scans use bitmap scans.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem with btree page splits during checkpoints&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00052.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-09/msg00184.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== GIST ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add more GIST index support for geometric data types}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow GIST indexes to create certain complex index types, like digital trees (see Aoki)}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix performance issues in contrib/seg and contrib/cube GiST support&lt;br /&gt;
* [http://archives.postgresql.org/message-id/alpine.DEB.2.00.0904161633160.4053@aragorn.flymine.org GiST index performance]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/alpine.DEB.2.00.0904221704470.22330@aragorn.flymine.org draft patch]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2009-05/msg00069.php &amp;lt;nowiki&amp;gt;Re: GiST index performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2009-06/msg00068.php &amp;lt;nowiki&amp;gt;GiST index performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Hash ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add UNIQUE capability to hash indexes}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add hash WAL logging for crash recovery&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-09/msg00196.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow multi-column hash indexes}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Sorting ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider whether duplicate keys should be sorted by block/offset&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00558.php &amp;lt;nowiki&amp;gt;Remove hacks for old bad qsort() implementations?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider being smarter about memory and external files used during sorts&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg01101.php &amp;lt;nowiki&amp;gt;Sorting Improvements for 8.4&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00045.php &amp;lt;nowiki&amp;gt;Re: Sorting Improvements for 8.4&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider detoasting keys before sorting}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow sorts to use more available memory&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2007-11/msg01026.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg01123.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg01957.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Fsync ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options and whether fsync does anything&lt;br /&gt;
|Ideally this requires a separate test program like /contrib/pg_test_fsync that can be run at initdb time or optionally later.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider sorting writes during checkpoint&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00541.php &amp;lt;nowiki&amp;gt;Sorted writes in checkpoint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00050.php &amp;lt;nowiki&amp;gt;Re: Sorting writes during checkpoint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg02012.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg00278.php&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CA+TgmoaHu1zuNohoE=cEP0nSc+0wtuRSyEAj_Af2XhxU+ry6-w@mail.gmail.com checkpoint writeback via sync_file_range]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Cache Usage ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Speed up COUNT(*)&lt;br /&gt;
|We could use a fixed row count and a +/- count to follow MVCC visibility rules, or a single cached value could be used and invalidated if anyone modifies the table.  Another idea is to get a count directly from a unique index, but for this to be faster than a sequential scan it must avoid access to the heap to obtain tuple visibility information.  Note that the index-only scans feature is now implemented which now dramatically speeds up some COUNT(*) cases.&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Slow_Counting&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a way to calculate an &amp;amp;quot;estimated COUNT(*)&amp;amp;quot;&lt;br /&gt;
|Perhaps by using the optimizer's cardinality estimates or random sampling.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-11/msg00943.php &amp;lt;nowiki&amp;gt;Re: Improving count(*)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Slow_Counting&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow data to be pulled directly from indexes&lt;br /&gt;
|Currently indexes do not have enough tuple visibility information to allow data to be pulled from the index without also accessing the heap.  The idea is to use the visibility map used for vacuum to avoid heap lookups on pages where all tuples are visible.&lt;br /&gt;
* [http://wiki.postgresql.org/wiki/Index-only_scans Index-Only Scans wiki]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider automatic caching of statements at various levels:&lt;br /&gt;
* Parsed query tree&lt;br /&gt;
* Query execute plan&lt;br /&gt;
* Query results &lt;br /&gt;
&lt;br /&gt;
:&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg00823.php &amp;lt;nowiki&amp;gt;Cached Query Plans (was: global prepared statements)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider increasing internal areas (NUM_CLOG_BUFFERS) when shared buffers is increased&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-10/msg01419.php &amp;lt;nowiki&amp;gt;Re: slru.c race condition (was Re: TRAP: FailedAssertion(&amp;amp;quot;!((itemid)-&amp;amp;gt;lp_flags &amp;amp;amp; 0x01)&amp;amp;quot;,)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00030.php &amp;lt;nowiki&amp;gt;clog_buffers to 64 in 8.3?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-08/msg00024.php &amp;lt;nowiki&amp;gt;CLOG Patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider decreasing the amount of memory used by PrivateRefCount&lt;br /&gt;
|&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg00797.php &amp;lt;nowiki&amp;gt;PrivateRefCount (for 8.3)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg00752.php &amp;lt;nowiki&amp;gt;Re: PrivateRefCount (for 8.3)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider allowing higher priority queries to have referenced buffer cache pages stay in memory longer&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00562.php &amp;lt;nowiki&amp;gt;Re: How to keep a table in memory?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Vacuum ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Auto-fill the free space map by scanning the buffer cache or by checking pages written by the background writer&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-02/msg01125.php &amp;lt;nowiki&amp;gt;Dead Space Map&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00011.php &amp;lt;nowiki&amp;gt;Re: Automatic free space map filling&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow concurrent inserts to use recently created pages rather than creating new ones&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg00853.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having single-page pruning update the visibility map&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;https://commitfest.postgresql.org/action/patch_view?id=75&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg02344.php &amp;lt;nowiki&amp;gt;Re: visibility maps and heap_prune&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve tracking of total relation tuple counts now that vacuum doesn't always scan the whole heap&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00531.php Partial vacuum versus pg_class.reltuples]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Bias FSM towards returning free space near the beginning of the heap file, in hopes that empty pages at the end can be truncated by VACUUM&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg01124.php &amp;lt;nowiki&amp;gt;FSM search modes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a more compact data representation for dead tuple locations within VACUUM&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00143.php &amp;lt;nowiki&amp;gt;Re: Have vacuum emit a warning when it runs out of maintenance_work_mem&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide more information in order to improve user-side estimates of dead space bloat in relations&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2009-05/msg01039.php &amp;lt;nowiki&amp;gt;Re: Bloated Table&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve locking behaviour of vacuum during trailing page truncation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-03/msg00319.php&lt;br /&gt;
* http://archives.postgresql.org/message-id/4D8DF88E.7080205@Yahoo.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce the number of table scans performed by vacuum&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg01119.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00605.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-07/msg00624.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Auto-vacuum ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Issue log message to suggest VACUUM FULL if a table is nearly empty?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent long-lived temporary tables from causing frozen-xid advancement starvation&lt;br /&gt;
|The problem is that autovacuum cannot vacuum them to set frozen xids; only the session that created them can do that. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-06/msg01645.php &amp;lt;nowiki&amp;gt;Re: AutoVacuum Behaviour Question&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent autovacuum from running if an old transaction is still running from the last vacuum&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00899.php &amp;lt;nowiki&amp;gt;Re: Autovacuum and OldestXmin&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have autoanalyze of parent tables occur when child tables are modified&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-06/msg00137.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-10/msg00271.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow parallel cores to be used by vacuumdb&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4F10A728.7090403@agliodbs.com vacuumdb -j]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Locking ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix priority ordering of read and write light-weight locks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00893.php &amp;lt;nowiki&amp;gt;lwlocks and starvation&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00905.php &amp;lt;nowiki&amp;gt;Re: lwlocks and starvation&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem when multiple subtransactions of the same outer transaction hold different types of locks, and one subtransaction aborts&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg01011.php &amp;lt;nowiki&amp;gt;FOR SHARE vs FOR UPDATE locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00001.php &amp;lt;nowiki&amp;gt;Re: FOR SHARE vs FOR UPDATE locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00435.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] [pgsql-patches] Phantom Command IDs, updated patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00773.php &amp;lt;nowiki&amp;gt;Re: savepoints and upgrading locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow UPDATEs on only non-referential integrity columns not to conflict with referential integrity locks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00073.php &amp;lt;nowiki&amp;gt;Referential Integrity and SHARE locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add idle_in_transaction_timeout GUC so locks are not held for long periods of time}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve deadlock detection when a page cleaning lock conflicts with a shared buffer that is pinned&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-01/msg00138.php &amp;lt;nowiki&amp;gt;BUG #3883: Autovacuum deadlock with truncate?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php &amp;lt;nowiki&amp;gt;Thoughts about bug #3883&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-committers/2008-01/msg00365.php &amp;lt;nowiki&amp;gt;Re: pgsql: Add checks to TRUNCATE, CLUSTER, and REINDEX to prevent&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Detect deadlocks involving LockBufferForCleanup()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php &amp;lt;nowiki&amp;gt;Thoughts about bug #3883&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow finer control over who is cancelled in a deadlock&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01727.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a lock timeout parameter&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00485.php &amp;lt;nowiki&amp;gt;SELECT ... FOR UPDATE [WAIT integer | NOWAIT] for 8.5&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Reduce number of unnecessary false positives in Serializable Snapshot Isolation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-06/msg00609.php &amp;lt;nowiki&amp;gt;SSI heap_insert and page-level predicate locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Startup Time Improvements ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Experiment with multi-threaded backend for backend creation&lt;br /&gt;
|This would prevent the overhead associated with process creation. Most operating systems have trivial process creation time compared to database startup overhead, but a few operating systems (Win32, Solaris) might benefit from threading.  Also explore the idea of a single session using multiple threads to execute a statement faster.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow backends to change their database without restart&lt;br /&gt;
|This allows for faster server startup.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00843.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00336.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Write-Ahead Log ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Eliminate need to write full pages to WAL before page modification&lt;br /&gt;
|Currently, to protect against partial disk page writes, we write full page images to WAL before they are modified so we can correct any partial page writes during recovery.  These pages can also be eliminated from point-in-time archive files. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2002-06/msg00655.php &amp;lt;nowiki&amp;gt;Re: Index Scans become Seq Scans after VACUUM ANALYSE&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg01191.php&lt;br /&gt;
* [http://archives.postgresql.org/message-id/20120105061916.GB21048@fetter.org WIP double writes]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4EFC449F02000025000441CD@gw.wicourts.gov double writes]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/20120110214344.GB21106@fetter.org Double-write with Fast Checksums]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/1962493974.656458.1327703514780.JavaMail.root@zimbra-prod-mbox-4.vmware.com double writes using &amp;quot;double-write buffer&amp;quot; approach]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|When full page writes are off, write CRC to WAL and check file system blocks on recovery&lt;br /&gt;
|If CRC check fails during recovery, remember the page in case a later CRC for that page properly matches.  The difficulty is that hint bits are not WAL logged, meaning a valid page might not match the earlier CRC.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Write full pages during file system write and not when the page is modified in the buffer cache&lt;br /&gt;
|This allows most full page writes to happen in the background writer.  It might cause problems for applying WAL on recovery into a partially-written page, but later the full page will be replaced from WAL.&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CAGvK12UST-tPhyLrSLuSpwFxZbAO79yYrhV2xaLmS2MkUxNUVQ@mail.gmail.com Page Checksums + Double Writes]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce WAL traffic so only modified values are written rather than entire rows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01589.php &amp;lt;nowiki&amp;gt;Reduction in WAL for UPDATEs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow WAL information to recover corrupted pg_controldata&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00025.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] pg_resetxlog -r flag&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Find a way to reduce rotational delay when repeatedly writing last WAL page&lt;br /&gt;
|Currently fsync of WAL requires the disk platter to perform a full rotation to fsync again. One idea is to write the WAL to different offsets that might reduce the rotational delay. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2002-11/msg00483.php &amp;lt;nowiki&amp;gt;500 tpsQL + WAL log implementation&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Speed WAL recovery by allowing more than one page to be prefetched&lt;br /&gt;
|This should be done utilizing the same infrastructure used for prefetching in general to avoid introducing complex error-prone code in WAL replay. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-12/msg00683.php &amp;lt;nowiki&amp;gt;Slow PITR restore&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00497.php &amp;lt;nowiki&amp;gt;Re: [GENERAL] Slow PITR restore&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg01279.php &amp;lt;nowiki&amp;gt;Read-ahead and parallelism in redo recovery&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve WAL concurrency by increasing lock granularity&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00556.php &amp;lt;nowiki&amp;gt;Reworking WAL locking&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Be more aggressive about creating WAL files&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01325.php &amp;lt;nowiki&amp;gt;Re: PANIC caused by open_sync on Linux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-07/msg01075.php &amp;lt;nowiki&amp;gt;PreallocXlogFiles&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-04/msg00556.php &amp;lt;nowiki&amp;gt;WAL/PITR additional items&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have resource managers report the duration of their status changes&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01468.php &amp;lt;nowiki&amp;gt;Recovery of Multi-stage WAL actions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move pgfoundry's xlogdump to /contrib and have it rely more closely on the WAL backend code&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00035.php &amp;lt;nowiki&amp;gt;xlogdump&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Close deleted WAL files held open in *nix by long-lived read-only backends&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg01754.php &amp;lt;nowiki&amp;gt;Deleted WAL files held open by backends in Linux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00060.php &amp;lt;nowiki&amp;gt;Re: Deleted WAL files held open by backends in Linux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Optimizer / Executor ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve selectivity functions for geometric operators}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider increasing the default values of from_collapse_limit, join_collapse_limit, and/or geqo_threshold&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4136ffa0905210551u22eeb31bn5655dbe7c9a3aed5@mail.gmail.com from_collapse_limit vs. geqo_threshold]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve ability to display optimizer analysis using OPTIMIZER_DEBUG}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Log statements where the optimizer row estimates were dramatically different from the number of rows actually found?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider compressed annealing to search for query plans&lt;br /&gt;
|This might replace GEQO.&lt;br /&gt;
* http://archives.postgresql.org/message-id/15658.1241278636%40sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve use of expression indexes for ORDER BY &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01553.php &amp;lt;nowiki&amp;gt;Resjunk sort columns, Heikki's index-only quals patch, and bug #5000&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Modify the planner to better estimate caching effects&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-11/msg00117.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow shared buffer cache contents to affect index cost computations&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg01140.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Hashing ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using a hash for joining to a large IN (VALUES ...) list&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00450.php &amp;lt;nowiki&amp;gt;Planning large IN lists&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow single batch hash joins to preserve outer pathkeys&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg00806.php Re: Potential Join Performance Issue]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;quot;lazy&amp;quot; hash tables - look up only the tuples that are actually requested&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid building the same hash table more than once during the same query&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid hashing for distinct and then re-hashing for hash join&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4136ffa0902191346g62081081v8607f0b92c206f0a@mail.gmail.com Re: Fixing Grittner's planner issues]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Background Writer ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having the background writer update the transaction status hint bits before writing out the page&lt;br /&gt;
|Implementing this requires the background writer to have access to system catalogs and the transaction status log.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider adding buffers the background writer finds reusable to the free list &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00781.php &amp;lt;nowiki&amp;gt;Background LRU Writer/free list&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CA+U5nMKtvyDcV4zTr7bq7t6cA2nBfLxCJ8tQgVBnc5ddRPO+Bg@mail.gmail.com our buffer replacement strategy is kind of lame]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Automatically tune bgwriter_delay based on activity rather then using a fixed interval&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00781.php &amp;lt;nowiki&amp;gt;Background LRU Writer/free list&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CA+U5nMKtvyDcV4zTr7bq7t6cA2nBfLxCJ8tQgVBnc5ddRPO+Bg@mail.gmail.com our buffer replacement strategy is kind of lame]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider whether increasing BM_MAX_USAGE_COUNT improves performance&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg01007.php &amp;lt;nowiki&amp;gt;Bgwriter LRU cleaning: we've been going at this all wrong&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Test to see if calling PreallocXlogFiles() from the background writer will help with WAL segment creation latency&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-06/msg00340.php &amp;lt;nowiki&amp;gt;Re: Load Distributed Checkpoints, final patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Concurrent Use of Resources ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Do async I/O for faster random read-ahead of data&lt;br /&gt;
|Async I/O allows multiple I/O requests to be sent to the disk with results coming back asynchronously.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg00820.php &amp;lt;nowiki&amp;gt;Asynchronous I/O Support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-09/msg00255.php &amp;lt;nowiki&amp;gt;Re: random_page_costs - are defaults of 4.0 realistic for SCSI RAID 1&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00027.php &amp;lt;nowiki&amp;gt;There's random access and then there's random access&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-01/msg00170.php &amp;lt;nowiki&amp;gt;Bitmap index scan preread using posix_fadvise (Was: There's random access and then there's random access)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
The above patch is already applied as of 8.4, but it still remains to figure out how to handle plain indexscans effectively.&lt;br /&gt;
* [http://archives.postgresql.org//pgsql-hackers/2009-01/msg00806.php Problems with the patch submitted for posix_fadvise in index scans]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Experiment with multi-threaded backend for better I/O utilization&lt;br /&gt;
|This would allow a single query to make use of multiple I/O channels simultaneously.  One idea is to create a background reader that can pre-fetch sequential and index scan pages needed by other backends. This could be expanded to allow concurrent reads from multiple devices in a partitioned table.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-02/msg00123.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Experiment with multi-threaded backend for better CPU utilization&lt;br /&gt;
|This would allow several CPUs to be used for a single query, such as for sorting or query execution.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00945.php &amp;lt;nowiki&amp;gt;Multi CPU Queries - Feedback and/or suggestions wanted!&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|SMP scalability improvements&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00439.php &amp;lt;nowiki&amp;gt;Straightforward changes for increased SMP scalability&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00206.php &amp;lt;nowiki&amp;gt;Re: Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00361.php &amp;lt;nowiki&amp;gt;Re: Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== TOAST ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow user configuration of TOAST thresholds&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00213.php &amp;lt;nowiki&amp;gt;Re: Proposed adjustments in MaxTupleSize and toastthresholds&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00082.php &amp;lt;nowiki&amp;gt;pg_lzcompress strategy parameters&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce unnecessary cases of deTOASTing&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00895.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Eliminate more detoast copies for packed varlenas&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce costs of repeat de-TOASTing of values&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg01096.php &amp;lt;nowiki&amp;gt;WIP patch: reducing overhead for repeat de-TOASTing&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Monitoring ==&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Expand pg_stat_activity for easier integration with monitoring tools&lt;br /&gt;
|* http://archives.postgresql.org/message-id/4DFA13A5.2060200@2ndQuadrant.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add column to pg_stat_activity that shows the progress of long-running commands like CREATE INDEX and VACUUM&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-04/msg00203.php &amp;lt;nowiki&amp;gt;EXPLAIN progress info&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* The CLUSTER/VACUUM FULL implementation would also be useful to track this way&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have pg_stat_activity display query strings in the correct client encoding&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00131.php &amp;lt;nowiki&amp;gt;pg_stats queries versus per-database encodings&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Expose pg_controldata via an SQL interface&lt;br /&gt;
|Helpful for monitoring replicated databases&lt;br /&gt;
* http://archives.postgresql.org/message-id/4B901D73.8030003@agliodbs.com&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4B959D7A.6010907@joeconway.com initial patch]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Performance ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Use mmap() rather than SYSV for shared buffers?&lt;br /&gt;
|This would remove the requirement for SYSV SHM but would introduce portability issues. Anonymous mmap (or mmap to /dev/zero) is required to prevent I/O overhead. We could also consider mmap() for writing WAL.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00750.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00756.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rather than consider mmap()-ing in 8k pages, consider mmap()'ing entire files into a backend?&lt;br /&gt;
|Doing I/O to large tables would consume a lot of address space or require frequent mapping/unmapping.  Extending the file also causes mapping problems that might require mapping only individual pages, leading to thousands of mappings.  Another problem is that there is no way to _prevent_ I/O to disk from the dirty shared buffers so changes could hit disk before WAL is written.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01239.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider ways of storing rows more compactly on disk:&lt;br /&gt;
* Reduce the row header size?&lt;br /&gt;
* Consider reducing on-disk varlena length from four bytes to two because a heap row cannot be more than 64k in length}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider transaction start/end performance improvements&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00948.php &amp;lt;nowiki&amp;gt;Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00361.php &amp;lt;nowiki&amp;gt;Re: Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow configuration of backend priorities via the operating system&lt;br /&gt;
|Though backend priorities make priority inversion during lock waits possible, research shows that this is not a huge problem.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-02/msg00493.php &amp;lt;nowiki&amp;gt;Priorities for users or queries?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider increasing the minimum allowed number of shared buffers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-02/msg00157.php &amp;lt;nowiki&amp;gt;Re: [PATCH] Don't bail with legitimate -N/-B options&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider if CommandCounterIncrement() can avoid its AcceptInvalidationMessages() call&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-committers/2007-11/msg00585.php &amp;lt;nowiki&amp;gt;pgsql: Avoid incrementing the CommandCounter when&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider Cartesian joins when both relations are needed to form an indexscan qualification for a third relation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-12/msg00090.php &amp;lt;nowiki&amp;gt;Re: TB-sized databases&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider not storing a NULL bitmap on disk if all the NULLs are trailing&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00624.php &amp;lt;nowiki&amp;gt;Proposal for Null Bitmap Optimization(for Trailing NULLs)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-12/msg00109.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Proposal for Null Bitmap Optimization(for TrailingNULLs)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Sort large UPDATE/DELETEs so it is done in heap order&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg01119.php &amp;lt;nowiki&amp;gt;Possible future performance improvement: sort updates/deletes by ctid&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow one transaction to see tuples using the snapshot of another transaction&lt;br /&gt;
|This would assist multiple backends in working together. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00400.php &amp;lt;nowiki&amp;gt;Transaction Snapshot Cloning&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00135.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00260.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00466.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-08/msg00684.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider decreasing the I/O caused by updating tuple hint bits&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00847.php &amp;lt;nowiki&amp;gt;Hint Bits and Write I/O&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00199.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Hint Bits and Write I/O&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg00695.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00792.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg01063.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01408.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01453.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid the requirement of freezing pages that are infrequently modified &lt;br /&gt;
|If all rows on a page are visible, it is possible to set a bit in the visibility map (once the visibility map is 100% reliable) and not need to freeze the page, avoiding a page rewrite&lt;br /&gt;
*  http://archives.postgresql.org/message-id/4BF701CF.2090205@agliodbs.com&lt;br /&gt;
*  http://archives.postgresql.org/pgsql-hackers/2010-06/msg00082.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid reading in b-tree pages when replaying vacuum records in hot standby mode&lt;br /&gt;
* [http://archives.postgresql.org/message-id/1272571938.4161.14739.camel@ebony &amp;lt;nowiki&amp;gt;Hot Standby tuning for btree_xlog_vacuum()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Restructure truncation logic to be more resistant to failure&lt;br /&gt;
|This also involves not writing dirty buffers for a truncated or dropped relation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01032.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider adding logic to increase large tables by more than 8k&lt;br /&gt;
|This would reduce file system fragmentation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-03/msg00337.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Other ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Deal with encoding issues for filenames in the server filesystem&lt;br /&gt;
* {{MessageLink|20090413184335.39BE.52131E4D@oss.ntt.co.jp|a proposed patch here}}&lt;br /&gt;
* {{MessageLink|8484.1244655656@sss.pgh.pa.us|some issues about it here}}&lt;br /&gt;
* {{MessageLink|20100107103740.97A5.52131E4D@oss.ntt.co.jp|Windows-specific patch here}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Deal with encoding issues in the output of localeconv()&lt;br /&gt;
* [http://archives.postgresql.org/message-id/40c6d9160904210658y590377cfw6dbbecb53d2b8be0@mail.gmail.com bug report]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/49EF8DA0.90008@tpf.co.jp draft patch]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/21710.1243620986@sss.pgh.pa.us review of patch]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide schema name and other fields available from SQL GET DIAGNOSTICS in error reports&lt;br /&gt;
* [http://archives.postgresql.org/message-id/dcc563d10810211907n3c59a920ia9eb7cd2a6d5ea58@mail.gmail.com &amp;lt;nowiki&amp;gt;How to get schema name which violates fk constraint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg00846.php &amp;lt;nowiki&amp;gt;patch - Report the schema along table name in a referential failure 	error message&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* {{MessageLink|3191.1263306359@sss.pgh.pa.us|Re: NOT NULL violation and error-message}}&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg00213.php &amp;lt;nowiki&amp;gt;the case for machine-readable error fields&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
| Provide [http://developer.postgresql.org/pgdocs/postgres/libpq-connect.html#LIBPQ-CONNECT-FALLBACK-APPLICATION-NAME fallback_application_name] in contrib/pgbench, oid2name, and dblink.&lt;br /&gt;
* {{MessageLink|w2g9837222c1004070216u3bc46b3ahbddfdffdbfb46212@mail.gmail.com|fallback_application_name and pgbench}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add 64-bit support to /contrib/pgbench&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-07/msg00153.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg00705.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Add use of 'const' for variables in source tree&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-11/msg00473.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Remove warnings created by -Wcast-align}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move platform-specific ps status display info from ps_status.c to ports}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add optional CRC checksum to heap and index pages&lt;br /&gt;
|One difficulty is how to prevent hint bit changes from affecting the computed CRC checksum.&lt;br /&gt;
* http://archives.postgresql.org/message-id/19934.1226601952%40sss.pgh.pa.us&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00002.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01028.php &amp;lt;nowiki&amp;gt;double-buffering page writes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00524.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01101.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00011.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00249.php&lt;br /&gt;
* http://archives.postgresql.org/message-id/20111221215913.GA4536@fetter.org&lt;br /&gt;
* http://archives.postgresql.org/message-id/CA+U5nMJzQyxcObkpNAf1SYTX-gO_Mom3O9JXHnGpxRo1kXJ7ww@mail.gmail.com&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2012-01/msg00128.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2012-01/msg00113.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2012-02/msg00172.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2012-03/msg00001.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2012-03/msg00188.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a faster CRC32 algorithm&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01112.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow cross-compiling by generating the zic database on the target system}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve NLS maintenance of libpgport messages linked onto applications}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Use UTF8 encoding for NLS messages so all server encodings can read them properly}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow creation of universal binaries for Darwin&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00884.php &amp;lt;nowiki&amp;gt;Getting to universal binaries for Darwin&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider GnuTLS if OpenSSL license becomes a problem&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg00892.php&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-05/msg00040.php &amp;lt;nowiki&amp;gt;[PATCH] Add support for GnuTLS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg01213.php &amp;lt;nowiki&amp;gt;TODO: GNU TLS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider making NAMEDATALEN more configurable in future releases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Research use of signals and sleep wake ups&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00003.php &amp;lt;nowiki&amp;gt;Restartable signals 'n all that&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow C++ code to more easily access backend code&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00302.php &amp;lt;nowiki&amp;gt;Mostly Harmless: Welcoming our C++ friends&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider simplifying how memory context resets handle child contexts&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-08/msg00067.php &amp;lt;nowiki&amp;gt;Re: Memory leak in nodeAgg&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create three versions of libpgport to simplify client code&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00154.php &amp;lt;nowiki&amp;gt;8.4 TODO item: make src/port support libpq and ecpg directly&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve detection of shared memory segments being used by others by checking the SysV shared memory field 'nattch'&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00656.php &amp;lt;nowiki&amp;gt;postgresql in FreeBSD jails: proposal&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00673.php &amp;lt;nowiki&amp;gt;Re: postgresql in FreeBSD jails: proposal&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement the non-threaded Avahi service discovery protocol&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00939.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-02/msg00097.php &amp;lt;nowiki&amp;gt;Re: Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg01211.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-04/msg00001.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce data row alignment requirements on some 64-bit systems&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00369.php &amp;lt;nowiki&amp;gt;[WIP] Reduce alignment requirements on 64-bit systems.&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Restructure TOAST internal storage format for greater flexibility&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00049.php &amp;lt;nowiki&amp;gt;Re: PG_PAGE_LAYOUT_VERSION 5 - time for change&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Add regression tests for pg_dump/restore&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01967.php &amp;lt;nowiki&amp;gt;&amp;quot;make install-check-pg_dump&amp;quot; target in src/regress]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Research different memory allocation methods for lists&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg01467.php &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Consider removing the attribute options cache&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00039.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Restructure /contrib section&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00705.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== /contrib/pg_upgrade ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Handle large object comments&lt;br /&gt;
|This is difficult to do because the large object doesn't exist when --schema-only is loaded.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using pg_depend for checking object usage in version.c&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|If reindex is necessary, allow it to be done in parallel with pg_dump custom format&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Migrate pg_statistic by dumping it out as a flat file, so analyze is not necessary&lt;br /&gt;
|pg_class.oid is not preserved so schema.tablename must be used.&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CAAZKuFaWdLkK8eozSAooZBets9y_mfo2HS6urPAKXEPbd-JLCA@mail.gmail.com pg_upgrade and statistics]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve testing, perhaps using the buildfarm&lt;br /&gt;
|The buildfarm has access to multiple versions of PostgreSQL.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create machine-readable output of pg_controldata&lt;br /&gt;
|This would avoid parsing its output.  The problem is we need pg_controldata output from both the old and new clusters so we would need to support both formats.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Remove configure.in check for link failure when cause is found}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Remove readdir() errno patch when runtime/mingwex/dirent.c rev 1.4 is released}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow psql to use readline once non-US code pages work with backslashes}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem with shared memory on the Win32 Terminal Server}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve signal handling&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2005-06/msg00027.php &amp;lt;nowiki&amp;gt;Simplify Win32 Signaling code&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Convert MSVC build system to remove most batch files&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00961.php &amp;lt;nowiki&amp;gt;MSVC build system&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support pgxs when using MSVC}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix MSVC NLS support, like for to_char()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00485.php &amp;lt;nowiki&amp;gt;NLS on MSVC  strikes back!&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-02/msg00038.php &amp;lt;nowiki&amp;gt;Fix for 8.3 MSVC locale (Was  [HACKERS] NLS on MSVC strikes back!)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Find a correct rint() substitute on Windows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00808.php &amp;lt;nowiki&amp;gt;Minor bug in src/port/rint.c&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix global namespace issues when using multiple terminal server sessions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/48F3BFCC.8030107@dunslane.net problems with Windows global namespace]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change from the current autoconf/gmake build system to cmake&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01869.php &amp;lt;nowiki&amp;gt;About CMake (was Re: [COMMITTERS] pgsql: Append major version number and for libraries soname major)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve consistency of path separator usage&lt;br /&gt;
* http://archives.postgresql.org/message-id/49C0BDC5.4010002@hagander.net&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix cross-compiling on Windows&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2010-10/msg00110.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow multiple Postgres clusters running on the same machine to distinguish themselves in the event log&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01297.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00574.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Wire Protocol Changes ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow dynamic character set handling}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add decoded type, length, precision}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Mark result columns as known-not-null when possible&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-11/msg01029.php &amp;lt;nowiki&amp;gt;Adding nullable indicator to Describe&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide more control over planner treatment of statements being prepared}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Use compression?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Update clients to use data types, typmod, schema.table.column names of result sets using new statement protocol}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Set protocol for wire format negotiation&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CACMqXCKkGrGXxQhjHCKCe0B8hn6sTt-1sdgHZOSGQMxrusOsQA@mail.gmail.com GUC_REPORT for protocol tunables]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make sure upgrading to a 4.1 protocol version will actually work smoothly&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28307.1318255008@sss.pgh.pa.us Re: libpq, PQdescribePrepared -&amp;gt; PQftype, PQfmod, no PQnullable]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Convert single quotes to apostrophes in the PDF documentation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2007-12/msg00059.php &amp;lt;nowiki&amp;gt;SGML docs and pdf single-quotes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a manpage for postgresql.conf&lt;br /&gt;
* {{messageLink|20080819194311.GH4428@alvh.no-ip.org|A smaller default postgresql.conf}}&lt;br /&gt;
* {{messageLink|200808211910.37524.peter_e@gmx.net|A smaller default postgresql.conf}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change the manpage-generating toolchain to use the new XML-based docbook2x tools&lt;br /&gt;
* {{messageLink|200808211910.37524.peter_e@gmx.net|A smaller default postgresql.conf}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider changing documentation format from SGML to XML&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2006-12/msg00152.php &amp;lt;nowiki&amp;gt;Re: Authoring Tools WAS: Switching to XML&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-docs/2011-04/msg00020.php&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Switching_PostgreSQL_documentation_from_SGML_to_XML&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Document support for N&amp;lt;nowiki&amp;gt;' '&amp;lt;/nowiki&amp;gt; national character string literals, if it matches the SQL standard&lt;br /&gt;
* http://archives.postgresql.org/message-id/1275895438.1849.1.camel@fsopti579.F-Secure.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add diagrams to the documentation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-docs/2010-07/msg00001.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Exotic Features ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add pre-parsing phase that converts non-ISO syntax to supported syntax&lt;br /&gt;
|This could allow SQL written for other databases to run without modification.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow plug-in modules to emulate features from other databases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add features of Oracle-style packages&lt;br /&gt;
|A package would be a schema with session-local variables, public/private functions, and initialization functions.  It is also possible to implement these capabilities in any schema and not use a separate &amp;amp;quot;packages&amp;amp;quot; syntax at all.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-08/msg00384.php &amp;lt;nowiki&amp;gt;proposal for PL packages for 8.3.&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider allowing control of upper/lower case folding of unquoted identifiers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-04/msg00818.php &amp;lt;nowiki&amp;gt;Bringing PostgreSQL torwards the standard regarding case folding&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg01527.php &amp;lt;nowiki&amp;gt;Re: [SQL] Case Preservation disregarding case sensitivity?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00849.php &amp;lt;nowiki&amp;gt;TODO Item: Consider allowing control of upper/lower case folding of unquoted,  identifiers&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00415.php &amp;lt;nowiki&amp;gt;Identifier case folding notes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00415.php &amp;lt;nowiki&amp;gt;Identifier case folding notes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add autonomous transactions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00893.php &amp;lt;nowiki&amp;gt;autonomous transactions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Give query progress indication&lt;br /&gt;
* [[Query progress indication]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rethink our type system&lt;br /&gt;
* [[Rethinking datatypes]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Features We Do ''Not'' Want ==&lt;br /&gt;
&lt;br /&gt;
The following features have been discussed ad nauseum on the PostgreSQL mailing lists and the consensus has been that the project is not interested in them.  As such, if you are going to bring them up as potential features, you will want to be familiar with all of the arguments against these features which have been previously made over the years.  If you decide to work on such features anyway, you should be aware that you face a higher-than-normal barrier to get the Project to accept them.&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|All backends running as threads in a single process (not wanted)&lt;br /&gt;
|This eliminates the process protection we get from the current setup. Thread creation is usually the same overhead as process creation on modern systems, so it seems unwise to use a pure threaded model, and MySQL and DB2 have demonstrated that threads introduce as many issues as they solve.  Threading specific operations such as I/O, seq scans, and connection management has been discussed and will probably be implemented to enable specific performance features.  Moving to a threaded engine would also require halting all other work on PostgreSQL for one to two years.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;quot;Oracle-style&amp;quot; optimizer hints (not wanted)&lt;br /&gt;
|Optimizer hints, as implemented in Oracle and other RDBMSes, are used to work around problems in the optimizer and introduce upgrade and maintenance issues.  We would rather have such problems reported and fixed.  We have discussed a more sophisticated system of per-class cost adjustment instead, but a specification remains to be developed. See [[OptimizerHintsDiscussion|Optimizer Hints Discussion]] for further information.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Embedded server (not wanted)&lt;br /&gt;
|While PostgreSQL clients runs fine in limited-resource environments, the server requires multiple processes and a stable pool of resources to run reliably and efficiently. Stripping down the PostgreSQL server to run in the same process address space as the client application would add too much complexity and failure cases. Besides, there are several very mature embedded SQL databases already available.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Obfuscated function source code (not wanted)&lt;br /&gt;
|Obfuscating function source code has minimal protective benefits because anyone with super-user access can find a way to view the code. At the same time, it would greatly complicate backups and other administrative tasks. To prevent non-super-users from viewing function source code, remove SELECT permission on pg_proc.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-09/msg00668.php &amp;lt;nowiki&amp;gt;Obfuscated stored procedures (was Re: Oracle and Postgresql)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Indeterminate behavior for the GROUP BY clause (not wanted)&lt;br /&gt;
|At least one other database product allows specification of a subset of the result columns which GROUP BY would need to be able to provide predictable results; the server is free to return any value from the group.  This is not viewed as a desirable feature.  PostgreSQL 9.1 allows result columns that are not referenced by GROUP BY if a primary key for the same table is referenced in GROUP BY.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-03/msg00297.php &amp;lt;nowiki&amp;gt;Re: SQL compatibility reminder: MySQL vs PostgreSQL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Todo]]&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/Todo</id>
		<title>Todo</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/Todo"/>
				<updated>2012-02-22T23:43:54Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;Add: Run check constraints only when affected columns are changed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;margin: 1ex 1em; float: right;&amp;quot;&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This list contains '''all known PostgreSQL bugs and feature requests'''. If you would like to work on an item, please read the [[Developer FAQ]] first. There is also a [[Development_information|development information page]].&lt;br /&gt;
&lt;br /&gt;
* {{TodoPending}} - marks ordinary, incomplete items&lt;br /&gt;
* {{TodoEasy}} - marks items that are easier to implement&lt;br /&gt;
* {{TodoDone}} - marks changes that are done, and will appear in the PostgreSQL 9.2 release.&lt;br /&gt;
&lt;br /&gt;
For help on editing this list, please see [[Talk:Todo]]. &amp;lt;b&amp;gt;Please do not add items here without discussion on the mailing list.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 1ex 4em;&amp;quot;&amp;gt;&lt;br /&gt;
== Administration ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow administrators to cancel multi-statement idle transactions&lt;br /&gt;
|This allows locks to be released, but it is complex to report the cancellation back to the client.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01340.php &amp;lt;nowiki&amp;gt;Cancelling idle in transaction state&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00441.php &amp;lt;nowiki&amp;gt;Re: Cancelling idle in transaction state&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Check for unreferenced table files created by transactions that were in-progress when the server terminated abruptly&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00096.php &amp;lt;nowiki&amp;gt;Removing unreferenced files&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Set proper permissions on non-system schemas during db creation&lt;br /&gt;
|Currently all schemas are owned by the super-user because they are copied from the template1 database.  However, since all objects are inherited from the template database, it is not clear that setting schemas to the db owner is correct.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow log_min_messages to be specified on a per-module basis&lt;br /&gt;
|This would allow administrators to see more detailed information from specific sections of the backend, e.g. checkpoints, autovacuum, etc. Another idea is to allow separate configuration files for each module, or allow arbitrary SET commands to be passed to them. See also [[Logging Brainstorm]].}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Simplify creation of partitioned tables&lt;br /&gt;
|This would allow creation of partitioned tables without requiring creation of triggers or rules for INSERT/UPDATE/DELETE, and constraints for rapid partition selection.  Options could include range and hash partition selection. See also [[Table partitioning]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow custom variables to appear in pg_settings()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00850.php &amp;lt;nowiki&amp;gt;Re: count(*) performance improvement ideas&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have custom variables be transaction-safe&lt;br /&gt;
* {{MessageLink|4B577E9F.8000505@dunslane.net|Custom GUCs still a bit broken}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement the SQL-standard mechanism whereby REVOKE ROLE revokes only the privilege granted by the invoking role, and not those granted by other roles&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-05/msg00010.php &amp;lt;nowiki&amp;gt;Re: Grantor name gets lost when grantor role dropped&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent query cancel packets from being replayed by an attacker, especially when using SSL&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg00345.php &amp;lt;nowiki&amp;gt;Replay attack of query cancel&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a way to query the log collector subprocess to determine the name of the currently active log file&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-11/msg00418.php &amp;lt;nowiki&amp;gt;Current log files when rotating?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow simpler reporting of the unix domain socket directory and allow easier configuration of its default location&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg01555.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-10/msg01482.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow custom daemons to be automatically stopped/started along with the postmaster&lt;br /&gt;
|This allows easier administration of daemons like user job schedulers or replication-related daemons.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01701.php &amp;lt;nowiki&amp;gt;Re: scheduler in core&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve logging of prepared transactions recovered during startup&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg00092.php &amp;lt;nowiki&amp;gt;&amp;amp;quot;recovering prepared transaction&amp;amp;quot; after server restart message&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using POSIX shared memory to avoid System V shared memory kernel limits&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4DFA2673.3010009@enterprisedb.com &amp;lt;nowiki&amp;gt;POSIX shared memory patch status&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Address problem where superusers are assumed to be members of all groups&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00337.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Configuration files ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Change pg_ident.conf parsing to be the same as pg_hba.conf&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg02204.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow postgresql.conf file values to be changed via an SQL API, perhaps using SET GLOBAL&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg00764.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider normalizing fractions in postgresql.conf, perhaps using '%'&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00550.php &amp;lt;nowiki&amp;gt;Fractions in GUC variables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow Kerberos to disable stripping of realms so we can check the username@realm against multiple realms&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00009.php &amp;lt;nowiki&amp;gt;krb_match_realm patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve LDAP authentication configuration options&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01745.php &amp;lt;nowiki&amp;gt;Proposed Patch - LDAPS support for servers on port 636 w/o TLS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add external tool to auto-tune some postgresql.conf parameters&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00000.php &amp;lt;nowiki&amp;gt;Re: Overhauling GUCS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00033.php &amp;lt;nowiki&amp;gt;Simple postgresql.conf wizard&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add 'hostgss' pg_hba.conf option to allow GSS link-level encryption&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg01454.php &amp;lt;nowiki&amp;gt;Re: Plans for 8.4&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Process pg_hba.conf keywords as case-insensitive&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00432.php &amp;lt;nowiki&amp;gt;More robust pg_hba.conf parsing/error logging&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create utility to compute accurate random_page_cost value&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-04/msg00162.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-04/msg00362.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow configuration files to be independently validated&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01831.php&lt;br /&gt;
* http://archives.postgresql.org/message-id/12666.1310774573@sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow postgresql.conf settings to be accepted by backends even if some settings are invalid for those backends&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00330.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00375.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow all backends to receive postgresql.conf setting changes at the same time&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00330.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00375.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Tablespaces ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow a database in tablespace t1 with tables created in tablespace t2 to be used as a template for a new database created with default tablespace t2&lt;br /&gt;
|Currently all objects in the default database tablespace must have default tablespace specifications. This is because new databases are created by copying directories. If you mix default tablespace tables and tablespace-specified tables in the same directory, creating a new database from such a mixed directory would create a new database with tables that had incorrect explicit tablespaces.  To fix this would require modifying pg_class in the newly copied database, which we don't currently do.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow reporting of which objects are in which tablespaces&lt;br /&gt;
|This item is difficult because a tablespace can contain objects from multiple databases. There is a server-side function that returns the databases which use a specific tablespace, so this requires a tool that will call that function and connect to each database to find the objects in each database for that tablespace.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow WAL replay of CREATE TABLESPACE to work when the directory structure on the recovery computer is different from the original}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow per-tablespace quotas}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow tablespaces on RAM-based partitions for unlogged tables&lt;br /&gt;
* http://archives.postgresql.org/pgsql-advocacy/2011-05/msg00033.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow toast tables to be moved to a different tablespace&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00980.php&lt;br /&gt;
* {{messageLink|CAFEQCbH756DyyAPQ1ykh3+b+kE1-EhWRww1WO_x5v38C-uLnUg@mail.gmail.com|patch : Allow toast tables to be moved to a different tablespace}} (issues remain)&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CAFEQCbEq07OopgE5xFYv2Q3eMq45hRSJkjCBO+kvpJq9NEVhow@mail.gmail.com Allow toast tables to be moved to a different tablespace]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Collector ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow statistics last vacuum/analyze execution times to be displayed without requiring track_counts to be enabled&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2007-04/msg00028.php &amp;lt;nowiki&amp;gt;row-level stats and last analyze time&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Clear table counters on TRUNCATE&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg00169.php &amp;lt;nowiki&amp;gt;Small TRUNCATE glitch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== SSL ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SSL authentication/encryption over unix domain sockets&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00924.php &amp;lt;nowiki&amp;gt;Re: Spoofing as the postmaster&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SSL key file permission checks to be optionally disabled when sharing SSL keys with other applications&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00069.php &amp;lt;nowiki&amp;gt;BUG #3809: SSL &amp;amp;quot;unsafe&amp;amp;quot; private key permissions bug&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SSL CRL files to be re-read during configuration file reload, rather than requiring a server restart&lt;br /&gt;
|Unlike SSL CRT files, CRL (Certificate Revocation List) files are updated frequently&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-12/msg00832.php &amp;lt;nowiki&amp;gt;Automatic CRL reload&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
Alternatively or additionally supporting OCSP (online certificate security protocol) would provide real-time revocation discovery without reloading&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Allow automatic selection of SSL client certificates from a certificate store&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00406.php &amp;lt;nowiki&amp;gt;Allow multiple certificates or keys in the postgresql.crt/.key files&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Send the full certificate server chain to the client&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-12/msg00145.php BUG #5245: Full Server Certificate Chain Not Sent to client]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Point-In-Time Recovery (PITR) ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Create dump tool for write-ahead logs for use in determining transaction id for point-in-time recovery&lt;br /&gt;
|This is useful for checking PITR recovery.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow archive_mode to be changed without server restart?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01655.php &amp;lt;nowiki&amp;gt;Enabling archive_mode without restart&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider avoiding WAL switching via archive_timeout if there has been no database activity&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg01469.php &amp;lt;nowiki&amp;gt;archive_timeout behavior for no activity&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg00395.php &amp;lt;nowiki&amp;gt;Re: archive_timeout behavior for no activity&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Standby server mode ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Allow pg_xlogfile_name() to be used in recovery mode&lt;br /&gt;
* [http://archives.postgresql.org/message-id/3f0b79eb1001190135vd9f62f1sa7868abc1ea61d12@mail.gmail.com &amp;lt;nowiki&amp;gt;Streaming replication and pg_xlogfile_name()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Prevent variables inherited from the server environment from begin used for making streaming replication connections.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01011.php &amp;lt;nowiki&amp;gt;Re: Parameter name standby_mode&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
| Allow hot file system backups on standby servers&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01727.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01490.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Change walsender so that it applies per-role settings&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg00642.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
| Add more control over waiting for synchronous commit&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01611.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Restructure configuration parameters for standby mode&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg01820.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Allow time-delayed application of logs on the standby&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00992.php&lt;br /&gt;
}}&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Add -X parameter to pg_basebackup to specify a different directory for px_xlog, like initdb&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Data Types ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix data types where equality comparison is not intuitive, e.g. box&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-10/msg01643.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for public SYNONYMs&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00519.php &amp;lt;nowiki&amp;gt;Proposal for SYNONYMS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg02043.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-general/2010-12/msg00139.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for SQL-standard GENERATED/IDENTITY columns&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-07/msg00543.php &amp;lt;nowiki&amp;gt;Re: Three weeks left until feature freeze&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-08/msg00038.php &amp;lt;nowiki&amp;gt;GENERATED ... AS IDENTITY, Was: Re: Feature Freeze&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00344.php &amp;lt;nowiki&amp;gt;Behavior of GENERATED columns per SQL2003&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00076.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Behavior of GENERATED columns per SQL2003&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00604.php &amp;lt;nowiki&amp;gt;IDENTITY/GENERATED patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider placing all sequences in a single table, or create a system view&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php &amp;lt;nowiki&amp;gt;Re: newbie: renaming sequences task&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2012-02/msg00258.php Removing special case OID generation]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a special data type for regular expressions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg01067.php &amp;lt;nowiki&amp;gt;Why is there a tsquery data type?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce BIT data type overhead using short varlena headers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-12/msg00273.php &amp;lt;nowiki&amp;gt;storage size of &amp;amp;quot;bit&amp;amp;quot; data type..&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow renaming and deleting enumerated values from an existing enumerated data type&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support scoped IPv6 addresses in the inet type&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-05/msg00111.php &amp;lt;nowiki&amp;gt;strange problem with ip6&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Add a JSON (JavaScript Object Notation) data type&lt;br /&gt;
|This would behave similar to the XML data type, which is stored as text, but allows element lookup and conversion functions.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01494.php &amp;lt;nowiki&amp;gt;PATCH: Add hstore_to_json()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg00001.php &amp;lt;nowiki&amp;gt;Re: PATCH: Add hstore_to_json()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-03/msg01092.php &amp;lt;nowiki&amp;gt;Proposal: Add JSON support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00057.php &amp;lt;nowiki&amp;gt;Re: Proposal: Add JSON support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00481.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01694.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-12/msg00219.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Considering improving performance of computing CHAR() value lengths&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00900.php &amp;lt;nowiki&amp;gt;char() overhead on read-only workloads not so insignifcant as the docs claim it is...&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01787.php &amp;lt;nowiki&amp;gt;Re: [PATCH] backend: compare word-at-a-time in bcTruelen&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add overlaps geometric operators that ignore point overlaps&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-03/msg00861.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Add IMMUTABLE column attribute&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-11/msg00623.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Domains ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow functions defined as casts to domains to be called during casting&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-05/msg00072.php &amp;lt;nowiki&amp;gt;bug? non working casts for domain&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-09/msg01681.php &amp;lt;nowiki&amp;gt;TODO: Fix CREATE CAST on DOMAINs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow values to be cast to domain types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2003-06/msg01206.php &amp;lt;nowiki&amp;gt;Domain casting still doesn't work right&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00289.php &amp;lt;nowiki&amp;gt;domain casting?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00812.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make domains work better with polymorphic functions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4887.1228700773@sss.pgh.pa.us Polymorphic types vs. domains]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/15535.1238774571@sss.pgh.pa.us some difficulties with fixing it]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Dates and Times ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow infinite intervals just like infinite timestamps&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-11/msg00076.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Determine how to represent date/time field extraction on infinite timestamps&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CA+mi_8bda-Fnev9iXeUbnqhVaCWzbYhHkWoxPQfBca9eDPpRMw@mail.gmail.com extract(epoch from infinity) is not 0]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CADAkt-icuESH16uLOCXbR-dKpcvwtUJE4JWXnkdAjAAwP6j12g@mail.gmail.com converting between infinity timestamp and float8]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow TIMESTAMP WITH TIME ZONE to store the original timezone information, either zone name or offset from UTC&lt;br /&gt;
|If the TIMESTAMP value is stored with a time zone name, interval computations should adjust based on the time zone rules. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-10/msg00705.php &amp;lt;nowiki&amp;gt;timestamp with time zone a la sql99&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have timestamp subtraction not call justify_hours()?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-sql/2006-10/msg00059.php &amp;lt;nowiki&amp;gt;timestamp subtraction (was Re: formatting intervals with to_char)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve TIMESTAMP WITH TIME ZONE subtraction to be DST-aware&lt;br /&gt;
|Currently subtracting one date from another that crosses a daylight savings time adjustment can return '1 day 1 hour', but adding that back to the first date returns a time one hour in the future.  This is caused by the adjustment of '25 hours' to '1 day 1 hour', and '1 day' is the same time the next day, even if daylight savings adjustments are involved.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix interval display to support values exceeding 2^31 hours}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add overflow checking to timestamp and interval arithmetic}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add function to allow the creation of timestamps using parameters&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-06/msg00232.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Arrays ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for arrays of domains&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00114.php &amp;lt;nowiki&amp;gt;Re: updated WIP: arrays of composites&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow single-byte header storage for array elements}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add function to detect if an array is empty&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00475.php &amp;lt;nowiki&amp;gt;Re: array_length()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of empty arrays&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01033.php &amp;lt;nowiki&amp;gt;So what's an &amp;amp;quot;empty&amp;amp;quot; array anyway?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of NULLs in arrays&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-11/msg00009.php &amp;lt;nowiki&amp;gt;BUG #4509: array_cat's null behaviour is inconsistent&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg01040.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Binary Data ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve vacuum of large objects, like contrib/vacuumlo?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Auto-delete large objects when referencing row is deleted&lt;br /&gt;
|contrib/lo offers this functionality.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow read/write into TOAST values like large objects&lt;br /&gt;
|Writing might require the TOAST column to be stored EXTERNAL.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00049.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add API for 64-bit large object access&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-09/msg00781.php &amp;lt;nowiki&amp;gt;64-bit API for large objects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg01790.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== MONEY Data Type ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add locale-aware MONEY type, and support multiple currencies&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2005-08/msg01432.php &amp;lt;nowiki&amp;gt;A real currency type&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01181.php &amp;lt;nowiki&amp;gt;Money type todos?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|MONEY dumps in a locale-specific format making it difficult to restore to a system with a different locale}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Text Search ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow dictionaries to change the token that is passed on to later dictionaries&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-11/msg00081.php &amp;lt;nowiki&amp;gt;a tsearch2 (8.2.4) dictionary that only filters out stopwords&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a function-based API for '@@' searches&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00511.php &amp;lt;nowiki&amp;gt;Simplifying Text Search&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve text search error messages&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00966.php &amp;lt;nowiki&amp;gt;Poorly designed tsearch NOTICEs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg01146.php &amp;lt;nowiki&amp;gt;Re: Poorly designed tsearch NOTICEs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider changing error to warning for strings larger than one megabyte&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-02/msg00190.php &amp;lt;nowiki&amp;gt;BUG #3975: tsearch2 index should not bomb out of 1Mb limit&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-03/msg00062.php &amp;lt;nowiki&amp;gt;Re: [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|tsearch and tsdicts regression tests fail in Turkish locale on glibc&lt;br /&gt;
* [http://archives.postgresql.org/message-id/49749645.5070801@gmx.net tsearch with Turkish locale]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|tsquery negator operator treated as part of lexeme&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-06/msg00346.php BUG #4887: inclusion operator (@&amp;gt;) on tsqeries behaves not conforming to documentation]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of dash and plus signs in email address user names, and perhaps improve URL parsing&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg00772.php&lt;br /&gt;
* [http://archives.postgresql.org/message-id/E1Ri8il-0008Ct-9p@wrigleys.postgresql.org tsearch does not recognize all valid emails]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve default parser, to more easily allow adding new tokens&lt;br /&gt;
* http://archives.postgresql.org/message-id/23485.1297727826@sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add additional support functions&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00319.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== XML ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow XML arrays to be cast to other data types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00981.php &amp;lt;nowiki&amp;gt;proposal casting from XML[] to int[], numeric[], text[]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00231.php &amp;lt;nowiki&amp;gt;Re: proposal casting from XML[] to int[], numeric[], text[]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00471.php &amp;lt;nowiki&amp;gt;Re: proposal casting from XML[] to int[], numeric[], text[]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add XML Schema validation and xmlvalidate functions (SQL:2008)}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add xmlvalidatedtd variant to support validating against a DTD?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Relax-NG validation; libxml2 supports this already}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow reliable XML operation non-UTF8 server encodings (xpath(), in particular, is known to not work)&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-01/msg00135.php &amp;lt;nowiki&amp;gt;BUG #4622: xpath only work in utf-8 server encoding&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
* http://archives.postgresql.org/message-id/4110.1238973350@sss.pgh.pa.us}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add functions from SQL:2006: XMLDOCUMENT, XMLCAST, XMLTEXT}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add XMLNAMESPACES support in XMLELEMENT and elsewhere}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move XSLT from contrib/xml2 to a more reasonable location&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg00539.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Report errors returned by the XSLT library&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg00562.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve the XSLT parameter passing API&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg00416.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|XML Canonical: Convert XML documents to canonical form to compare them. libxml2 has support for this.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add pretty-printed XML output option&lt;br /&gt;
|Parse a document and serialize it back in some indented form. libxml2 might support this.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add XMLQUERY (from the SQL/XML standard)}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow XML sthredding&lt;br /&gt;
|In some cases shredding could be better option (if there is no need to keep XML docs entirely, e.g. if we have already developed tools that understand only relational data.  This would be a separate module that implements annotated schema decomposition technique, similar to DB2 and SQL Server functionality.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix Nested or repeated xpath() that apparently mess up namespaces [http://archives.postgresql.org/pgsql-bugs/2008-03/msg00097.php] [http://archives.postgresql.org/pgsql-bugs/2008-03/msg00144.php] [http://archives.postgresql.org/pgsql-general/2008-03/msg00295.php] [http://archives.postgresql.org/pgsql-bugs/2008-07/msg00054.php] [http://archives.postgresql.org/message-id/004f01c90e91$138e9d10$3aabd730$@anstett@iaas.uni-stuttgart.de]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|XPath: Adding the &amp;lt;x&amp;gt; at the root causes problems [http://archives.postgresql.org/pgsql-bugs/2008-05/msg00184.php] [http://archives.postgresql.org/pgsql-bugs/2008-07/msg00054.php] [http://archives.postgresql.org/pgsql-general/2008-07/msg00613.php]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|xpath_table needs to be implemented/implementable to get rid of contrib/xml2 [http://archives.postgresql.org/pgsql-general/2008-05/msg00823.php]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|xpath_table is pretty broken anyway [http://archives.postgresql.org/pgsql-hackers/2010-02/msg02424.php]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|better handling of XPath data types [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00616.php] [http://archives.postgresql.org/message-id/004a01c90e90$4b986d90$e2c948b0$@anstett@iaas.uni-stuttgart.de]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of PIs and DTDs in xmlconcat() [http://archives.postgresql.org/message-id/200904211211.n3LCB09p008988@wwwmaster.postgresql.org]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Restructure XML and /contrib/xml2 functionality&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02314.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00017.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow INET subnet comparisons using non-constants to be indexed}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add an INET overlaps operator, for use by exclusion constraints &lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-03/msg00845.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Enforce typmod for function inputs, function results and parameters for spi_prepare'd statements called from PLs&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg01403.php &amp;lt;nowiki&amp;gt;Re: BUG #2917: spi_prepare doesn't accept typename aliases&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg01160.php &amp;lt;nowiki&amp;gt;RFC for adding typmods to functions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix IS OF so it matches the ISO specification, and add documentation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2003-08/msg00060.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] IS OF&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00060.php &amp;lt;nowiki&amp;gt;ToDo: add documentation for operator IS OF&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement Boyer-Moore searching in LIKE queries&lt;br /&gt;
* {{messageLink|27645.1220635769@sss.pgh.pa.us|TODO item: Implement Boyer-Moore searching (First time hacker)}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent malicious functions from being executed with the permissions of unsuspecting users&lt;br /&gt;
|Index functions are safe, so VACUUM and ANALYZE are safe too.  Triggers, CHECK and DEFAULT expressions, and rules are still vulnerable. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00268.php &amp;lt;nowiki&amp;gt;Some notes about the index-functions security vulnerability&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce memory usage of aggregates in set returning functions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2008-01/msg00031.php &amp;lt;nowiki&amp;gt;Re: Performance of aggregates over set-returning functions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix /contrib/ltree operator&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-11/msg00044.php &amp;lt;nowiki&amp;gt;BUG #3720: wrong results at using ltree&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix /contrib/btree_gist's implementation of inet indexing&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2010-10/msg00099.php &amp;lt;nowiki&amp;gt;BUG #5705: btree_gist: Index on inet changes query result&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Fix inconsistent precedence of =, &amp;amp;gt;, and &amp;amp;lt; compared to &amp;amp;lt;&amp;amp;gt;, &amp;amp;gt;=, and &amp;amp;lt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00145.php &amp;lt;nowiki&amp;gt;BUG #3822: Nonstandard precedence for comparison operators&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix regular expression bug when using complex back-references&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00000.php &amp;lt;nowiki&amp;gt;BUG #3645: regular expression back references seem broken&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have /contrib/dblink reuse unnamed connections&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00895.php &amp;lt;nowiki&amp;gt;dblink un-named connection doesn't get re-used&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve formatting of pg_get_viewdef() output&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg01648.php &amp;lt;nowiki&amp;gt;pg_get_viewdef formattiing&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01885.php &amp;lt;nowiki&amp;gt;Re: pretty print viewdefs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-12/msg00906.php reprise: pretty print viewdefs]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add function to dump pg_depend information cleanly&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00226.php &amp;lt;nowiki&amp;gt;Elementary dependency look-up&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Improve relation size functions such as pg_relation_size() to avoid producing an error when called against a no longer visible relation&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28488.1286461610@sss.pgh.pa.us pg_relation_size / could not open relation with OID #]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Character Formatting ===&lt;br /&gt;
&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow to_date() and to_timestamp() to accept localized month names}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add missing parameter handling in to_char()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-12/msg00948.php &amp;lt;nowiki&amp;gt;Re: to_char and i18n&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Throw an error from to_char() instead of printing a string of &amp;quot;#&amp;quot; when a number doesn't fit in the desired output format.&lt;br /&gt;
* discussed in [http://archives.postgresql.org/message-id/37ed240d0907290836w42187222n18664dfcbcb445b1@mail.gmail.com &amp;quot;to_char, support for EEEE format&amp;quot;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow to_char() on interval values to accumulate the highest unit requested&lt;br /&gt;
|2= Some special format flag would be required to request such accumulation.  Such functionality could also be added to EXTRACT. Prevent accumulation that crosses the month/day boundary because of the uneven number of days in a month.&lt;br /&gt;
* to_char(INTERVAL '1 hour 5 minutes', 'MI') =&amp;amp;gt; 65&lt;br /&gt;
* to_char(INTERVAL '43 hours 20 minutes', 'MI' ) =&amp;amp;gt; 2600&lt;br /&gt;
* to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') =&amp;amp;gt; 0:1:19:20&lt;br /&gt;
* to_char(INTERVAL '3 years 5 months','MM') =&amp;amp;gt; 41&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix to_number() handling for values not matching the format string&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg01447.php &amp;lt;nowiki&amp;gt;Re: numeric_to_number() function skipping some digits&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Multi-Language Support ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add NCHAR (as distinguished from ordinary varchar),}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a cares-about-collation column to pg_proc, so that unresolved-collation errors can be thrown at parse time&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-03/msg01520.php &amp;lt;nowiki&amp;gt;Open issues for collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Integrate collations with text search configurations&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28887.1303579034@sss.pgh.pa.us &amp;lt;nowiki&amp;gt;Some TODO items for collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Integrate collations with to_char() and related functions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28887.1303579034@sss.pgh.pa.us &amp;lt;nowiki&amp;gt;Some TODO items for collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support collation-sensitive equality and hashing functions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-06/msg00472.php &amp;lt;nowiki&amp;gt; contrib/citext versus collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a LOCALE option to CREATE DATABASE, as a shorthand&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00119.php &amp;lt;nowiki&amp;gt; Re: 8.4 open items list&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support multiple simultaneous character sets, per SQL:2008}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve UTF8 combined character handling?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add octet_length_server() and octet_length_client()}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make octet_length_client() the same as octet_length()?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problems with wrong runtime encoding conversion for NLS message files}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add URL to more complete multi-byte regression tests&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-07/msg00272.php &amp;lt;nowiki&amp;gt;Multi-byte and client side character encoding tests for copy command..&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix contrib/fuzzystrmatch to work with multibyte encodings&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-04/msg00047.php &amp;lt;nowiki&amp;gt; soundex function returns UTF-16 characters&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00138.php &amp;lt;nowiki&amp;gt; dmetaphone woes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change memory allocation for multi-byte functions so memory is allocated inside conversion functions&lt;br /&gt;
|Currently we preallocate memory based on worst-case usage.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ability to use case-insensitive regular expressions on multi-byte characters&lt;br /&gt;
|Currently it works for UTF-8, but not other multi-byte encodings&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00433.php &amp;lt;nowiki&amp;gt;Regexps vs. locale&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* {{MessageLink|20091201210024.B1393753FB7@cvs.postgresql.org|A partial solution for UTF-8}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve encoding of connection startup messages sent to the client&lt;br /&gt;
|Currently some authentication error messages are sent in the server encoding&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-12/msg00801.php &amp;lt;nowiki&amp;gt;encoding of PostgreSQL messages&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2009-01/msg00005.php &amp;lt;nowiki&amp;gt;Re: encoding of PostgreSQL messages&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|More sensible support for Unicode combining characters, normal forms&lt;br /&gt;
* http://archives.postgresql.org/message-id/200904141532.44618.peter_e@gmx.net&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Views / Rules ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Automatically create rules on views so they are updateable, per SQL:2008&lt;br /&gt;
|We can only auto-create rules for simple views.  For more complex cases users will still have to write rules manually.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00586.php &amp;lt;nowiki&amp;gt;Proposal for updatable views&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-08/msg00255.php &amp;lt;nowiki&amp;gt;Updatable views&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg01746.php &amp;lt;nowiki&amp;gt;Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Updatable_views&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add the functionality of the WITH CHECK OPTION clause to CREATE VIEW}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow VIEW/RULE recompilation when the underlying tables change&lt;br /&gt;
|This is both difficult and controversial.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01723.php Re: About &amp;quot;Allow VIEW/RULE recompilation when the underlying tables change&amp;quot;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01724.php Re: About &amp;quot;Allow VIEW/RULE recompilation when the underlying tables change&amp;quot;]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CACk=U9NFSzWrEba8G5dZ=TZLy3_hx3QXGyCcKVWT=4iA1FjMuA@mail.gmail.com VIEW still referring to old name of field]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make it possible to use RETURNING together with conditional DO INSTEAD rules, such as for partitioning setups&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00577.php &amp;lt;nowiki&amp;gt;RETURNING and DO INSTEAD ... Intentional or not?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add the ability to automatically create materialized views&lt;br /&gt;
|Right now materialized views require the user to create triggers on the main table to keep the summary table current.  SQL syntax should be able to manage the triggers and summary table automatically.  A more sophisticated implementation would automatically retrieve from the summary table when the main table is referenced, if possible.  See [[Materialized Views]] for implementation details&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00479.php &amp;lt;nowiki&amp;gt;GSoC - proposal - Materialized Views in PostgreSQL&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve ability to modify views via ALTER TABLE&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00691.php &amp;lt;nowiki&amp;gt;Re: idea: storing view source in system catalogs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg01410.php &amp;lt;nowiki&amp;gt;modifying views&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg00300.php &amp;lt;nowiki&amp;gt;Re: patch: Add columns via CREATE OR REPLACE VIEW&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Prevent low-cost functions from seeing unauthorized view rows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg01346.php &amp;lt;nowiki&amp;gt;Using views for row-level access control is leaky&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== SQL Commands ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT&lt;br /&gt;
* [http://dissipatedheat.com/2011/11/10/how-not-to-write-a-patch-for-postgresql/ How not to write this patch.]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve type determination of unknown (NULL or quoted literal) result columns for UNION/INTERSECT/EXCEPT&lt;br /&gt;
* [http://archives.postgresql.org/message-id/9799.1302719551@sss.pgh.pa.us &amp;lt;nowiki&amp;gt;UNION construct type cast gives poor error message&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00838.php &amp;lt;nowiki&amp;gt;WIP: grouping sets support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00466.php &amp;lt;nowiki&amp;gt;Implementation of GROUPING SETS (T431: Extended grouping 	capabilities)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow prepared transactions with temporary tables created and dropped in the same transaction, and when an ON COMMIT DELETE ROWS temporary table is accessed&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00047.php &amp;lt;nowiki&amp;gt;Re: &amp;amp;quot;could not open relation 1663/16384/16584: No such file or directory&amp;amp;quot; in a specific combination of transactions with temp tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/492543D5.9050904@enterprisedb.com A suggestion on how to implement this]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a GUC variable to warn about non-standard SQL usage in queries}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add SQL-standard MERGE/REPLACE/UPSERT command&lt;br /&gt;
|MERGE is typically used to merge two tables.  REPLACE or UPSERT command does UPDATE, or on failure, INSERT. See [[SQL MERGE]] for notes on the implementation details.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add NOVICE output level for helpful messages&lt;br /&gt;
|For example, have it warn about unjoined tables.  This could also control automatic sequence/index creation messages.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow NOTIFY in rules involving conditionals}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow EXPLAIN to identify tables that were skipped because of constraint_exclusion&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Simplify dropping roles that have objects in several databases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow the count returned by SELECT, etc to be represented as an int64 to allow a higher range of values}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for WITH RECURSIVE ... CYCLE&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00291.php &amp;lt;nowiki&amp;gt;WITH RECURSIVE ... CYCLE in vanilla SQL: issues with arrays of rows&amp;lt;/nowiki&amp;gt;]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add DEFAULT .. AS OWNER so permission checks are done as the table owner&lt;br /&gt;
|This would be useful for SERIAL nextval() calls and CHECK constraints.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow DISTINCT to work in multiple-argument aggregate calls}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add comments on system tables/columns using the information in catalogs.sgml&lt;br /&gt;
|Ideally the information would be pulled from the SGML file automatically.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent the specification of conflicting transaction read/write options&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00684.php &amp;lt;nowiki&amp;gt;Re: SET TRANSACTION and SQL Standard&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support LATERAL subqueries&lt;br /&gt;
|Lateral subqueries can reference columns of tables defined outside the subquery at the same level, i.e. ''laterally''.&lt;br /&gt;
For example, a LATERAL subquery in a FROM clause could reference tables defined in the same FROM clause.&lt;br /&gt;
Currently only the columns of tables defined ''above'' subqueries are recognized.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00292.php &amp;lt;nowiki&amp;gt;LATERAL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg00991.php &amp;lt;nowiki&amp;gt;Re: LATERAL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent temporary tables created with ON COMMIT DELETE ROWS from repeatedly truncating the table on every commit if the table is already empty&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00842.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-03/msg00392.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-04/msg00046.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow DELETE and UPDATE to be used with LIMIT and ORDER BY&lt;br /&gt;
* http://archives.postgresql.org/pgadmin-hackers/2010-04/msg00078.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg01997.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00021.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Improve caching of prepared query plans&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow PREPARE of cursors}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have DISCARD PLANS discard plans cached by functions&lt;br /&gt;
|DISCARD all should do the same.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00431.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid multiple-evaluation of BETWEEN and IN arguments containing volatile expressions&lt;br /&gt;
* http://archives.postgresql.org/message-id/4D95B605.2020709@enterprisedb.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix nested CASE-WHEN constructs&lt;br /&gt;
* http://archives.postgresql.org/message-id/4DDCEEB8.50602@enterprisedb.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== CREATE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow CREATE TABLE AS to determine column lengths for complex expressions like SELECT col1 || col2}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have WITH CONSTRAINTS also create constraint indexes&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-04/msg00149.php &amp;lt;nowiki&amp;gt;Re: CREATE TABLE LIKE INCLUDING INDEXES support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move NOT NULL constraint information to pg_constraint&lt;br /&gt;
|Currently NOT NULL constraints are stored in pg_attribute without any designation of their origins, e.g. primary keys.  One manifest problem is that dropping a PRIMARY KEY constraint does not remove the NOT NULL constraint designation.  Another issue is that we should probably force NOT NULL to be propagated from parent tables to children, just as CHECK constraints are.  (But then does dropping PRIMARY KEY affect children?)&lt;br /&gt;
* http://archives.postgresql.org/message-id/19768.1238680878@sss.pgh.pa.us&lt;br /&gt;
* http://archives.postgresql.org/message-id/200909181005.n8IA5Ris061239@wwwmaster.postgresql.org&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-07/msg01223.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent concurrent CREATE TABLE from sometimes returning a cryptic error message&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00169.php &amp;lt;nowiki&amp;gt;BUG #3692: Conflicting create table statements throw unexpected error&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add CREATE SCHEMA ... LIKE that copies a schema}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix CREATE OR REPLACE FUNCTION to not leave objects depending on the function in inconsistent state&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-08/msg00985.php indexes on functions and create or replace function]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow temporary tables to exist as empty by default in all sessions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00006.php &amp;lt;nowiki&amp;gt;what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg01329.php &amp;lt;nowiki&amp;gt;idea: global temp tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org//pgsql-hackers/2009-05/msg00016.php &amp;lt;nowiki&amp;gt;Re: idea: global temp tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg01098.php &amp;lt;nowiki&amp;gt;global temporary tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow the creation of &amp;quot;distinct&amp;quot; types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01647.php &amp;lt;nowiki&amp;gt;Distinct types&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider analyzing temporary tables when they are first used in a query&lt;br /&gt;
|Autovacuum cannot analyze or vacuum temporary tables.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00416.php &amp;lt;nowiki&amp;gt;autovacuum and temp tables support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow an unlogged table to be changed to logged&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00315.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00437.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00323.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00237.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== UPDATE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Allow UPDATE tab SET ROW (col, ...) = (SELECT...)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-07/msg01308.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] extension for sql update&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00865.php &amp;lt;nowiki&amp;gt;UPDATE using sub selects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-04/msg00315.php &amp;lt;nowiki&amp;gt;UPDATE using sub selects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-03/msg00237.php &amp;lt;nowiki&amp;gt;Re: UPDATE using sub selects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Research self-referential UPDATEs that see inconsistent row versions in read-committed mode&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00507.php &amp;lt;nowiki&amp;gt;Concurrently updating an updatable view&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00016.php &amp;lt;nowiki&amp;gt;Re: Do we need a TODO? (was Re: Concurrently updating anupdatable view)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve performance of EvalPlanQual mechanism that rechecks already-updated rows&lt;br /&gt;
|This is related to the previous item, which questions whether it even has the right semantics&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-09/msg00045.php &amp;lt;nowiki&amp;gt;BUG #4401: concurrent updates to a table blocks one update indefinitely&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-07/msg00302.php &amp;lt;nowiki&amp;gt;BUG #4945: Parallel update(s) gone wild&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== ALTER ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have ALTER TABLE RENAME of a SERIAL column rename the sequence&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php &amp;lt;nowiki&amp;gt;Re: newbie: renaming sequences task&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CADLWmXUV4LbLhMZL8rYMhCy72aZZLB5BSARPQVgoX0BrxA0FFg@mail.gmail.com renaming implicit sequences]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have ALTER SEQUENCE RENAME rename the sequence name stored in the sequence table&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-09/msg00092.php &amp;lt;nowiki&amp;gt;BUG #3619: Renaming sequence does not update its 'sequence_name' field&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00007.php &amp;lt;nowiki&amp;gt;Re: BUG #3619: Renaming sequence does not update its 'sequence_name' field&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php &amp;lt;nowiki&amp;gt;Re: newbie: renaming sequences task&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME or ALTER TABLE RENAME CONSTRAINT&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-02/msg00168.php &amp;lt;nowiki&amp;gt;ALTER CONSTRAINT RENAME patch reverted&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ALTER DOMAIN to modify the underlying data type}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow ALTER TABLESPACE to move the tablespace to different directories}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow moving system tables to other tablespaces, where possible&lt;br /&gt;
|Currently non-global system tables must be in the default database tablespace. Global system tables can never be moved.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have ALTER INDEX update the name of a constraint using that index}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow column display reordering by recording a display, storage, and permanent id for every column?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00782.php &amp;lt;nowiki&amp;gt;Re: column ordering, was Re: [PATCHES] Enums patch v2&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg01029.php &amp;lt;nowiki&amp;gt;Column reordering in pg_dump&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/message-id/1324412114-sup-9608@alvh.no-ip.org&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow deactivating (and reactivating) indexes via ALTER TABLE&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg01191.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ALTER OPERATOR ... RENAME&lt;br /&gt;
|needs to consider effects of changing operator precedence&lt;br /&gt;
* [http://archives.postgresql.org/message-id/1322948781.26266.9.camel@vanquo.pezone.net Missing rename support]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ALTER TABLE ... RENAME RULE&lt;br /&gt;
* [http://archives.postgresql.org/message-id/1322948781.26266.9.camel@vanquo.pezone.net Missing rename support]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== CLUSTER ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Automatically maintain clustering on a table&lt;br /&gt;
|This might require some background daemon to maintain clustering during periods of low usage. It might also require tables to be only partially filled for easier reorganization.  Another idea would be to create a merged heap/index data file so an index lookup would automatically access the heap data too.  A third idea would be to store heap rows in hashed groups, perhaps using a user-supplied hash function.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2004-08/msg00350.php &amp;lt;nowiki&amp;gt;Equivalent praxis to CLUSTERED INDEX?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00155.php &amp;lt;nowiki&amp;gt;Re: Grouped Index Tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://community.enterprisedb.com/git/&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2009-10/msg00346.php &amp;lt;nowiki&amp;gt;Re: maintain_cluster_order_v5.patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== COPY ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY to report error lines and continue&lt;br /&gt;
|This requires the use of a savepoint before each COPY line is processed, with ROLLBACK on COPY failure. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00572.php &amp;lt;nowiki&amp;gt;Re: VLDB Features&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY FROM to create index entries in bulk&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00811.php &amp;lt;nowiki&amp;gt;Batch update of indexes on data loading&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY in CSV mode to control whether a quoted zero-length string is treated as NULL&lt;br /&gt;
|Currently this is always treated as a zero-length string, which generates an error when loading into an integer column &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00905.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] allow CSV quote in NULL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve COPY performance&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00954.php &amp;lt;nowiki&amp;gt;Re: 8.3 / 8.2.6 restore comparison&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01882.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY to report errors sooner&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01169.php &amp;lt;nowiki&amp;gt;Timely reporting of COPY errors&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY to handle other number formats&lt;br /&gt;
|E.g. the German notation. Best would be something like WITH DECIMAL ','.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow a stalled COPY to exit if the backend is terminated&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-04/msg00067.php &amp;lt;nowiki&amp;gt;Re: possible bug not in open items&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== GRANT/REVOKE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SERIAL sequences to inherit permissions from the base table?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow dropping of a role that has connection rights&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00736.php &amp;lt;nowiki&amp;gt;DROP ROLE dependency tracking ...&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== DECLARE CURSOR ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent DROP TABLE from dropping a table referenced by its own open cursor?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide some guarantees about the behavior of cursors that invoke volatile functions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/20997.1244563664@sss.pgh.pa.us Re: Cursor with hold emits the same row more than once across commits in 8.3.7]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== INSERT ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow INSERT/UPDATE of the system-generated oid value for a row}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|In rules, allow VALUES() to contain a mixture of 'old' and 'new' references}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== SHOW/SET ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM ANALYZE, and CLUSTER}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rationalize the discrepancy between settings that use values in bytes and SHOW that returns the object count&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2008-07/msg00007.php &amp;lt;nowiki&amp;gt;Re: [ADMIN] shared_buffers and shmmax&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== ANALYZE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have EXPLAIN ANALYZE issue NOTICE messages when the estimated and actual row counts differ by a specified percentage}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have EXPLAIN ANALYZE report rows as floating-point numbers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg01363.php &amp;lt;nowiki&amp;gt;explain analyze rows=%.0f&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00108.php &amp;lt;nowiki&amp;gt;Re: explain analyze rows=%.0f&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve how ANALYZE computes in-doubt tuples&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00771.php &amp;lt;nowiki&amp;gt;VACUUM/ANALYZE counting of in-doubt tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Window Functions ===&lt;br /&gt;
See {{messageLink|357.1230492361@sss.pgh.pa.us|TODO items for window functions}}.&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support creation of user-defined window functions&lt;br /&gt;
|We have the ability to create new window functions written in C.  Is it&lt;br /&gt;
worth the effort to create an API that would let them be written in PL/pgsql, etc?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement full support for window framing clauses&lt;br /&gt;
|In addition to done clauses described in the [http://developer.postgresql.org/pgdocs/postgres/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS latest doc], these clauses are not implemented yet.&lt;br /&gt;
* RANGE BETWEEN ... PRECEDING/FOLLOWING&lt;br /&gt;
* EXCLUDE&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Investigate tuplestore performance issues&lt;br /&gt;
|The tuplestore_in_memory() thing is just a band-aid, we ought to try to solve it properly.  tuplestore_advance seems like a weak spot as well.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00152.php &amp;lt;nowiki&amp;gt;tuplestore potential performance problem&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem|Do we really need so much duplicated code between Agg and WindowAgg?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Teach planner to evaluate multiple windows in the optimal order&lt;br /&gt;
|Currently windows are always evaluated in the query-specified order.&lt;br /&gt;
* http://archives.postgresql.org/message-id/3CDAD71E9D70417290FCF66F0178D1E1@amd64&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement DISTINCT clause in window aggregates&lt;br /&gt;
|Some proprietary RDBMSs have implemented it already, so it helps with porting from those.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Integrity Constraints ==&lt;br /&gt;
=== Keys ===&lt;br /&gt;
&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve deferrable unique constraints for cases with many conflicts&lt;br /&gt;
|The current implementation fires a trigger for each potentially conflicting row.  This might not scale well for an update that changes many key values at once.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Referential Integrity ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add MATCH PARTIAL referential integrity}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change foreign key constraint for array -&amp;amp;gt; element to mean element in array?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-10/msg01814.php &amp;lt;nowiki&amp;gt;foreign keys for array/period contains relationships&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem when cascading referential triggers make changes on cascaded tables, seeing the tables in an intermediate state&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Work-in-progress referential action trigger timing&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Optimize referential integrity checks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2005-10/msg00458.php &amp;lt;nowiki&amp;gt;Re: Effects of cascading references in foreign keys&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00744.php &amp;lt;nowiki&amp;gt;Can't ri_KeysEqual() consider two nulls as equal?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Check Constraints ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Run check constraints only when affected columns are changed&lt;br /&gt;
* http://archives.postgresql.org/message-id/1326055327.15293.13.camel@vanquo.pezone.net&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Server-Side Languages ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for polymorphic arguments and return types to languages other than PL/PgSQL}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for OUT and INOUT parameters to languages other than PL/PgSQL}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add more fine-grained specification of functions taking arbitrary data types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00367.php &amp;lt;nowiki&amp;gt;RfD: more powerful &amp;amp;quot;any&amp;amp;quot; types&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement stored procedures&lt;br /&gt;
|This might involve the control of transaction state and the return of multiple result sets&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-10/msg00454.php &amp;lt;nowiki&amp;gt;PL/pgSQL stored procedure returning multiple result sets (SELECTs)?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01375.php &amp;lt;nowiki&amp;gt;Proposal: real procedures again (8.4)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg00542.php&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-04/msg01149.php &amp;lt;nowiki&amp;gt;Gathering specs and discussion on feature (post 9.1)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow holdable cursors in SPI}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Add SPI_gettypmod() to return a field's typemod from a TupleDesc&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2005-11/msg00250.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== SQL-Language Functions ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow SQL-language functions to reference parameters by parameter name&lt;br /&gt;
|Currently SQL-language functions can only refer to dollar parameters, e.g. $1&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01479.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01519.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00221.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rethink query plan caching and timing of parse analysis within SQL-language functions&lt;br /&gt;
|They should work more like plpgsql functions do ...&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2011-05/msg00078.php &amp;lt;nowiki&amp;gt;Re: BUG #6019: invalid cached plan on inherited table&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/pgSQL ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Allow listing of record column names, and access to record columns via variables, e.g. columns := r.(*), tval2 := r.(colname)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2005-07/msg00458.php &amp;lt;nowiki&amp;gt;Re: PL/PGSQL: Dynamic Record Introspection&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-05/msg00302.php &amp;lt;nowiki&amp;gt;Re: PL/PGSQL: Dynamic Record Introspection&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00031.php &amp;lt;nowiki&amp;gt;Re: PL/PGSQL: Dynamic Record Introspection&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow row and record variables to be set to NULL constants, and allow NULL tests on such variables&lt;br /&gt;
|Because a row is not scalar, do not allow assignment from NULL-valued scalars.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg00070.php &amp;lt;nowiki&amp;gt;NULL and plpgsql rows&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider keeping separate cached copies when search_path changes&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg01009.php &amp;lt;nowiki&amp;gt;pl/pgsql Plan Invalidation and search_path&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of NULL row values vs. NULL rows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg01758.php &amp;lt;nowiki&amp;gt;Null row vs. row of nulls in plpgsql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg01973.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve PERFORM handling of WITH queries or document limitation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-03/msg00309.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/Perl ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow regex operations in plperl using UTF8 characters in non-UTF8 encoded databases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/Python ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Develop a trusted variant of PL/Python.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create a new restricted execution class that will allow passing function arguments in as locals.  Passing them as globals means functions cannot be called recursively.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-02/msg01468.php &amp;lt;nowiki&amp;gt;Re: pl/python do not delete function arguments&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a DB-API compliant interface on top of the SPI interface&lt;br /&gt;
* http://petereisentraut.blogspot.com/2011/11/plpydbapi-db-api-for-plpython.html&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|For functions returning a setof record with a composite type, cache the I/O functions for the composite type&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg02007.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix loss of information during conversion of numeric type to Python float}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/Tcl ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add table function support}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Check encoding validity of values passed back to Postgres in function returns, trigger tuple changes, and SPI calls.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Clients ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a function like pg_get_indexdef() that report more detailed index information&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00166.php &amp;lt;nowiki&amp;gt;BUG #3829: Wrong index reporting from pgAdmin III (v1.8.0 rev 6766-6767)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Split out pg_resetxlog output into pre- and post-sections&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg02040.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== pg_ctl ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow pg_ctl to work properly with configuration files located outside the PGDATA directory&lt;br /&gt;
|pg_ctl can not read the pid file because it isn't located in the config directory but in the PGDATA directory.  The solution is to allow pg_ctl to read and understand postgresql.conf to find the data_directory value.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-10/msg00024.php &amp;lt;nowiki&amp;gt;BUG #5103: &amp;amp;quot;pg_ctl -w (re)start&amp;amp;quot; fails with custom unix_socket_directory&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Modify pg_ctl behavior and exit codes to make it easier to write an LSB conforming init script&lt;br /&gt;
|It may be desirable to condition some of the changes on a command-line switch, to avoid breaking existing scripts.  A Linux shell (sh) script is referenced which has been tested and seems to provide a high degree of conformance in multiple environments.  Study of this script might suggest areas where pg_ctl could be modified to make writing an LSB conforming script easier; however, some aspects of that script would be unnecessary with other suggested changes to pg_ctl, and discussion on the lists did not reach consensus on support for all aspects of this script.  Further discussion of particular changes is needed before beginning any work.&lt;br /&gt;
* [[Lsb_conforming_init_script|LSB conforming init script]]&lt;br /&gt;
These threads should be studied for other ideas on improvements:&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01390.php &amp;lt;nowiki&amp;gt;We should Axe /contrib/start-scripts&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01843.php &amp;lt;nowiki&amp;gt;Linux LSB init script&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00008.php &amp;lt;nowiki&amp;gt;Re: Linux LSB init script&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve pg_ctl's detection of running postmasters&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00000.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-committers/2011-06/msg00001.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== psql ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have psql \ds show all sequences and their settings&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00916.php &amp;lt;nowiki&amp;gt;Re: TODO item: Have psql show current values for a sequence&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00401.php &amp;lt;nowiki&amp;gt;Quick patch: Display sequence owner&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Have \d on a sequence indicate if the sequence is owned by a table}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move psql backslash database information into the backend, use mnemonic commands?&lt;br /&gt;
|This would allow non-psql clients to pull the same information out of the database as psql. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-01/msg00191.php &amp;lt;nowiki&amp;gt;Re: psql \d option list overloaded&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make psql's \d commands more consistent in their handling of schemas&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php &amp;lt;nowiki&amp;gt;Re: psql and schemas&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make psql's \d commands distinguish default privileges from no privileges&lt;br /&gt;
|ACL displays were visibly different for the two cases before we &amp;quot;improved&amp;quot; them by using array_to_string.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2011-05/msg00082.php &amp;lt;nowiki&amp;gt;BUG #6021: There is no difference between default and empty access privileges with \dp&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consistently display privilege information for all objects in psql}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Add &amp;amp;quot;auto&amp;amp;quot; expanded mode that outputs in expanded format if &amp;amp;quot;wrapped&amp;amp;quot; mode can't wrap the output to the screen width&lt;br /&gt;
|Consider using auto-expanded mode for backslash commands like \df+.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00417.php &amp;lt;nowiki&amp;gt;Re: psql wrapped format default for backslash-d commands&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg01638.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent tab completion of SET TRANSACTION from querying the database and therefore preventing the transaction isolation level from being set.&lt;br /&gt;
|Currently SET &amp;amp;lt;tab&amp;amp;gt; causes a database lookup to check all supported session variables.  This query causes problems because setting the transaction isolation level must be the first statement of a transaction.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|\s without arguments (display history) fails with libedit, doesn't use pager either&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2011-06/msg00114.php &amp;lt;nowiki&amp;gt; psql \s not working - OS X&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a \set variable to control whether \s displays line numbers&lt;br /&gt;
|Another option is to add \# which lists line numbers, and allows command execution.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00255.php &amp;lt;nowiki&amp;gt;Re: psql possible TODO&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Include the symbolic SQLSTATE name in verbose error reports&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-09/msg00438.php &amp;lt;nowiki&amp;gt;Re: Checking is TSearch2 query is valid&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add prompt escape to display the client and server versions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00310.php &amp;lt;nowiki&amp;gt;WIP patch for TODO Item: Add prompt escape to display the client and server versions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add option to wrap column values at whitespace boundaries, rather than chopping them at a fixed width.&lt;br /&gt;
|Currently, &amp;amp;quot;wrapped&amp;amp;quot; format chops values into fixed widths.  Perhaps the word wrapping could use the same algorithm documented in the W3C specification. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00404.php &amp;lt;nowiki&amp;gt;Re: psql wrapped format default for backslash-d commands&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://www.w3.org/TR/CSS21/tables.html#auto-table-layout}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support the ReST table output format&lt;br /&gt;
|Details about the ReST format:  http://docutils.sourceforge.net/rst.html#reference-documentation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg01007.php &amp;lt;nowiki&amp;gt;Proposal: new border setting in psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00518.php &amp;lt;nowiki&amp;gt;Re: Proposal: new border setting in psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00609.php &amp;lt;nowiki&amp;gt;Re: Proposal: new border setting in psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add option to print advice for people familiar with other databases&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg01845.php &amp;lt;nowiki&amp;gt;MySQL-ism help patch for psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|\dd is missing comments for several types of objects&lt;br /&gt;
|Comments are not handled at all for some object types, and are handled by both \dd and the individual backslash command for others. Consider a system view like pg_comments to manage this mess.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2009-09/msg00199.php &amp;lt;nowiki&amp;gt;comment on constraint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-09/msg01080.php &amp;lt;nowiki&amp;gt;pg_comments&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-05/msg00885.php &amp;lt;nowiki&amp;gt;patch: Allow \dd to show constraint comments&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ability to edit views with \ev&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00023.php &amp;lt;nowiki&amp;gt;Adding \ev view editor?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix FETCH_COUNT to handle SELECT ... INTO and WITH queries&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01565.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2010-05/msg00192.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent psql from sending remaining single-line multi-statement queries after reconnecting&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2010-05/msg00159.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01283.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Add \i option to bring in the specified file as a quoted literal&lt;br /&gt;
|This would be useful for creating functions and other areas.  Details still need to be worked out.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-02/msg00016.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-02/msg00020.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having psql -c read .psqlrc, for consistency&lt;br /&gt;
|psql -f already reads .psqlrc&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow processing of multiple -f (file) options&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve line drawing characters&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00386.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider improving the continuation prompt&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg01772.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== pg_dump / pg_restore ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Add full object name to the tag field.  eg. for operators we need '=(integer, integer)', instead of just '='.&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add pg_dumpall custom format dumps?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2010-05/msg00509.php pg_dumpall custom format]&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid using platform-dependent locale names in pg_dumpall output&lt;br /&gt;
|Using native locale names puts roadblocks in the way of porting a dump to another platform.  One possible solution is to get&lt;br /&gt;
CREATE DATABASE to accept some agreed-on set of locale names and fix them up to meet the platform's requirements.&lt;br /&gt;
* http://archives.postgresql.org/message-id/21396.1241716688@sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow selection of individual object(s) of all types, not just tables}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|In a selective dump, allow dumping of an object and all its dependencies}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add options like pg_restore -l and -L to pg_dump}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for multiple pg_restore -t options, like pg_dump&lt;br /&gt;
|pg_restore's -t switch is less useful than pg_dump's in quite a few ways: no multiple switches, no pattern matching, no ability to pick up indexes and other dependent items for a selected table.  It should be made to handle this switch just like pg_dump does.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Stop dumping CASCADE on DROP TYPE commands in clean mode}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pg_dump --clean to drop roles that own objects or have privileges&lt;br /&gt;
|tgl says: if this is about pg_dumpall, it's done as of 8.4.  If it's really about pg_dump, what does it mean?  pg_dump has no business dropping roles.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pg_dump to utilize multiple CPUs and I/O channels by dumping multiple objects simultaneously&lt;br /&gt;
|The difficulty with this is getting multiple dump processes to produce a single dump output file.  It also would require several sessions to share the same snapshot. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php &amp;lt;nowiki&amp;gt;pg_dump additional options for performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00135.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00040.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg02454.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pg_restore to load different parts of the COPY data for a single table simultaneously}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Remove support for dumping from pre-7.3 servers&lt;br /&gt;
|In 7.3 and later, we can get accurate dependency information from the server.  pg_dump still contains a lot of crufty code&lt;br /&gt;
to try to deal with the lack of dependency info in older servers, but the usefulness of maintaining that code grows small.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow pre/data/post files when schema and data are dumped separately, for performance reasons&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php &amp;lt;nowiki&amp;gt;pg_dump additional options for performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00185.php &amp;lt;nowiki&amp;gt;Re: pg_dump additional options for performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00821.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00135.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Refactor handling of database attributes between pg_dump and pg_dumpall&lt;br /&gt;
|Currently only pg_dumpall emits database attributes, such as ALTER DATABASE SET commands and database-level GRANTs.&lt;br /&gt;
Many people wish that pg_dump would do that.  One proposal is to let pg_dump issue such commands if the -C switch was used,&lt;br /&gt;
but it's unclear whether that will satisfy the demand.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg01031.php &amp;lt;nowiki&amp;gt;ALTER DATABASE vs pg_dump&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2010-05/msg00010.php summary of the issues]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change pg_dump so that a comment on the dumped database is applied to the loaded database, even if the database has a different name.&lt;br /&gt;
|This will require new backend syntax, perhaps COMMENT ON CURRENT DATABASE. This is related to the previous item.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow parallel restore of tar dumps&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-02/msg01154.php &amp;lt;nowiki&amp;gt;Re: parallel restore&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow pg_dumpall to output restorable ALTER USER/DATABASE SET settings&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00916.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00394.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02359.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-10/msg00489.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== ecpg ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Docs&lt;br /&gt;
|Document differences between ecpg and the SQL standard and information about the Informix-compatibility module.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Solve cardinality &amp;amp;gt; 1 for input descriptors / variables?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a semantic check level, e.g. check if a table really exists}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|fix handling of DB attributes that are arrays}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix nested C comments}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|sqlwarn[6] should be 'W' if the PRECISION or SCALE value specified}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make SET CONNECTION thread-aware, non-standard?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow multidimensional arrays}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement COPY FROM STDIN}} &lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a way to specify size of a bytea parameter&lt;br /&gt;
* [http://archives.postgresql.org/message-id/200906192131.n5JLVoMo044178@wwwmaster.postgresql.org &amp;lt;nowiki&amp;gt;BUG #4866: ECPG and BYTEA&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Fix small memory leaks in ecpg&lt;br /&gt;
|Memory leaks in a short running application like ecpg are not really a problem, but make debugging more complicated}} &lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow reuse of cursor name variables&lt;br /&gt;
* [http://archives.postgresql.org/message-id/20100329113435.GA3430@feivel.credativ.lan &amp;lt;nowiki&amp;gt;Problems with variable cursorname in ecpg&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== libpq ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent PQfnumber() from lowercasing unquoted column names&lt;br /&gt;
|PQfnumber() should never have been doing lowercasing, but historically it has so we need a way to prevent it}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow statement results to be automatically batched to the client&lt;br /&gt;
|Currently all statement results are transferred to the libpq client before libpq makes the results available to the application.  This feature would allow the application to make use of the first result rows while the rest are transferred, or held on the server waiting for them to be requested by libpq. One complexity is that a statement like SELECT 1/col could error out mid-way through the result set.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider disallowing multiple queries in PQexec() as an additional barrier to SQL injection attacks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg00184.php &amp;lt;nowiki&amp;gt;Re: InitPostgres and flatfiles question&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add PQexecf() that allows complex parameter substitution&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01803.php &amp;lt;nowiki&amp;gt;Last minute mini-proposal (I know, know) for PQexecf()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add SQLSTATE and severity to errors generated within libpq itself&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-interfaces/2007-11/msg00015.php &amp;lt;nowiki&amp;gt;v8.1: Error severity on libpq PGconn*&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01425.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for interface/ipaddress binding to libpq&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01811.php &amp;lt;nowiki&amp;gt;SR/libpq - outbound interface/ipaddress binding&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Triggers ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve storage of deferred trigger queue&lt;br /&gt;
|Right now all deferred trigger information is stored in backend memory.  This could exhaust memory for very large trigger queues. This item involves dumping large queues into files, or doing some kind of join to process all the triggers, some bulk operation, or a bitmap. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00876.php &amp;lt;nowiki&amp;gt;Re: BUG #4204: COPY to table with FK has memory leak&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg00464.php &amp;lt;nowiki&amp;gt;Scaling up deferred unique checks and the after trigger queue&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-08/msg00023.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow triggers to be disabled in only the current session.&lt;br /&gt;
|This is currently possible by starting a multi-statement transaction, modifying the system tables, performing the desired SQL, restoring the system tables, and committing the transaction.  ALTER TABLE ... TRIGGER requires a table lock so it is not ideal for this usage.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|With disabled triggers, allow pg_dump to use ALTER TABLE ADD FOREIGN KEY&lt;br /&gt;
|If the dump is known to be valid, allow foreign keys to be added without revalidating the data.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow statement-level triggers to access modified rows}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|When statement-level triggers are defined on a parent table, have them fire only on the parent table, and fire child table triggers only where appropriate&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg01883.php &amp;lt;nowiki&amp;gt;Statement-level triggers and inheritance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow AFTER triggers on system tables&lt;br /&gt;
|System tables are modified in many places in the backend without going through the executor and therefore not causing triggers to fire. To complete this item, the functions that modify system tables will have to fire triggers.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01665.php&lt;br /&gt;
* http://wiki.postgresql.org/wiki/DDL_Triggers&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-12/msg00022.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Tighten trigger permission checks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00564.php &amp;lt;nowiki&amp;gt;Security leak with trigger functions?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow BEFORE INSERT triggers on views&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-02/msg01466.php &amp;lt;nowiki&amp;gt;Re: Why can't I put a BEFORE EACH ROW trigger on a view?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add database and transaction-level triggers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00451.php &amp;lt;nowiki&amp;gt;Proposal for db level triggers&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00620.php &amp;lt;nowiki&amp;gt;triggers on prepare, commit, rollback... ?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce locking requirements for creating a trigger&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00635.php &amp;lt;nowiki&amp;gt;Re: Change lock requirements for adding a trigger&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid requirement for &amp;quot;AFTER&amp;quot; trigger functions to return a value&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02384.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow creation of inline triggers&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2012-02/msg00708.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Inheritance ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow inherited tables to inherit indexes, UNIQUE constraints, and primary/foreign keys&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-05/msg00285.php &amp;lt;nowiki&amp;gt;Partitioning/inherited tables vs FKs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00039.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00305.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Honor UNIQUE INDEX on base column in INSERTs/UPDATEs on inherited table, e.g.  INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail&lt;br /&gt;
|The main difficulty with this item is the problem of creating an index that can span multiple tables.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Determine whether ALTER TABLE / SET SCHEMA should work on inheritance hierarchies (and thus support ONLY).  If yes, implement it.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|ALTER TABLE variants sometimes support recursion and sometimes not, but this is poorly/not documented, and the ONLY marker would then be silently ignored. Clarify the documentation, and reject ONLY if it is not supported.}}&lt;br /&gt;
&lt;br /&gt;
== Indexes ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent index uniqueness checks when UPDATE does not modify the column&lt;br /&gt;
|Uniqueness (index) checks are done when updating a column even if the column is not modified by the UPDATE.&lt;br /&gt;
However, HOT already short-circuits this in common cases, so more work might not be helpful.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow the creation of on-disk bitmap indexes which can be quickly combined with other bitmap indexes&lt;br /&gt;
|Such indexes could be more compact if there are only a few distinct values. Such indexes can also be compressed.  Keeping such indexes updated can be costly.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2005-07/msg00512.php &amp;lt;nowiki&amp;gt;Re: Bitmap index AM&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg01107.php &amp;lt;nowiki&amp;gt;Bitmap index thoughts&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00265.php &amp;lt;nowiki&amp;gt;Stream bitmaps&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01214.php &amp;lt;nowiki&amp;gt;Re: Bitmapscan changes - Requesting further feedback&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00013.php &amp;lt;nowiki&amp;gt;Updated bitmap index patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00741.php &amp;lt;nowiki&amp;gt;Reviewing new index types (was Re: [PATCHES] Updated bitmap indexpatch)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01023.php &amp;lt;nowiki&amp;gt;Bitmap Indexes: request for feedback&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/message-id/800923.27831.qm@web29010.mail.ird.yahoo.com &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow accurate statistics to be collected on indexes with more than one column or expression indexes, perhaps using per-index statistics&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2006-10/msg00222.php &amp;lt;nowiki&amp;gt;Re: Simple join optimized badly?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01131.php &amp;lt;nowiki&amp;gt;Stats for multi-column indexes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00741.php &amp;lt;nowiki&amp;gt;Cross-column statistics revisited&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg01431.php &amp;lt;nowiki&amp;gt;Multi-Dimensional Histograms&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00913.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg02179.php &lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00459.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02054.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg01731.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00894.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-09/msg00679.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having a larger statistics target for indexed columns and expression indexes. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider smaller indexes that record a range of values per heap page, rather than having one index entry for every heap row&lt;br /&gt;
|This is useful if the heap is clustered by the indexed values. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00341.php &amp;lt;nowiki&amp;gt;Grouped Index Tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg01264.php &amp;lt;nowiki&amp;gt;Grouped Index Tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00465.php &amp;lt;nowiki&amp;gt;Grouped Index Tuples / Clustered Indexes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-03/msg00163.php &amp;lt;nowiki&amp;gt;Bitmapscan changes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00014.php &amp;lt;nowiki&amp;gt;Re: GIT patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00487.php &amp;lt;nowiki&amp;gt;Re: Index Tuple Compression Approach?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01589.php &amp;lt;nowiki&amp;gt;Re: Index AM change proposals, redux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add REINDEX CONCURRENTLY, like CREATE INDEX CONCURRENTLY&lt;br /&gt;
|This is difficult because you must upgrade to an exclusive table lock to replace the existing index file.  CREATE INDEX CONCURRENTLY does not have this complication.  This would allow index compaction without downtime. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-08/msg00289.php &amp;lt;nowiki&amp;gt;Re: When/if to Reindex&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow multiple indexes to be created concurrently, ideally via a single heap scan&lt;br /&gt;
|pg_restore allows parallel index builds, but it is done via subprocesses, and there is no SQL interface for this.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-04/msg00093.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider sorting entries before inserting into btree index&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-01/msg01010.php &amp;lt;nowiki&amp;gt;Re: ATTN: Clodaldo was Performance problem. Could it be related to 8.3-beta4?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow index scans to return matching index keys, not just the matching heap locations&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01657.php &amp;lt;nowiki&amp;gt;Re: Is this TODO item done?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01477.php &amp;lt;nowiki&amp;gt;Index-only quals&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow creation of an index that can do comparisons to test if a value is between two column values&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00757.php &amp;lt;nowiki&amp;gt;Proposal: temporal extension &amp;amp;quot;period&amp;amp;quot; data type&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using &amp;quot;effective_io_concurrency&amp;quot; for index scans&lt;br /&gt;
* Currently only bitmap scans use this, which might be fine because most multi-row index scans use bitmap scans.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem with btree page splits during checkpoints&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00052.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-09/msg00184.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== GIST ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add more GIST index support for geometric data types}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow GIST indexes to create certain complex index types, like digital trees (see Aoki)}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix performance issues in contrib/seg and contrib/cube GiST support&lt;br /&gt;
* [http://archives.postgresql.org/message-id/alpine.DEB.2.00.0904161633160.4053@aragorn.flymine.org GiST index performance]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/alpine.DEB.2.00.0904221704470.22330@aragorn.flymine.org draft patch]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2009-05/msg00069.php &amp;lt;nowiki&amp;gt;Re: GiST index performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2009-06/msg00068.php &amp;lt;nowiki&amp;gt;GiST index performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Hash ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add UNIQUE capability to hash indexes}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add hash WAL logging for crash recovery&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-09/msg00196.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow multi-column hash indexes}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Sorting ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider whether duplicate keys should be sorted by block/offset&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00558.php &amp;lt;nowiki&amp;gt;Remove hacks for old bad qsort() implementations?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider being smarter about memory and external files used during sorts&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg01101.php &amp;lt;nowiki&amp;gt;Sorting Improvements for 8.4&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00045.php &amp;lt;nowiki&amp;gt;Re: Sorting Improvements for 8.4&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider detoasting keys before sorting}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow sorts to use more available memory&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2007-11/msg01026.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg01123.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg01957.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Fsync ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options and whether fsync does anything&lt;br /&gt;
|Ideally this requires a separate test program like /contrib/pg_test_fsync that can be run at initdb time or optionally later.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider sorting writes during checkpoint&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00541.php &amp;lt;nowiki&amp;gt;Sorted writes in checkpoint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00050.php &amp;lt;nowiki&amp;gt;Re: Sorting writes during checkpoint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg02012.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg00278.php&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CA+TgmoaHu1zuNohoE=cEP0nSc+0wtuRSyEAj_Af2XhxU+ry6-w@mail.gmail.com checkpoint writeback via sync_file_range]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Cache Usage ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Speed up COUNT(*)&lt;br /&gt;
|We could use a fixed row count and a +/- count to follow MVCC visibility rules, or a single cached value could be used and invalidated if anyone modifies the table.  Another idea is to get a count directly from a unique index, but for this to be faster than a sequential scan it must avoid access to the heap to obtain tuple visibility information.  Note that the index-only scans feature is now implemented which now dramatically speeds up some COUNT(*) cases.&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Slow_Counting&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a way to calculate an &amp;amp;quot;estimated COUNT(*)&amp;amp;quot;&lt;br /&gt;
|Perhaps by using the optimizer's cardinality estimates or random sampling.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-11/msg00943.php &amp;lt;nowiki&amp;gt;Re: Improving count(*)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Slow_Counting&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow data to be pulled directly from indexes&lt;br /&gt;
|Currently indexes do not have enough tuple visibility information to allow data to be pulled from the index without also accessing the heap.  The idea is to use the visibility map used for vacuum to avoid heap lookups on pages where all tuples are visible.&lt;br /&gt;
* [http://wiki.postgresql.org/wiki/Index-only_scans Index-Only Scans wiki]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider automatic caching of statements at various levels:&lt;br /&gt;
* Parsed query tree&lt;br /&gt;
* Query execute plan&lt;br /&gt;
* Query results &lt;br /&gt;
&lt;br /&gt;
:&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg00823.php &amp;lt;nowiki&amp;gt;Cached Query Plans (was: global prepared statements)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider increasing internal areas (NUM_CLOG_BUFFERS) when shared buffers is increased&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-10/msg01419.php &amp;lt;nowiki&amp;gt;Re: slru.c race condition (was Re: TRAP: FailedAssertion(&amp;amp;quot;!((itemid)-&amp;amp;gt;lp_flags &amp;amp;amp; 0x01)&amp;amp;quot;,)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00030.php &amp;lt;nowiki&amp;gt;clog_buffers to 64 in 8.3?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-08/msg00024.php &amp;lt;nowiki&amp;gt;CLOG Patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider decreasing the amount of memory used by PrivateRefCount&lt;br /&gt;
|&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg00797.php &amp;lt;nowiki&amp;gt;PrivateRefCount (for 8.3)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg00752.php &amp;lt;nowiki&amp;gt;Re: PrivateRefCount (for 8.3)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider allowing higher priority queries to have referenced buffer cache pages stay in memory longer&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00562.php &amp;lt;nowiki&amp;gt;Re: How to keep a table in memory?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Vacuum ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Auto-fill the free space map by scanning the buffer cache or by checking pages written by the background writer&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-02/msg01125.php &amp;lt;nowiki&amp;gt;Dead Space Map&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00011.php &amp;lt;nowiki&amp;gt;Re: Automatic free space map filling&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow concurrent inserts to use recently created pages rather than creating new ones&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg00853.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having single-page pruning update the visibility map&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;https://commitfest.postgresql.org/action/patch_view?id=75&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg02344.php &amp;lt;nowiki&amp;gt;Re: visibility maps and heap_prune&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve tracking of total relation tuple counts now that vacuum doesn't always scan the whole heap&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00531.php Partial vacuum versus pg_class.reltuples]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Bias FSM towards returning free space near the beginning of the heap file, in hopes that empty pages at the end can be truncated by VACUUM&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg01124.php &amp;lt;nowiki&amp;gt;FSM search modes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a more compact data representation for dead tuple locations within VACUUM&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00143.php &amp;lt;nowiki&amp;gt;Re: Have vacuum emit a warning when it runs out of maintenance_work_mem&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide more information in order to improve user-side estimates of dead space bloat in relations&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2009-05/msg01039.php &amp;lt;nowiki&amp;gt;Re: Bloated Table&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve locking behaviour of vacuum during trailing page truncation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-03/msg00319.php&lt;br /&gt;
* http://archives.postgresql.org/message-id/4D8DF88E.7080205@Yahoo.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce the number of table scans performed by vacuum&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg01119.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00605.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-07/msg00624.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Auto-vacuum ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Issue log message to suggest VACUUM FULL if a table is nearly empty?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent long-lived temporary tables from causing frozen-xid advancement starvation&lt;br /&gt;
|The problem is that autovacuum cannot vacuum them to set frozen xids; only the session that created them can do that. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-06/msg01645.php &amp;lt;nowiki&amp;gt;Re: AutoVacuum Behaviour Question&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent autovacuum from running if an old transaction is still running from the last vacuum&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00899.php &amp;lt;nowiki&amp;gt;Re: Autovacuum and OldestXmin&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have autoanalyze of parent tables occur when child tables are modified&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-06/msg00137.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-10/msg00271.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow parallel cores to be used by vacuumdb&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4F10A728.7090403@agliodbs.com vacuumdb -j]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Locking ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix priority ordering of read and write light-weight locks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00893.php &amp;lt;nowiki&amp;gt;lwlocks and starvation&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00905.php &amp;lt;nowiki&amp;gt;Re: lwlocks and starvation&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem when multiple subtransactions of the same outer transaction hold different types of locks, and one subtransaction aborts&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg01011.php &amp;lt;nowiki&amp;gt;FOR SHARE vs FOR UPDATE locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00001.php &amp;lt;nowiki&amp;gt;Re: FOR SHARE vs FOR UPDATE locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00435.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] [pgsql-patches] Phantom Command IDs, updated patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00773.php &amp;lt;nowiki&amp;gt;Re: savepoints and upgrading locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow UPDATEs on only non-referential integrity columns not to conflict with referential integrity locks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00073.php &amp;lt;nowiki&amp;gt;Referential Integrity and SHARE locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add idle_in_transaction_timeout GUC so locks are not held for long periods of time}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve deadlock detection when a page cleaning lock conflicts with a shared buffer that is pinned&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-01/msg00138.php &amp;lt;nowiki&amp;gt;BUG #3883: Autovacuum deadlock with truncate?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php &amp;lt;nowiki&amp;gt;Thoughts about bug #3883&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-committers/2008-01/msg00365.php &amp;lt;nowiki&amp;gt;Re: pgsql: Add checks to TRUNCATE, CLUSTER, and REINDEX to prevent&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Detect deadlocks involving LockBufferForCleanup()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php &amp;lt;nowiki&amp;gt;Thoughts about bug #3883&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow finer control over who is cancelled in a deadlock&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01727.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a lock timeout parameter&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00485.php &amp;lt;nowiki&amp;gt;SELECT ... FOR UPDATE [WAIT integer | NOWAIT] for 8.5&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce number of unnecessary false positives in Serializable Snapshot Isolation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-06/msg00609.php &amp;lt;nowiki&amp;gt;SSI heap_insert and page-level predicate locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Startup Time Improvements ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Experiment with multi-threaded backend for backend creation&lt;br /&gt;
|This would prevent the overhead associated with process creation. Most operating systems have trivial process creation time compared to database startup overhead, but a few operating systems (Win32, Solaris) might benefit from threading.  Also explore the idea of a single session using multiple threads to execute a statement faster.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow backends to change their database without restart&lt;br /&gt;
|This allows for faster server startup.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00843.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00336.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Write-Ahead Log ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Eliminate need to write full pages to WAL before page modification&lt;br /&gt;
|Currently, to protect against partial disk page writes, we write full page images to WAL before they are modified so we can correct any partial page writes during recovery.  These pages can also be eliminated from point-in-time archive files. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2002-06/msg00655.php &amp;lt;nowiki&amp;gt;Re: Index Scans become Seq Scans after VACUUM ANALYSE&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg01191.php&lt;br /&gt;
* [http://archives.postgresql.org/message-id/20120105061916.GB21048@fetter.org WIP double writes]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4EFC449F02000025000441CD@gw.wicourts.gov double writes]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/20120110214344.GB21106@fetter.org Double-write with Fast Checksums]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/1962493974.656458.1327703514780.JavaMail.root@zimbra-prod-mbox-4.vmware.com double writes using &amp;quot;double-write buffer&amp;quot; approach]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|When full page writes are off, write CRC to WAL and check file system blocks on recovery&lt;br /&gt;
|If CRC check fails during recovery, remember the page in case a later CRC for that page properly matches.  The difficulty is that hint bits are not WAL logged, meaning a valid page might not match the earlier CRC.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Write full pages during file system write and not when the page is modified in the buffer cache&lt;br /&gt;
|This allows most full page writes to happen in the background writer.  It might cause problems for applying WAL on recovery into a partially-written page, but later the full page will be replaced from WAL.&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CAGvK12UST-tPhyLrSLuSpwFxZbAO79yYrhV2xaLmS2MkUxNUVQ@mail.gmail.com Page Checksums + Double Writes]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce WAL traffic so only modified values are written rather than entire rows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01589.php &amp;lt;nowiki&amp;gt;Reduction in WAL for UPDATEs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow WAL information to recover corrupted pg_controldata&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00025.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] pg_resetxlog -r flag&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Find a way to reduce rotational delay when repeatedly writing last WAL page&lt;br /&gt;
|Currently fsync of WAL requires the disk platter to perform a full rotation to fsync again. One idea is to write the WAL to different offsets that might reduce the rotational delay. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2002-11/msg00483.php &amp;lt;nowiki&amp;gt;500 tpsQL + WAL log implementation&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Speed WAL recovery by allowing more than one page to be prefetched&lt;br /&gt;
|This should be done utilizing the same infrastructure used for prefetching in general to avoid introducing complex error-prone code in WAL replay. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-12/msg00683.php &amp;lt;nowiki&amp;gt;Slow PITR restore&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00497.php &amp;lt;nowiki&amp;gt;Re: [GENERAL] Slow PITR restore&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg01279.php &amp;lt;nowiki&amp;gt;Read-ahead and parallelism in redo recovery&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve WAL concurrency by increasing lock granularity&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00556.php &amp;lt;nowiki&amp;gt;Reworking WAL locking&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Be more aggressive about creating WAL files&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01325.php &amp;lt;nowiki&amp;gt;Re: PANIC caused by open_sync on Linux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-07/msg01075.php &amp;lt;nowiki&amp;gt;PreallocXlogFiles&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-04/msg00556.php &amp;lt;nowiki&amp;gt;WAL/PITR additional items&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have resource managers report the duration of their status changes&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01468.php &amp;lt;nowiki&amp;gt;Recovery of Multi-stage WAL actions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move pgfoundry's xlogdump to /contrib and have it rely more closely on the WAL backend code&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00035.php &amp;lt;nowiki&amp;gt;xlogdump&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Close deleted WAL files held open in *nix by long-lived read-only backends&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg01754.php &amp;lt;nowiki&amp;gt;Deleted WAL files held open by backends in Linux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00060.php &amp;lt;nowiki&amp;gt;Re: Deleted WAL files held open by backends in Linux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Optimizer / Executor ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve selectivity functions for geometric operators}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider increasing the default values of from_collapse_limit, join_collapse_limit, and/or geqo_threshold&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4136ffa0905210551u22eeb31bn5655dbe7c9a3aed5@mail.gmail.com from_collapse_limit vs. geqo_threshold]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve ability to display optimizer analysis using OPTIMIZER_DEBUG}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Log statements where the optimizer row estimates were dramatically different from the number of rows actually found?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider compressed annealing to search for query plans&lt;br /&gt;
|This might replace GEQO.&lt;br /&gt;
* http://archives.postgresql.org/message-id/15658.1241278636%40sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve use of expression indexes for ORDER BY &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01553.php &amp;lt;nowiki&amp;gt;Resjunk sort columns, Heikki's index-only quals patch, and bug #5000&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Modify the planner to better estimate caching effects&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-11/msg00117.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow shared buffer cache contents to affect index cost computations&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg01140.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Hashing ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using a hash for joining to a large IN (VALUES ...) list&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00450.php &amp;lt;nowiki&amp;gt;Planning large IN lists&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow single batch hash joins to preserve outer pathkeys&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg00806.php Re: Potential Join Performance Issue]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;quot;lazy&amp;quot; hash tables - look up only the tuples that are actually requested&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid building the same hash table more than once during the same query&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid hashing for distinct and then re-hashing for hash join&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4136ffa0902191346g62081081v8607f0b92c206f0a@mail.gmail.com Re: Fixing Grittner's planner issues]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Background Writer ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having the background writer update the transaction status hint bits before writing out the page&lt;br /&gt;
|Implementing this requires the background writer to have access to system catalogs and the transaction status log.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider adding buffers the background writer finds reusable to the free list &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00781.php &amp;lt;nowiki&amp;gt;Background LRU Writer/free list&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CA+U5nMKtvyDcV4zTr7bq7t6cA2nBfLxCJ8tQgVBnc5ddRPO+Bg@mail.gmail.com our buffer replacement strategy is kind of lame]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Automatically tune bgwriter_delay based on activity rather then using a fixed interval&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00781.php &amp;lt;nowiki&amp;gt;Background LRU Writer/free list&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CA+U5nMKtvyDcV4zTr7bq7t6cA2nBfLxCJ8tQgVBnc5ddRPO+Bg@mail.gmail.com our buffer replacement strategy is kind of lame]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider whether increasing BM_MAX_USAGE_COUNT improves performance&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg01007.php &amp;lt;nowiki&amp;gt;Bgwriter LRU cleaning: we've been going at this all wrong&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Test to see if calling PreallocXlogFiles() from the background writer will help with WAL segment creation latency&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-06/msg00340.php &amp;lt;nowiki&amp;gt;Re: Load Distributed Checkpoints, final patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Concurrent Use of Resources ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Do async I/O for faster random read-ahead of data&lt;br /&gt;
|Async I/O allows multiple I/O requests to be sent to the disk with results coming back asynchronously.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg00820.php &amp;lt;nowiki&amp;gt;Asynchronous I/O Support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-09/msg00255.php &amp;lt;nowiki&amp;gt;Re: random_page_costs - are defaults of 4.0 realistic for SCSI RAID 1&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00027.php &amp;lt;nowiki&amp;gt;There's random access and then there's random access&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-01/msg00170.php &amp;lt;nowiki&amp;gt;Bitmap index scan preread using posix_fadvise (Was: There's random access and then there's random access)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
The above patch is already applied as of 8.4, but it still remains to figure out how to handle plain indexscans effectively.&lt;br /&gt;
* [http://archives.postgresql.org//pgsql-hackers/2009-01/msg00806.php Problems with the patch submitted for posix_fadvise in index scans]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Experiment with multi-threaded backend for better I/O utilization&lt;br /&gt;
|This would allow a single query to make use of multiple I/O channels simultaneously.  One idea is to create a background reader that can pre-fetch sequential and index scan pages needed by other backends. This could be expanded to allow concurrent reads from multiple devices in a partitioned table.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-02/msg00123.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Experiment with multi-threaded backend for better CPU utilization&lt;br /&gt;
|This would allow several CPUs to be used for a single query, such as for sorting or query execution.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00945.php &amp;lt;nowiki&amp;gt;Multi CPU Queries - Feedback and/or suggestions wanted!&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|SMP scalability improvements&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00439.php &amp;lt;nowiki&amp;gt;Straightforward changes for increased SMP scalability&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00206.php &amp;lt;nowiki&amp;gt;Re: Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00361.php &amp;lt;nowiki&amp;gt;Re: Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== TOAST ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow user configuration of TOAST thresholds&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00213.php &amp;lt;nowiki&amp;gt;Re: Proposed adjustments in MaxTupleSize and toastthresholds&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00082.php &amp;lt;nowiki&amp;gt;pg_lzcompress strategy parameters&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce unnecessary cases of deTOASTing&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00895.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Eliminate more detoast copies for packed varlenas&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce costs of repeat de-TOASTing of values&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg01096.php &amp;lt;nowiki&amp;gt;WIP patch: reducing overhead for repeat de-TOASTing&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Monitoring ==&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Expand pg_stat_activity for easier integration with monitoring tools&lt;br /&gt;
|* http://archives.postgresql.org/message-id/4DFA13A5.2060200@2ndQuadrant.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add column to pg_stat_activity that shows the progress of long-running commands like CREATE INDEX and VACUUM&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-04/msg00203.php &amp;lt;nowiki&amp;gt;EXPLAIN progress info&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* The CLUSTER/VACUUM FULL implementation would also be useful to track this way&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have pg_stat_activity display query strings in the correct client encoding&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00131.php &amp;lt;nowiki&amp;gt;pg_stats queries versus per-database encodings&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Expose pg_controldata via an SQL interface&lt;br /&gt;
|Helpful for monitoring replicated databases&lt;br /&gt;
* http://archives.postgresql.org/message-id/4B901D73.8030003@agliodbs.com&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4B959D7A.6010907@joeconway.com initial patch]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Performance ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Use mmap() rather than SYSV for shared buffers?&lt;br /&gt;
|This would remove the requirement for SYSV SHM but would introduce portability issues. Anonymous mmap (or mmap to /dev/zero) is required to prevent I/O overhead. We could also consider mmap() for writing WAL.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00750.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00756.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rather than consider mmap()-ing in 8k pages, consider mmap()'ing entire files into a backend?&lt;br /&gt;
|Doing I/O to large tables would consume a lot of address space or require frequent mapping/unmapping.  Extending the file also causes mapping problems that might require mapping only individual pages, leading to thousands of mappings.  Another problem is that there is no way to _prevent_ I/O to disk from the dirty shared buffers so changes could hit disk before WAL is written.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01239.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider ways of storing rows more compactly on disk:&lt;br /&gt;
* Reduce the row header size?&lt;br /&gt;
* Consider reducing on-disk varlena length from four bytes to two because a heap row cannot be more than 64k in length}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider transaction start/end performance improvements&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00948.php &amp;lt;nowiki&amp;gt;Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00361.php &amp;lt;nowiki&amp;gt;Re: Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow configuration of backend priorities via the operating system&lt;br /&gt;
|Though backend priorities make priority inversion during lock waits possible, research shows that this is not a huge problem.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-02/msg00493.php &amp;lt;nowiki&amp;gt;Priorities for users or queries?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider increasing the minimum allowed number of shared buffers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-02/msg00157.php &amp;lt;nowiki&amp;gt;Re: [PATCH] Don't bail with legitimate -N/-B options&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider if CommandCounterIncrement() can avoid its AcceptInvalidationMessages() call&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-committers/2007-11/msg00585.php &amp;lt;nowiki&amp;gt;pgsql: Avoid incrementing the CommandCounter when&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider Cartesian joins when both relations are needed to form an indexscan qualification for a third relation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-12/msg00090.php &amp;lt;nowiki&amp;gt;Re: TB-sized databases&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider not storing a NULL bitmap on disk if all the NULLs are trailing&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00624.php &amp;lt;nowiki&amp;gt;Proposal for Null Bitmap Optimization(for Trailing NULLs)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-12/msg00109.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Proposal for Null Bitmap Optimization(for TrailingNULLs)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Sort large UPDATE/DELETEs so it is done in heap order&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg01119.php &amp;lt;nowiki&amp;gt;Possible future performance improvement: sort updates/deletes by ctid&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow one transaction to see tuples using the snapshot of another transaction&lt;br /&gt;
|This would assist multiple backends in working together. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00400.php &amp;lt;nowiki&amp;gt;Transaction Snapshot Cloning&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00135.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00260.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00466.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-08/msg00684.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider decreasing the I/O caused by updating tuple hint bits&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00847.php &amp;lt;nowiki&amp;gt;Hint Bits and Write I/O&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00199.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Hint Bits and Write I/O&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg00695.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00792.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg01063.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01408.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01453.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid the requirement of freezing pages that are infrequently modified &lt;br /&gt;
|If all rows on a page are visible, it is possible to set a bit in the visibility map (once the visibility map is 100% reliable) and not need to freeze the page, avoiding a page rewrite&lt;br /&gt;
*  http://archives.postgresql.org/message-id/4BF701CF.2090205@agliodbs.com&lt;br /&gt;
*  http://archives.postgresql.org/pgsql-hackers/2010-06/msg00082.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid reading in b-tree pages when replaying vacuum records in hot standby mode&lt;br /&gt;
* [http://archives.postgresql.org/message-id/1272571938.4161.14739.camel@ebony &amp;lt;nowiki&amp;gt;Hot Standby tuning for btree_xlog_vacuum()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Restructure truncation logic to be more resistant to failure&lt;br /&gt;
|This also involves not writing dirty buffers for a truncated or dropped relation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01032.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider adding logic to increase large tables by more than 8k&lt;br /&gt;
|This would reduce file system fragmentation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-03/msg00337.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Other ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Deal with encoding issues for filenames in the server filesystem&lt;br /&gt;
* {{MessageLink|20090413184335.39BE.52131E4D@oss.ntt.co.jp|a proposed patch here}}&lt;br /&gt;
* {{MessageLink|8484.1244655656@sss.pgh.pa.us|some issues about it here}}&lt;br /&gt;
* {{MessageLink|20100107103740.97A5.52131E4D@oss.ntt.co.jp|Windows-specific patch here}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Deal with encoding issues in the output of localeconv()&lt;br /&gt;
* [http://archives.postgresql.org/message-id/40c6d9160904210658y590377cfw6dbbecb53d2b8be0@mail.gmail.com bug report]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/49EF8DA0.90008@tpf.co.jp draft patch]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/21710.1243620986@sss.pgh.pa.us review of patch]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide schema name and other fields available from SQL GET DIAGNOSTICS in error reports&lt;br /&gt;
* [http://archives.postgresql.org/message-id/dcc563d10810211907n3c59a920ia9eb7cd2a6d5ea58@mail.gmail.com &amp;lt;nowiki&amp;gt;How to get schema name which violates fk constraint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg00846.php &amp;lt;nowiki&amp;gt;patch - Report the schema along table name in a referential failure 	error message&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* {{MessageLink|3191.1263306359@sss.pgh.pa.us|Re: NOT NULL violation and error-message}}&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg00213.php &amp;lt;nowiki&amp;gt;the case for machine-readable error fields&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
| Provide [http://developer.postgresql.org/pgdocs/postgres/libpq-connect.html#LIBPQ-CONNECT-FALLBACK-APPLICATION-NAME fallback_application_name] in contrib/pgbench, oid2name, and dblink.&lt;br /&gt;
* {{MessageLink|w2g9837222c1004070216u3bc46b3ahbddfdffdbfb46212@mail.gmail.com|fallback_application_name and pgbench}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add 64-bit support to /contrib/pgbench&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-07/msg00153.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg00705.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add use of 'const' for variables in source tree&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-11/msg00473.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Remove warnings created by -Wcast-align}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move platform-specific ps status display info from ps_status.c to ports}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add optional CRC checksum to heap and index pages&lt;br /&gt;
|One difficulty is how to prevent hint bit changes from affecting the computed CRC checksum.&lt;br /&gt;
* http://archives.postgresql.org/message-id/19934.1226601952%40sss.pgh.pa.us&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00002.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01028.php &amp;lt;nowiki&amp;gt;double-buffering page writes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00524.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01101.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00011.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00249.php&lt;br /&gt;
* http://archives.postgresql.org/message-id/20111221215913.GA4536@fetter.org&lt;br /&gt;
* http://archives.postgresql.org/message-id/CA+U5nMJzQyxcObkpNAf1SYTX-gO_Mom3O9JXHnGpxRo1kXJ7ww@mail.gmail.com&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2012-01/msg00128.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2012-01/msg00113.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a faster CRC32 algorithm&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01112.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow cross-compiling by generating the zic database on the target system}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve NLS maintenance of libpgport messages linked onto applications}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Use UTF8 encoding for NLS messages so all server encodings can read them properly}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow creation of universal binaries for Darwin&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00884.php &amp;lt;nowiki&amp;gt;Getting to universal binaries for Darwin&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider GnuTLS if OpenSSL license becomes a problem&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg00892.php&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-05/msg00040.php &amp;lt;nowiki&amp;gt;[PATCH] Add support for GnuTLS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg01213.php &amp;lt;nowiki&amp;gt;TODO: GNU TLS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider making NAMEDATALEN more configurable in future releases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Research use of signals and sleep wake ups&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00003.php &amp;lt;nowiki&amp;gt;Restartable signals 'n all that&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow C++ code to more easily access backend code&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00302.php &amp;lt;nowiki&amp;gt;Mostly Harmless: Welcoming our C++ friends&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider simplifying how memory context resets handle child contexts&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-08/msg00067.php &amp;lt;nowiki&amp;gt;Re: Memory leak in nodeAgg&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create three versions of libpgport to simplify client code&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00154.php &amp;lt;nowiki&amp;gt;8.4 TODO item: make src/port support libpq and ecpg directly&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve detection of shared memory segments being used by others by checking the SysV shared memory field 'nattch'&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00656.php &amp;lt;nowiki&amp;gt;postgresql in FreeBSD jails: proposal&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00673.php &amp;lt;nowiki&amp;gt;Re: postgresql in FreeBSD jails: proposal&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement the non-threaded Avahi service discovery protocol&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00939.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-02/msg00097.php &amp;lt;nowiki&amp;gt;Re: Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg01211.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-04/msg00001.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce data row alignment requirements on some 64-bit systems&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00369.php &amp;lt;nowiki&amp;gt;[WIP] Reduce alignment requirements on 64-bit systems.&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Restructure TOAST internal storage format for greater flexibility&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00049.php &amp;lt;nowiki&amp;gt;Re: PG_PAGE_LAYOUT_VERSION 5 - time for change&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Add regression tests for pg_dump/restore&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01967.php &amp;lt;nowiki&amp;gt;&amp;quot;make install-check-pg_dump&amp;quot; target in src/regress]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Research different memory allocation methods for lists&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg01467.php &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Consider removing the attribute options cache&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00039.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Restructure /contrib section&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00705.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== /contrib/pg_upgrade ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Handle large object comments&lt;br /&gt;
|This is difficult to do because the large object doesn't exist when --schema-only is loaded.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using pg_depend for checking object usage in version.c&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|If reindex is necessary, allow it to be done in parallel with pg_dump custom format&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Migrate pg_statistic by dumping it out as a flat file, so analyze is not necessary&lt;br /&gt;
|pg_class.oid is not preserved so schema.tablename must be used.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve testing, perhaps using the buildfarm&lt;br /&gt;
|The buildfarm has access to multiple versions of PostgreSQL.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create machine-readable output of pg_controldata&lt;br /&gt;
|This would avoid parsing its output.  The problem is we need pg_controldata output from both the old and new clusters so we would need to support both formats.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Remove configure.in check for link failure when cause is found}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Remove readdir() errno patch when runtime/mingwex/dirent.c rev 1.4 is released}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow psql to use readline once non-US code pages work with backslashes}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem with shared memory on the Win32 Terminal Server}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve signal handling&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2005-06/msg00027.php &amp;lt;nowiki&amp;gt;Simplify Win32 Signaling code&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Convert MSVC build system to remove most batch files&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00961.php &amp;lt;nowiki&amp;gt;MSVC build system&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support pgxs when using MSVC}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix MSVC NLS support, like for to_char()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00485.php &amp;lt;nowiki&amp;gt;NLS on MSVC  strikes back!&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-02/msg00038.php &amp;lt;nowiki&amp;gt;Fix for 8.3 MSVC locale (Was  [HACKERS] NLS on MSVC strikes back!)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Find a correct rint() substitute on Windows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00808.php &amp;lt;nowiki&amp;gt;Minor bug in src/port/rint.c&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix global namespace issues when using multiple terminal server sessions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/48F3BFCC.8030107@dunslane.net problems with Windows global namespace]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change from the current autoconf/gmake build system to cmake&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01869.php &amp;lt;nowiki&amp;gt;About CMake (was Re: [COMMITTERS] pgsql: Append major version number and for libraries soname major)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve consistency of path separator usage&lt;br /&gt;
* http://archives.postgresql.org/message-id/49C0BDC5.4010002@hagander.net&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix cross-compiling on Windows&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2010-10/msg00110.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow multiple Postgres clusters running on the same machine to distinguish themselves in the event log&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01297.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00574.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Wire Protocol Changes ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow dynamic character set handling}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add decoded type, length, precision}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Mark result columns as known-not-null when possible&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-11/msg01029.php &amp;lt;nowiki&amp;gt;Adding nullable indicator to Describe&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide more control over planner treatment of statements being prepared}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Use compression?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Update clients to use data types, typmod, schema.table.column names of result sets using new statement protocol}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Set protocol for wire format negotiation&lt;br /&gt;
* [http://archives.postgresql.org/message-id/CACMqXCKkGrGXxQhjHCKCe0B8hn6sTt-1sdgHZOSGQMxrusOsQA@mail.gmail.com GUC_REPORT for protocol tunables]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make sure upgrading to a 4.1 protocol version will actually work smoothly&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28307.1318255008@sss.pgh.pa.us Re: libpq, PQdescribePrepared -&amp;gt; PQftype, PQfmod, no PQnullable]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Convert single quotes to apostrophes in the PDF documentation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2007-12/msg00059.php &amp;lt;nowiki&amp;gt;SGML docs and pdf single-quotes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a manpage for postgresql.conf&lt;br /&gt;
* {{messageLink|20080819194311.GH4428@alvh.no-ip.org|A smaller default postgresql.conf}}&lt;br /&gt;
* {{messageLink|200808211910.37524.peter_e@gmx.net|A smaller default postgresql.conf}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change the manpage-generating toolchain to use the new XML-based docbook2x tools&lt;br /&gt;
* {{messageLink|200808211910.37524.peter_e@gmx.net|A smaller default postgresql.conf}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider changing documentation format from SGML to XML&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2006-12/msg00152.php &amp;lt;nowiki&amp;gt;Re: Authoring Tools WAS: Switching to XML&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-docs/2011-04/msg00020.php&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Switching_PostgreSQL_documentation_from_SGML_to_XML&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Document support for N&amp;lt;nowiki&amp;gt;' '&amp;lt;/nowiki&amp;gt; national character string literals, if it matches the SQL standard&lt;br /&gt;
* http://archives.postgresql.org/message-id/1275895438.1849.1.camel@fsopti579.F-Secure.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add diagrams to the documentation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-docs/2010-07/msg00001.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Exotic Features ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add pre-parsing phase that converts non-ISO syntax to supported syntax&lt;br /&gt;
|This could allow SQL written for other databases to run without modification.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow plug-in modules to emulate features from other databases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add features of Oracle-style packages&lt;br /&gt;
|A package would be a schema with session-local variables, public/private functions, and initialization functions.  It is also possible to implement these capabilities in any schema and not use a separate &amp;amp;quot;packages&amp;amp;quot; syntax at all.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-08/msg00384.php &amp;lt;nowiki&amp;gt;proposal for PL packages for 8.3.&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider allowing control of upper/lower case folding of unquoted identifiers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-04/msg00818.php &amp;lt;nowiki&amp;gt;Bringing PostgreSQL torwards the standard regarding case folding&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg01527.php &amp;lt;nowiki&amp;gt;Re: [SQL] Case Preservation disregarding case sensitivity?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00849.php &amp;lt;nowiki&amp;gt;TODO Item: Consider allowing control of upper/lower case folding of unquoted,  identifiers&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00415.php &amp;lt;nowiki&amp;gt;Identifier case folding notes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00415.php &amp;lt;nowiki&amp;gt;Identifier case folding notes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add autonomous transactions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00893.php &amp;lt;nowiki&amp;gt;autonomous transactions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Give query progress indication&lt;br /&gt;
* [[Query progress indication]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rethink our type system&lt;br /&gt;
* [[Rethinking datatypes]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Features We Do ''Not'' Want ==&lt;br /&gt;
&lt;br /&gt;
The following features have been discussed ad nauseum on the PostgreSQL mailing lists and the consensus has been that the project is not interested in them.  As such, if you are going to bring them up as potential features, you will want to be familiar with all of the arguments against these features which have been previously made over the years.  If you decide to work on such features anyway, you should be aware that you face a higher-than-normal barrier to get the Project to accept them.&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|All backends running as threads in a single process (not wanted)&lt;br /&gt;
|This eliminates the process protection we get from the current setup. Thread creation is usually the same overhead as process creation on modern systems, so it seems unwise to use a pure threaded model, and MySQL and DB2 have demonstrated that threads introduce as many issues as they solve.  Threading specific operations such as I/O, seq scans, and connection management has been discussed and will probably be implemented to enable specific performance features.  Moving to a threaded engine would also require halting all other work on PostgreSQL for one to two years.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;quot;Oracle-style&amp;quot; optimizer hints (not wanted)&lt;br /&gt;
|Optimizer hints, as implemented in Oracle and other RDBMSes, are used to work around problems in the optimizer and introduce upgrade and maintenance issues.  We would rather have such problems reported and fixed.  We have discussed a more sophisticated system of per-class cost adjustment instead, but a specification remains to be developed. See [[OptimizerHintsDiscussion|Optimizer Hints Discussion]] for further information.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Embedded server (not wanted)&lt;br /&gt;
|While PostgreSQL clients runs fine in limited-resource environments, the server requires multiple processes and a stable pool of resources to run reliably and efficiently. Stripping down the PostgreSQL server to run in the same process address space as the client application would add too much complexity and failure cases. Besides, there are several very mature embedded SQL databases already available.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Obfuscated function source code (not wanted)&lt;br /&gt;
|Obfuscating function source code has minimal protective benefits because anyone with super-user access can find a way to view the code. At the same time, it would greatly complicate backups and other administrative tasks. To prevent non-super-users from viewing function source code, remove SELECT permission on pg_proc.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-09/msg00668.php &amp;lt;nowiki&amp;gt;Obfuscated stored procedures (was Re: Oracle and Postgresql)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Indeterminate behavior for the GROUP BY clause (not wanted)&lt;br /&gt;
|At least one other database product allows specification of a subset of the result columns which GROUP BY would need to be able to provide predictable results; the server is free to return any value from the group.  This is not viewed as a desirable feature.  PostgreSQL 9.1 allows result columns that are not referenced by GROUP BY if a primary key for the same table is referenced in GROUP BY.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-03/msg00297.php &amp;lt;nowiki&amp;gt;Re: SQL compatibility reminder: MySQL vs PostgreSQL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Todo]]&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/Todo</id>
		<title>Todo</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/Todo"/>
				<updated>2012-01-16T18:28:04Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;/* ALTER */ add missing rename support items&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;margin: 1ex 1em; float: right;&amp;quot;&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This list contains '''all known PostgreSQL bugs and feature requests'''. If you would like to work on an item, please read the [[Developer FAQ]] first. There is also a [[Development_information|development information page]].&lt;br /&gt;
&lt;br /&gt;
* {{TodoPending}} - marks ordinary, incomplete items&lt;br /&gt;
* {{TodoEasy}} - marks items that are easier to implement&lt;br /&gt;
* {{TodoDone}} - marks changes that are done, and will appear in the PostgreSQL 9.2 release.&lt;br /&gt;
&lt;br /&gt;
For help on editing this list, please see [[Talk:Todo]]. &amp;lt;b&amp;gt;Please do not add items here without discussion on the mailing list.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 1ex 4em;&amp;quot;&amp;gt;&lt;br /&gt;
== Administration ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow administrators to cancel multi-statement idle transactions&lt;br /&gt;
|This allows locks to be released, but it is complex to report the cancellation back to the client.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01340.php &amp;lt;nowiki&amp;gt;Cancelling idle in transaction state&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00441.php &amp;lt;nowiki&amp;gt;Re: Cancelling idle in transaction state&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Check for unreferenced table files created by transactions that were in-progress when the server terminated abruptly&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00096.php &amp;lt;nowiki&amp;gt;Removing unreferenced files&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Set proper permissions on non-system schemas during db creation&lt;br /&gt;
|Currently all schemas are owned by the super-user because they are copied from the template1 database.  However, since all objects are inherited from the template database, it is not clear that setting schemas to the db owner is correct.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow log_min_messages to be specified on a per-module basis&lt;br /&gt;
|This would allow administrators to see more detailed information from specific sections of the backend, e.g. checkpoints, autovacuum, etc. Another idea is to allow separate configuration files for each module, or allow arbitrary SET commands to be passed to them. See also [[Logging Brainstorm]].}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Simplify creation of partitioned tables&lt;br /&gt;
|This would allow creation of partitioned tables without requiring creation of triggers or rules for INSERT/UPDATE/DELETE, and constraints for rapid partition selection.  Options could include range and hash partition selection. See also [[Table partitioning]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow custom variables to appear in pg_settings()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00850.php &amp;lt;nowiki&amp;gt;Re: count(*) performance improvement ideas&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have custom variables be transaction-safe&lt;br /&gt;
* {{MessageLink|4B577E9F.8000505@dunslane.net|Custom GUCs still a bit broken}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement the SQL-standard mechanism whereby REVOKE ROLE revokes only the privilege granted by the invoking role, and not those granted by other roles&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-05/msg00010.php &amp;lt;nowiki&amp;gt;Re: Grantor name gets lost when grantor role dropped&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent query cancel packets from being replayed by an attacker, especially when using SSL&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg00345.php &amp;lt;nowiki&amp;gt;Replay attack of query cancel&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a way to query the log collector subprocess to determine the name of the currently active log file&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-11/msg00418.php &amp;lt;nowiki&amp;gt;Current log files when rotating?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow simpler reporting of the unix domain socket directory and allow easier configuration of its default location&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg01555.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-10/msg01482.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow custom daemons to be automatically stopped/started along with the postmaster&lt;br /&gt;
|This allows easier administration of daemons like user job schedulers or replication-related daemons.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01701.php &amp;lt;nowiki&amp;gt;Re: scheduler in core&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve logging of prepared transactions recovered during startup&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg00092.php &amp;lt;nowiki&amp;gt;&amp;amp;quot;recovering prepared transaction&amp;amp;quot; after server restart message&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using POSIX shared memory to avoid System V shared memory kernel limits&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4DFA2673.3010009@enterprisedb.com &amp;lt;nowiki&amp;gt;POSIX shared memory patch status&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Address problem where superusers are assumed to be members of all groups&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00337.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Configuration files ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Change pg_ident.conf parsing to be the same as pg_hba.conf&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg02204.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow postgresql.conf file values to be changed via an SQL API, perhaps using SET GLOBAL&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg00764.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider normalizing fractions in postgresql.conf, perhaps using '%'&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00550.php &amp;lt;nowiki&amp;gt;Fractions in GUC variables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow Kerberos to disable stripping of realms so we can check the username@realm against multiple realms&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00009.php &amp;lt;nowiki&amp;gt;krb_match_realm patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve LDAP authentication configuration options&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01745.php &amp;lt;nowiki&amp;gt;Proposed Patch - LDAPS support for servers on port 636 w/o TLS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add external tool to auto-tune some postgresql.conf parameters&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00000.php &amp;lt;nowiki&amp;gt;Re: Overhauling GUCS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00033.php &amp;lt;nowiki&amp;gt;Simple postgresql.conf wizard&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add 'hostgss' pg_hba.conf option to allow GSS link-level encryption&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg01454.php &amp;lt;nowiki&amp;gt;Re: Plans for 8.4&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Process pg_hba.conf keywords as case-insensitive&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00432.php &amp;lt;nowiki&amp;gt;More robust pg_hba.conf parsing/error logging&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create utility to compute accurate random_page_cost value&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-04/msg00162.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-04/msg00362.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow configuration files to be independently validated&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01831.php&lt;br /&gt;
* http://archives.postgresql.org/message-id/12666.1310774573@sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow postgresql.conf settings to be accepted by backends even if some settings are invalid for those backends&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00330.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00375.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow all backends to receive postgresql.conf setting changes at the same time&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00330.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00375.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Tablespaces ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow a database in tablespace t1 with tables created in tablespace t2 to be used as a template for a new database created with default tablespace t2&lt;br /&gt;
|Currently all objects in the default database tablespace must have default tablespace specifications. This is because new databases are created by copying directories. If you mix default tablespace tables and tablespace-specified tables in the same directory, creating a new database from such a mixed directory would create a new database with tables that had incorrect explicit tablespaces.  To fix this would require modifying pg_class in the newly copied database, which we don't currently do.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow reporting of which objects are in which tablespaces&lt;br /&gt;
|This item is difficult because a tablespace can contain objects from multiple databases. There is a server-side function that returns the databases which use a specific tablespace, so this requires a tool that will call that function and connect to each database to find the objects in each database for that tablespace.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow WAL replay of CREATE TABLESPACE to work when the directory structure on the recovery computer is different from the original}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow per-tablespace quotas}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow tablespaces on RAM-based partitions for unlogged tables&lt;br /&gt;
* http://archives.postgresql.org/pgsql-advocacy/2011-05/msg00033.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow toast tables to be moved to a different tablespace&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00980.php&lt;br /&gt;
* {{messageLink|CAFEQCbH756DyyAPQ1ykh3+b+kE1-EhWRww1WO_x5v38C-uLnUg@mail.gmail.com|patch : Allow toast tables to be moved to a different tablespace}} (issues remain)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Collector ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow statistics last vacuum/analyze execution times to be displayed without requiring track_counts to be enabled&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2007-04/msg00028.php &amp;lt;nowiki&amp;gt;row-level stats and last analyze time&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Clear table counters on TRUNCATE&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg00169.php &amp;lt;nowiki&amp;gt;Small TRUNCATE glitch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== SSL ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SSL authentication/encryption over unix domain sockets&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00924.php &amp;lt;nowiki&amp;gt;Re: Spoofing as the postmaster&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SSL key file permission checks to be optionally disabled when sharing SSL keys with other applications&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00069.php &amp;lt;nowiki&amp;gt;BUG #3809: SSL &amp;amp;quot;unsafe&amp;amp;quot; private key permissions bug&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SSL CRL files to be re-read during configuration file reload, rather than requiring a server restart&lt;br /&gt;
|Unlike SSL CRT files, CRL (Certificate Revocation List) files are updated frequently&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-12/msg00832.php &amp;lt;nowiki&amp;gt;Automatic CRL reload&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
Alternatively or additionally supporting OCSP (online certificate security protocol) would provide real-time revocation discovery without reloading&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Allow automatic selection of SSL client certificates from a certificate store&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00406.php &amp;lt;nowiki&amp;gt;Allow multiple certificates or keys in the postgresql.crt/.key files&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Send the full certificate server chain to the client&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-12/msg00145.php BUG #5245: Full Server Certificate Chain Not Sent to client]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Point-In-Time Recovery (PITR) ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Create dump tool for write-ahead logs for use in determining transaction id for point-in-time recovery&lt;br /&gt;
|This is useful for checking PITR recovery.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow archive_mode to be changed without server restart?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01655.php &amp;lt;nowiki&amp;gt;Enabling archive_mode without restart&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider avoiding WAL switching via archive_timeout if there has been no database activity&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg01469.php &amp;lt;nowiki&amp;gt;archive_timeout behavior for no activity&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg00395.php &amp;lt;nowiki&amp;gt;Re: archive_timeout behavior for no activity&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Standby server mode ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Allow pg_xlogfile_name() to be used in recovery mode&lt;br /&gt;
* [http://archives.postgresql.org/message-id/3f0b79eb1001190135vd9f62f1sa7868abc1ea61d12@mail.gmail.com &amp;lt;nowiki&amp;gt;Streaming replication and pg_xlogfile_name()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Prevent variables inherited from the server environment from begin used for making streaming replication connections.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01011.php &amp;lt;nowiki&amp;gt;Re: Parameter name standby_mode&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
| Allow hot file system backups on standby servers&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01727.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01490.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Change walsender so that it applies per-role settings&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg00642.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Add more control over waiting for synchronous commit&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01611.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Restructure configuration parameters for standby mode&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg01820.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Allow time-delayed application of logs on the standby&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00992.php&lt;br /&gt;
}}&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Add -X parameter to pg_basebackup to specify a different directory for px_xlog, like initdb&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Data Types ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix data types where equality comparison is not intuitive, e.g. box&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-10/msg01643.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for public SYNONYMs&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00519.php &amp;lt;nowiki&amp;gt;Proposal for SYNONYMS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg02043.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-general/2010-12/msg00139.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for SQL-standard GENERATED/IDENTITY columns&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-07/msg00543.php &amp;lt;nowiki&amp;gt;Re: Three weeks left until feature freeze&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-08/msg00038.php &amp;lt;nowiki&amp;gt;GENERATED ... AS IDENTITY, Was: Re: Feature Freeze&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00344.php &amp;lt;nowiki&amp;gt;Behavior of GENERATED columns per SQL2003&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00076.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Behavior of GENERATED columns per SQL2003&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00604.php &amp;lt;nowiki&amp;gt;IDENTITY/GENERATED patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider placing all sequences in a single table, or create a system view&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php &amp;lt;nowiki&amp;gt;Re: newbie: renaming sequences task&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a special data type for regular expressions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg01067.php &amp;lt;nowiki&amp;gt;Why is there a tsquery data type?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce BIT data type overhead using short varlena headers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-12/msg00273.php &amp;lt;nowiki&amp;gt;storage size of &amp;amp;quot;bit&amp;amp;quot; data type..&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow renaming and deleting enumerated values from an existing enumerated data type&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support scoped IPv6 addresses in the inet type&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-05/msg00111.php &amp;lt;nowiki&amp;gt;strange problem with ip6&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a JSON (JavaScript Object Notation) data type&lt;br /&gt;
|This would behave similar to the XML data type, which is stored as text, but allows element lookup and conversion functions.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01494.php &amp;lt;nowiki&amp;gt;PATCH: Add hstore_to_json()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg00001.php &amp;lt;nowiki&amp;gt;Re: PATCH: Add hstore_to_json()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-03/msg01092.php &amp;lt;nowiki&amp;gt;Proposal: Add JSON support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00057.php &amp;lt;nowiki&amp;gt;Re: Proposal: Add JSON support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00481.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01694.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-12/msg00219.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Considering improving performance of computing CHAR() value lengths&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00900.php &amp;lt;nowiki&amp;gt;char() overhead on read-only workloads not so insignifcant as the docs claim it is...&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01787.php &amp;lt;nowiki&amp;gt;Re: [PATCH] backend: compare word-at-a-time in bcTruelen&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add overlaps geometric operators that ignore point overlaps&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-03/msg00861.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Add IMMUTABLE column attribute&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-11/msg00623.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Domains ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow functions defined as casts to domains to be called during casting&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-05/msg00072.php &amp;lt;nowiki&amp;gt;bug? non working casts for domain&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-09/msg01681.php &amp;lt;nowiki&amp;gt;TODO: Fix CREATE CAST on DOMAINs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow values to be cast to domain types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2003-06/msg01206.php &amp;lt;nowiki&amp;gt;Domain casting still doesn't work right&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00289.php &amp;lt;nowiki&amp;gt;domain casting?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00812.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make domains work better with polymorphic functions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4887.1228700773@sss.pgh.pa.us Polymorphic types vs. domains]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/15535.1238774571@sss.pgh.pa.us some difficulties with fixing it]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Dates and Times ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow infinite intervals just like infinite timestamps&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-11/msg00076.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow TIMESTAMP WITH TIME ZONE to store the original timezone information, either zone name or offset from UTC&lt;br /&gt;
|If the TIMESTAMP value is stored with a time zone name, interval computations should adjust based on the time zone rules. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-10/msg00705.php &amp;lt;nowiki&amp;gt;timestamp with time zone a la sql99&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have timestamp subtraction not call justify_hours()?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-sql/2006-10/msg00059.php &amp;lt;nowiki&amp;gt;timestamp subtraction (was Re: formatting intervals with to_char)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve TIMESTAMP WITH TIME ZONE subtraction to be DST-aware&lt;br /&gt;
|Currently subtracting one date from another that crosses a daylight savings time adjustment can return '1 day 1 hour', but adding that back to the first date returns a time one hour in the future.  This is caused by the adjustment of '25 hours' to '1 day 1 hour', and '1 day' is the same time the next day, even if daylight savings adjustments are involved.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix interval display to support values exceeding 2^31 hours}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add overflow checking to timestamp and interval arithmetic}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add function to allow the creation of timestamps using parameters&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-06/msg00232.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Arrays ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for arrays of domains&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00114.php &amp;lt;nowiki&amp;gt;Re: updated WIP: arrays of composites&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow single-byte header storage for array elements}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add function to detect if an array is empty&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00475.php &amp;lt;nowiki&amp;gt;Re: array_length()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of empty arrays&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01033.php &amp;lt;nowiki&amp;gt;So what's an &amp;amp;quot;empty&amp;amp;quot; array anyway?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of NULLs in arrays&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-11/msg00009.php &amp;lt;nowiki&amp;gt;BUG #4509: array_cat's null behaviour is inconsistent&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg01040.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Binary Data ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve vacuum of large objects, like contrib/vacuumlo?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Auto-delete large objects when referencing row is deleted&lt;br /&gt;
|contrib/lo offers this functionality.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow read/write into TOAST values like large objects&lt;br /&gt;
|Writing might require the TOAST column to be stored EXTERNAL.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00049.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add API for 64-bit large object access&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-09/msg00781.php &amp;lt;nowiki&amp;gt;64-bit API for large objects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg01790.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== MONEY Data Type ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add locale-aware MONEY type, and support multiple currencies&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2005-08/msg01432.php &amp;lt;nowiki&amp;gt;A real currency type&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01181.php &amp;lt;nowiki&amp;gt;Money type todos?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|MONEY dumps in a locale-specific format making it difficult to restore to a system with a different locale}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Text Search ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow dictionaries to change the token that is passed on to later dictionaries&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-11/msg00081.php &amp;lt;nowiki&amp;gt;a tsearch2 (8.2.4) dictionary that only filters out stopwords&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a function-based API for '@@' searches&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00511.php &amp;lt;nowiki&amp;gt;Simplifying Text Search&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve text search error messages&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00966.php &amp;lt;nowiki&amp;gt;Poorly designed tsearch NOTICEs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg01146.php &amp;lt;nowiki&amp;gt;Re: Poorly designed tsearch NOTICEs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider changing error to warning for strings larger than one megabyte&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-02/msg00190.php &amp;lt;nowiki&amp;gt;BUG #3975: tsearch2 index should not bomb out of 1Mb limit&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-03/msg00062.php &amp;lt;nowiki&amp;gt;Re: [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|tsearch and tsdicts regression tests fail in Turkish locale on glibc&lt;br /&gt;
* [http://archives.postgresql.org/message-id/49749645.5070801@gmx.net tsearch with Turkish locale]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|tsquery negator operator treated as part of lexeme&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-06/msg00346.php BUG #4887: inclusion operator (@&amp;gt;) on tsqeries behaves not conforming to documentation]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of plus signs in email address user names, and perhaps improve URL parsing&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg00772.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve default parser, to more easily allow adding new tokens&lt;br /&gt;
* http://archives.postgresql.org/message-id/23485.1297727826@sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add additional support functions&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00319.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== XML ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow XML arrays to be cast to other data types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00981.php &amp;lt;nowiki&amp;gt;proposal casting from XML[] to int[], numeric[], text[]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00231.php &amp;lt;nowiki&amp;gt;Re: proposal casting from XML[] to int[], numeric[], text[]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00471.php &amp;lt;nowiki&amp;gt;Re: proposal casting from XML[] to int[], numeric[], text[]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add XML Schema validation and xmlvalidate functions (SQL:2008)}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add xmlvalidatedtd variant to support validating against a DTD?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Relax-NG validation; libxml2 supports this already}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow reliable XML operation non-UTF8 server encodings (xpath(), in particular, is known to not work)&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-01/msg00135.php &amp;lt;nowiki&amp;gt;BUG #4622: xpath only work in utf-8 server encoding&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
* http://archives.postgresql.org/message-id/4110.1238973350@sss.pgh.pa.us}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add functions from SQL:2006: XMLDOCUMENT, XMLCAST, XMLTEXT}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add XMLNAMESPACES support in XMLELEMENT and elsewhere}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move XSLT from contrib/xml2 to a more reasonable location&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg00539.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Report errors returned by the XSLT library&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg00562.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve the XSLT parameter passing API&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg00416.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|XML Canonical: Convert XML documents to canonical form to compare them. libxml2 has support for this.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add pretty-printed XML output option&lt;br /&gt;
|Parse a document and serialize it back in some indented form. libxml2 might support this.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add XMLQUERY (from the SQL/XML standard)}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow XML sthredding&lt;br /&gt;
|In some cases shredding could be better option (if there is no need to keep XML docs entirely, e.g. if we have already developed tools that understand only relational data.  This would be a separate module that implements annotated schema decomposition technique, similar to DB2 and SQL Server functionality.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix Nested or repeated xpath() that apparently mess up namespaces [http://archives.postgresql.org/pgsql-bugs/2008-03/msg00097.php] [http://archives.postgresql.org/pgsql-bugs/2008-03/msg00144.php] [http://archives.postgresql.org/pgsql-general/2008-03/msg00295.php] [http://archives.postgresql.org/pgsql-bugs/2008-07/msg00054.php] [http://archives.postgresql.org/message-id/004f01c90e91$138e9d10$3aabd730$@anstett@iaas.uni-stuttgart.de]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|XPath: Adding the &amp;lt;x&amp;gt; at the root causes problems [http://archives.postgresql.org/pgsql-bugs/2008-05/msg00184.php] [http://archives.postgresql.org/pgsql-bugs/2008-07/msg00054.php] [http://archives.postgresql.org/pgsql-general/2008-07/msg00613.php]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|xpath_table needs to be implemented/implementable to get rid of contrib/xml2 [http://archives.postgresql.org/pgsql-general/2008-05/msg00823.php]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|xpath_table is pretty broken anyway [http://archives.postgresql.org/pgsql-hackers/2010-02/msg02424.php]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|better handling of XPath data types [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00616.php] [http://archives.postgresql.org/message-id/004a01c90e90$4b986d90$e2c948b0$@anstett@iaas.uni-stuttgart.de]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of PIs and DTDs in xmlconcat() [http://archives.postgresql.org/message-id/200904211211.n3LCB09p008988@wwwmaster.postgresql.org]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Restructure XML and /contrib/xml2 functionality&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02314.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00017.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow INET subnet comparisons using non-constants to be indexed}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add an INET overlaps operator, for use by exclusion constraints &lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-03/msg00845.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Enforce typmod for function inputs, function results and parameters for spi_prepare'd statements called from PLs&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg01403.php &amp;lt;nowiki&amp;gt;Re: BUG #2917: spi_prepare doesn't accept typename aliases&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg01160.php &amp;lt;nowiki&amp;gt;RFC for adding typmods to functions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix IS OF so it matches the ISO specification, and add documentation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2003-08/msg00060.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] IS OF&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00060.php &amp;lt;nowiki&amp;gt;ToDo: add documentation for operator IS OF&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement Boyer-Moore searching in LIKE queries&lt;br /&gt;
* {{messageLink|27645.1220635769@sss.pgh.pa.us|TODO item: Implement Boyer-Moore searching (First time hacker)}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent malicious functions from being executed with the permissions of unsuspecting users&lt;br /&gt;
|Index functions are safe, so VACUUM and ANALYZE are safe too.  Triggers, CHECK and DEFAULT expressions, and rules are still vulnerable. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00268.php &amp;lt;nowiki&amp;gt;Some notes about the index-functions security vulnerability&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce memory usage of aggregates in set returning functions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2008-01/msg00031.php &amp;lt;nowiki&amp;gt;Re: Performance of aggregates over set-returning functions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix /contrib/ltree operator&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-11/msg00044.php &amp;lt;nowiki&amp;gt;BUG #3720: wrong results at using ltree&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix /contrib/btree_gist's implementation of inet indexing&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2010-10/msg00099.php &amp;lt;nowiki&amp;gt;BUG #5705: btree_gist: Index on inet changes query result&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Fix inconsistent precedence of =, &amp;amp;gt;, and &amp;amp;lt; compared to &amp;amp;lt;&amp;amp;gt;, &amp;amp;gt;=, and &amp;amp;lt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00145.php &amp;lt;nowiki&amp;gt;BUG #3822: Nonstandard precedence for comparison operators&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix regular expression bug when using complex back-references&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00000.php &amp;lt;nowiki&amp;gt;BUG #3645: regular expression back references seem broken&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have /contrib/dblink reuse unnamed connections&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00895.php &amp;lt;nowiki&amp;gt;dblink un-named connection doesn't get re-used&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve formatting of pg_get_viewdef() output&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg01648.php &amp;lt;nowiki&amp;gt;pg_get_viewdef formattiing&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01885.php &amp;lt;nowiki&amp;gt;Re: pretty print viewdefs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add function to dump pg_depend information cleanly&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00226.php &amp;lt;nowiki&amp;gt;Elementary dependency look-up&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve relation size functions such as pg_relation_size() to avoid producing an error when called against a no longer visible relation&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28488.1286461610@sss.pgh.pa.us pg_relation_size / could not open relation with OID #]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Character Formatting ===&lt;br /&gt;
&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow to_date() and to_timestamp() to accept localized month names}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add missing parameter handling in to_char()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-12/msg00948.php &amp;lt;nowiki&amp;gt;Re: to_char and i18n&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Throw an error from to_char() instead of printing a string of &amp;quot;#&amp;quot; when a number doesn't fit in the desired output format.&lt;br /&gt;
* discussed in [http://archives.postgresql.org/message-id/37ed240d0907290836w42187222n18664dfcbcb445b1@mail.gmail.com &amp;quot;to_char, support for EEEE format&amp;quot;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow to_char() on interval values to accumulate the highest unit requested&lt;br /&gt;
|2= Some special format flag would be required to request such accumulation.  Such functionality could also be added to EXTRACT. Prevent accumulation that crosses the month/day boundary because of the uneven number of days in a month.&lt;br /&gt;
* to_char(INTERVAL '1 hour 5 minutes', 'MI') =&amp;amp;gt; 65&lt;br /&gt;
* to_char(INTERVAL '43 hours 20 minutes', 'MI' ) =&amp;amp;gt; 2600&lt;br /&gt;
* to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') =&amp;amp;gt; 0:1:19:20&lt;br /&gt;
* to_char(INTERVAL '3 years 5 months','MM') =&amp;amp;gt; 41&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix to_number() handling for values not matching the format string&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg01447.php &amp;lt;nowiki&amp;gt;Re: numeric_to_number() function skipping some digits&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Multi-Language Support ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add NCHAR (as distinguished from ordinary varchar),}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a cares-about-collation column to pg_proc, so that unresolved-collation errors can be thrown at parse time&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-03/msg01520.php &amp;lt;nowiki&amp;gt;Open issues for collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Integrate collations with text search configurations&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28887.1303579034@sss.pgh.pa.us &amp;lt;nowiki&amp;gt;Some TODO items for collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Integrate collations with to_char() and related functions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28887.1303579034@sss.pgh.pa.us &amp;lt;nowiki&amp;gt;Some TODO items for collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support collation-sensitive equality and hashing functions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-06/msg00472.php &amp;lt;nowiki&amp;gt; contrib/citext versus collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a LOCALE option to CREATE DATABASE, as a shorthand&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00119.php &amp;lt;nowiki&amp;gt; Re: 8.4 open items list&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support multiple simultaneous character sets, per SQL:2008}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve UTF8 combined character handling?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add octet_length_server() and octet_length_client()}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make octet_length_client() the same as octet_length()?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problems with wrong runtime encoding conversion for NLS message files}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add URL to more complete multi-byte regression tests&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-07/msg00272.php &amp;lt;nowiki&amp;gt;Multi-byte and client side character encoding tests for copy command..&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix contrib/fuzzystrmatch to work with multibyte encodings&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-04/msg00047.php &amp;lt;nowiki&amp;gt; soundex function returns UTF-16 characters&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00138.php &amp;lt;nowiki&amp;gt; dmetaphone woes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change memory allocation for multi-byte functions so memory is allocated inside conversion functions&lt;br /&gt;
|Currently we preallocate memory based on worst-case usage.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ability to use case-insensitive regular expressions on multi-byte characters&lt;br /&gt;
|Currently it works for UTF-8, but not other multi-byte encodings&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00433.php &amp;lt;nowiki&amp;gt;Regexps vs. locale&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* {{MessageLink|20091201210024.B1393753FB7@cvs.postgresql.org|A partial solution for UTF-8}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve encoding of connection startup messages sent to the client&lt;br /&gt;
|Currently some authentication error messages are sent in the server encoding&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-12/msg00801.php &amp;lt;nowiki&amp;gt;encoding of PostgreSQL messages&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2009-01/msg00005.php &amp;lt;nowiki&amp;gt;Re: encoding of PostgreSQL messages&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|More sensible support for Unicode combining characters, normal forms&lt;br /&gt;
* http://archives.postgresql.org/message-id/200904141532.44618.peter_e@gmx.net&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Views / Rules ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Automatically create rules on views so they are updateable, per SQL:2008&lt;br /&gt;
|We can only auto-create rules for simple views.  For more complex cases users will still have to write rules manually.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00586.php &amp;lt;nowiki&amp;gt;Proposal for updatable views&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-08/msg00255.php &amp;lt;nowiki&amp;gt;Updatable views&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg01746.php &amp;lt;nowiki&amp;gt;Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Updatable_views&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add the functionality of the WITH CHECK OPTION clause to CREATE VIEW}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow VIEW/RULE recompilation when the underlying tables change&lt;br /&gt;
|This is both difficult and controversial.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01723.php Re: About &amp;quot;Allow VIEW/RULE recompilation when the underlying tables change&amp;quot;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01724.php Re: About &amp;quot;Allow VIEW/RULE recompilation when the underlying tables change&amp;quot;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make it possible to use RETURNING together with conditional DO INSTEAD rules, such as for partitioning setups&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00577.php &amp;lt;nowiki&amp;gt;RETURNING and DO INSTEAD ... Intentional or not?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add the ability to automatically create materialized views&lt;br /&gt;
|Right now materialized views require the user to create triggers on the main table to keep the summary table current.  SQL syntax should be able to manage the triggers and summary table automatically.  A more sophisticated implementation would automatically retrieve from the summary table when the main table is referenced, if possible.  See [[Materialized Views]] for implementation details&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00479.php &amp;lt;nowiki&amp;gt;GSoC - proposal - Materialized Views in PostgreSQL&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve ability to modify views via ALTER TABLE&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00691.php &amp;lt;nowiki&amp;gt;Re: idea: storing view source in system catalogs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg01410.php &amp;lt;nowiki&amp;gt;modifying views&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg00300.php &amp;lt;nowiki&amp;gt;Re: patch: Add columns via CREATE OR REPLACE VIEW&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent low-cost functions from seeing unauthorized view rows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg01346.php &amp;lt;nowiki&amp;gt;Using views for row-level access control is leaky&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== SQL Commands ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT&lt;br /&gt;
* [http://dissipatedheat.com/2011/11/10/how-not-to-write-a-patch-for-postgresql/ How not to write this patch.]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve type determination of unknown (NULL or quoted literal) result columns for UNION/INTERSECT/EXCEPT&lt;br /&gt;
* [http://archives.postgresql.org/message-id/9799.1302719551@sss.pgh.pa.us &amp;lt;nowiki&amp;gt;UNION construct type cast gives poor error message&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00838.php &amp;lt;nowiki&amp;gt;WIP: grouping sets support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00466.php &amp;lt;nowiki&amp;gt;Implementation of GROUPING SETS (T431: Extended grouping 	capabilities)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow prepared transactions with temporary tables created and dropped in the same transaction, and when an ON COMMIT DELETE ROWS temporary table is accessed&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00047.php &amp;lt;nowiki&amp;gt;Re: &amp;amp;quot;could not open relation 1663/16384/16584: No such file or directory&amp;amp;quot; in a specific combination of transactions with temp tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/492543D5.9050904@enterprisedb.com A suggestion on how to implement this]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a GUC variable to warn about non-standard SQL usage in queries}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add SQL-standard MERGE/REPLACE/UPSERT command&lt;br /&gt;
|MERGE is typically used to merge two tables.  REPLACE or UPSERT command does UPDATE, or on failure, INSERT. See [[SQL MERGE]] for notes on the implementation details.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add NOVICE output level for helpful messages&lt;br /&gt;
|For example, have it warn about unjoined tables.  This could also control automatic sequence/index creation messages.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow NOTIFY in rules involving conditionals}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow EXPLAIN to identify tables that were skipped because of constraint_exclusion&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Simplify dropping roles that have objects in several databases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow the count returned by SELECT, etc to be represented as an int64 to allow a higher range of values}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for WITH RECURSIVE ... CYCLE&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00291.php &amp;lt;nowiki&amp;gt;WITH RECURSIVE ... CYCLE in vanilla SQL: issues with arrays of rows&amp;lt;/nowiki&amp;gt;]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add DEFAULT .. AS OWNER so permission checks are done as the table owner&lt;br /&gt;
|This would be useful for SERIAL nextval() calls and CHECK constraints.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow DISTINCT to work in multiple-argument aggregate calls}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add comments on system tables/columns using the information in catalogs.sgml&lt;br /&gt;
|Ideally the information would be pulled from the SGML file automatically.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent the specification of conflicting transaction read/write options&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00684.php &amp;lt;nowiki&amp;gt;Re: SET TRANSACTION and SQL Standard&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support LATERAL subqueries&lt;br /&gt;
|Lateral subqueries can reference columns of tables defined outside the subquery at the same level, i.e. ''laterally''.&lt;br /&gt;
For example, a LATERAL subquery in a FROM clause could reference tables defined in the same FROM clause.&lt;br /&gt;
Currently only the columns of tables defined ''above'' subqueries are recognized.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00292.php &amp;lt;nowiki&amp;gt;LATERAL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg00991.php &amp;lt;nowiki&amp;gt;Re: LATERAL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent temporary tables created with ON COMMIT DELETE ROWS from repeatedly truncating the table on every commit if the table is already empty&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00842.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-03/msg00392.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-04/msg00046.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow DELETE and UPDATE to be used with LIMIT and ORDER BY&lt;br /&gt;
* http://archives.postgresql.org/pgadmin-hackers/2010-04/msg00078.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg01997.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00021.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Improve caching of prepared query plans&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow PREPARE of cursors}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have DISCARD PLANS discard plans cached by functions&lt;br /&gt;
|DISCARD all should do the same.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00431.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid multiple-evaluation of BETWEEN and IN arguments containing volatile expressions&lt;br /&gt;
* http://archives.postgresql.org/message-id/4D95B605.2020709@enterprisedb.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix nested CASE-WHEN constructs&lt;br /&gt;
* http://archives.postgresql.org/message-id/4DDCEEB8.50602@enterprisedb.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== CREATE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow CREATE TABLE AS to determine column lengths for complex expressions like SELECT col1 || col2}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have WITH CONSTRAINTS also create constraint indexes&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-04/msg00149.php &amp;lt;nowiki&amp;gt;Re: CREATE TABLE LIKE INCLUDING INDEXES support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move NOT NULL constraint information to pg_constraint&lt;br /&gt;
|Currently NOT NULL constraints are stored in pg_attribute without any designation of their origins, e.g. primary keys.  One manifest problem is that dropping a PRIMARY KEY constraint does not remove the NOT NULL constraint designation.  Another issue is that we should probably force NOT NULL to be propagated from parent tables to children, just as CHECK constraints are.  (But then does dropping PRIMARY KEY affect children?)&lt;br /&gt;
* http://archives.postgresql.org/message-id/19768.1238680878@sss.pgh.pa.us&lt;br /&gt;
* http://archives.postgresql.org/message-id/200909181005.n8IA5Ris061239@wwwmaster.postgresql.org&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-07/msg01223.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent concurrent CREATE TABLE from sometimes returning a cryptic error message&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00169.php &amp;lt;nowiki&amp;gt;BUG #3692: Conflicting create table statements throw unexpected error&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add CREATE SCHEMA ... LIKE that copies a schema}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix CREATE OR REPLACE FUNCTION to not leave objects depending on the function in inconsistent state&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-08/msg00985.php indexes on functions and create or replace function]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow temporary tables to exist as empty by default in all sessions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00006.php &amp;lt;nowiki&amp;gt;what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg01329.php &amp;lt;nowiki&amp;gt;idea: global temp tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org//pgsql-hackers/2009-05/msg00016.php &amp;lt;nowiki&amp;gt;Re: idea: global temp tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg01098.php &amp;lt;nowiki&amp;gt;global temporary tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow the creation of &amp;quot;distinct&amp;quot; types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01647.php &amp;lt;nowiki&amp;gt;Distinct types&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider analyzing temporary tables when they are first used in a query&lt;br /&gt;
|Autovacuum cannot analyze or vacuum temporary tables.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00416.php &amp;lt;nowiki&amp;gt;autovacuum and temp tables support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow an unlogged table to be changed to logged&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00315.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00437.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00323.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00237.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== UPDATE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Allow UPDATE tab SET ROW (col, ...) = (SELECT...)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-07/msg01308.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] extension for sql update&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00865.php &amp;lt;nowiki&amp;gt;UPDATE using sub selects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-04/msg00315.php &amp;lt;nowiki&amp;gt;UPDATE using sub selects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-03/msg00237.php &amp;lt;nowiki&amp;gt;Re: UPDATE using sub selects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Research self-referential UPDATEs that see inconsistent row versions in read-committed mode&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00507.php &amp;lt;nowiki&amp;gt;Concurrently updating an updatable view&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00016.php &amp;lt;nowiki&amp;gt;Re: Do we need a TODO? (was Re: Concurrently updating anupdatable view)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve performance of EvalPlanQual mechanism that rechecks already-updated rows&lt;br /&gt;
|This is related to the previous item, which questions whether it even has the right semantics&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-09/msg00045.php &amp;lt;nowiki&amp;gt;BUG #4401: concurrent updates to a table blocks one update indefinitely&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-07/msg00302.php &amp;lt;nowiki&amp;gt;BUG #4945: Parallel update(s) gone wild&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== ALTER ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have ALTER TABLE RENAME of a SERIAL column rename the sequence&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php &amp;lt;nowiki&amp;gt;Re: newbie: renaming sequences task&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have ALTER SEQUENCE RENAME rename the sequence name stored in the sequence table&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-09/msg00092.php &amp;lt;nowiki&amp;gt;BUG #3619: Renaming sequence does not update its 'sequence_name' field&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00007.php &amp;lt;nowiki&amp;gt;Re: BUG #3619: Renaming sequence does not update its 'sequence_name' field&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php &amp;lt;nowiki&amp;gt;Re: newbie: renaming sequences task&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME or ALTER TABLE RENAME CONSTRAINT&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-02/msg00168.php &amp;lt;nowiki&amp;gt;ALTER CONSTRAINT RENAME patch reverted&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ALTER DOMAIN to modify the underlying data type}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow ALTER TABLESPACE to move the tablespace to different directories}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow moving system tables to other tablespaces, where possible&lt;br /&gt;
|Currently non-global system tables must be in the default database tablespace. Global system tables can never be moved.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have ALTER INDEX update the name of a constraint using that index}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow column display reordering by recording a display, storage, and permanent id for every column?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00782.php &amp;lt;nowiki&amp;gt;Re: column ordering, was Re: [PATCHES] Enums patch v2&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg01029.php &amp;lt;nowiki&amp;gt;Column reordering in pg_dump&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow deactivating (and reactivating) indexes via ALTER TABLE&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg01191.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ALTER OPERATOR ... RENAME&lt;br /&gt;
|needs to consider effects of changing operator precedence&lt;br /&gt;
* [http://archives.postgresql.org/message-id/1322948781.26266.9.camel@vanquo.pezone.net Missing rename support]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ALTER TABLE ... RENAME RULE&lt;br /&gt;
* [http://archives.postgresql.org/message-id/1322948781.26266.9.camel@vanquo.pezone.net Missing rename support]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== CLUSTER ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Automatically maintain clustering on a table&lt;br /&gt;
|This might require some background daemon to maintain clustering during periods of low usage. It might also require tables to be only partially filled for easier reorganization.  Another idea would be to create a merged heap/index data file so an index lookup would automatically access the heap data too.  A third idea would be to store heap rows in hashed groups, perhaps using a user-supplied hash function.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2004-08/msg00350.php &amp;lt;nowiki&amp;gt;Equivalent praxis to CLUSTERED INDEX?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00155.php &amp;lt;nowiki&amp;gt;Re: Grouped Index Tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://community.enterprisedb.com/git/&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2009-10/msg00346.php &amp;lt;nowiki&amp;gt;Re: maintain_cluster_order_v5.patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== COPY ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY to report error lines and continue&lt;br /&gt;
|This requires the use of a savepoint before each COPY line is processed, with ROLLBACK on COPY failure. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00572.php &amp;lt;nowiki&amp;gt;Re: VLDB Features&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY FROM to create index entries in bulk&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00811.php &amp;lt;nowiki&amp;gt;Batch update of indexes on data loading&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY in CSV mode to control whether a quoted zero-length string is treated as NULL&lt;br /&gt;
|Currently this is always treated as a zero-length string, which generates an error when loading into an integer column &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00905.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] allow CSV quote in NULL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve COPY performance&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00954.php &amp;lt;nowiki&amp;gt;Re: 8.3 / 8.2.6 restore comparison&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01882.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY to report errors sooner&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01169.php &amp;lt;nowiki&amp;gt;Timely reporting of COPY errors&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY to handle other number formats&lt;br /&gt;
|E.g. the German notation. Best would be something like WITH DECIMAL ','.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow a stalled COPY to exit if the backend is terminated&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-04/msg00067.php &amp;lt;nowiki&amp;gt;Re: possible bug not in open items&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== GRANT/REVOKE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SERIAL sequences to inherit permissions from the base table?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow dropping of a role that has connection rights&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00736.php &amp;lt;nowiki&amp;gt;DROP ROLE dependency tracking ...&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== DECLARE CURSOR ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent DROP TABLE from dropping a table referenced by its own open cursor?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide some guarantees about the behavior of cursors that invoke volatile functions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/20997.1244563664@sss.pgh.pa.us Re: Cursor with hold emits the same row more than once across commits in 8.3.7]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== INSERT ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow INSERT/UPDATE of the system-generated oid value for a row}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|In rules, allow VALUES() to contain a mixture of 'old' and 'new' references}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== SHOW/SET ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM ANALYZE, and CLUSTER}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rationalize the discrepancy between settings that use values in bytes and SHOW that returns the object count&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2008-07/msg00007.php &amp;lt;nowiki&amp;gt;Re: [ADMIN] shared_buffers and shmmax&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== ANALYZE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have EXPLAIN ANALYZE issue NOTICE messages when the estimated and actual row counts differ by a specified percentage}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have EXPLAIN ANALYZE report rows as floating-point numbers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg01363.php &amp;lt;nowiki&amp;gt;explain analyze rows=%.0f&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00108.php &amp;lt;nowiki&amp;gt;Re: explain analyze rows=%.0f&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve how ANALYZE computes in-doubt tuples&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00771.php &amp;lt;nowiki&amp;gt;VACUUM/ANALYZE counting of in-doubt tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Window Functions ===&lt;br /&gt;
See {{messageLink|357.1230492361@sss.pgh.pa.us|TODO items for window functions}}.&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support creation of user-defined window functions&lt;br /&gt;
|We have the ability to create new window functions written in C.  Is it&lt;br /&gt;
worth the effort to create an API that would let them be written in PL/pgsql, etc?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement full support for window framing clauses&lt;br /&gt;
|In addition to done clauses described in the [http://developer.postgresql.org/pgdocs/postgres/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS latest doc], these clauses are not implemented yet.&lt;br /&gt;
* RANGE BETWEEN ... PRECEDING/FOLLOWING&lt;br /&gt;
* EXCLUDE&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Investigate tuplestore performance issues&lt;br /&gt;
|The tuplestore_in_memory() thing is just a band-aid, we ought to try to solve it properly.  tuplestore_advance seems like a weak spot as well.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00152.php &amp;lt;nowiki&amp;gt;tuplestore potential performance problem&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem|Do we really need so much duplicated code between Agg and WindowAgg?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Teach planner to evaluate multiple windows in the optimal order&lt;br /&gt;
|Currently windows are always evaluated in the query-specified order.&lt;br /&gt;
* http://archives.postgresql.org/message-id/3CDAD71E9D70417290FCF66F0178D1E1@amd64&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement DISTINCT clause in window aggregates&lt;br /&gt;
|Some proprietary RDBMSs have implemented it already, so it helps with porting from those.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Integrity Constraints ==&lt;br /&gt;
=== Keys ===&lt;br /&gt;
&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve deferrable unique constraints for cases with many conflicts&lt;br /&gt;
|The current implementation fires a trigger for each potentially conflicting row.  This might not scale well for an update that changes many key values at once.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Referential Integrity ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add MATCH PARTIAL referential integrity}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change foreign key constraint for array -&amp;amp;gt; element to mean element in array?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-10/msg01814.php &amp;lt;nowiki&amp;gt;foreign keys for array/period contains relationships&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem when cascading referential triggers make changes on cascaded tables, seeing the tables in an intermediate state&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Work-in-progress referential action trigger timing&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Optimize referential integrity checks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2005-10/msg00458.php &amp;lt;nowiki&amp;gt;Re: Effects of cascading references in foreign keys&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00744.php &amp;lt;nowiki&amp;gt;Can't ri_KeysEqual() consider two nulls as equal?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Server-Side Languages ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for polymorphic arguments and return types to languages other than PL/PgSQL}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for OUT and INOUT parameters to languages other than PL/PgSQL}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add more fine-grained specification of functions taking arbitrary data types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00367.php &amp;lt;nowiki&amp;gt;RfD: more powerful &amp;amp;quot;any&amp;amp;quot; types&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement stored procedures&lt;br /&gt;
|This might involve the control of transaction state and the return of multiple result sets&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-10/msg00454.php &amp;lt;nowiki&amp;gt;PL/pgSQL stored procedure returning multiple result sets (SELECTs)?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01375.php &amp;lt;nowiki&amp;gt;Proposal: real procedures again (8.4)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg00542.php&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-04/msg01149.php &amp;lt;nowiki&amp;gt;Gathering specs and discussion on feature (post 9.1)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow holdable cursors in SPI}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Add SPI_gettypmod() to return a field's typemod from a TupleDesc&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2005-11/msg00250.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== SQL-Language Functions ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SQL-language functions to reference parameters by parameter name&lt;br /&gt;
|Currently SQL-language functions can only refer to dollar parameters, e.g. $1&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01479.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01519.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00221.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rethink query plan caching and timing of parse analysis within SQL-language functions&lt;br /&gt;
|They should work more like plpgsql functions do ...&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2011-05/msg00078.php &amp;lt;nowiki&amp;gt;Re: BUG #6019: invalid cached plan on inherited table&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/pgSQL ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Allow listing of record column names, and access to record columns via variables, e.g. columns := r.(*), tval2 := r.(colname)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2005-07/msg00458.php &amp;lt;nowiki&amp;gt;Re: PL/PGSQL: Dynamic Record Introspection&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-05/msg00302.php &amp;lt;nowiki&amp;gt;Re: PL/PGSQL: Dynamic Record Introspection&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00031.php &amp;lt;nowiki&amp;gt;Re: PL/PGSQL: Dynamic Record Introspection&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow row and record variables to be set to NULL constants, and allow NULL tests on such variables&lt;br /&gt;
|Because a row is not scalar, do not allow assignment from NULL-valued scalars.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg00070.php &amp;lt;nowiki&amp;gt;NULL and plpgsql rows&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider keeping separate cached copies when search_path changes&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg01009.php &amp;lt;nowiki&amp;gt;pl/pgsql Plan Invalidation and search_path&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of NULL row values vs. NULL rows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg01758.php &amp;lt;nowiki&amp;gt;Null row vs. row of nulls in plpgsql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg01973.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve PERFORM handling of WITH queries or document limitation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-03/msg00309.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/Perl ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow regex operations in plperl using UTF8 characters in non-UTF8 encoded databases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/Python ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Develop a trusted variant of PL/Python.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create a new restricted execution class that will allow passing function arguments in as locals.  Passing them as globals means functions cannot be called recursively.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-02/msg01468.php &amp;lt;nowiki&amp;gt;Re: pl/python do not delete function arguments&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a DB-API compliant interface on top of the SPI interface&lt;br /&gt;
* http://petereisentraut.blogspot.com/2011/11/plpydbapi-db-api-for-plpython.html&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|For functions returning a setof record with a composite type, cache the I/O functions for the composite type&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg02007.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix loss of information during conversion of numeric type to Python float}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/Tcl ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add table function support}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Check encoding validity of values passed back to Postgres in function returns, trigger tuple changes, and SPI calls.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Clients ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a function like pg_get_indexdef() that report more detailed index information&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00166.php &amp;lt;nowiki&amp;gt;BUG #3829: Wrong index reporting from pgAdmin III (v1.8.0 rev 6766-6767)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Split out pg_resetxlog output into pre- and post-sections&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg02040.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== pg_ctl ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow pg_ctl to work properly with configuration files located outside the PGDATA directory&lt;br /&gt;
|pg_ctl can not read the pid file because it isn't located in the config directory but in the PGDATA directory.  The solution is to allow pg_ctl to read and understand postgresql.conf to find the data_directory value.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-10/msg00024.php &amp;lt;nowiki&amp;gt;BUG #5103: &amp;amp;quot;pg_ctl -w (re)start&amp;amp;quot; fails with custom unix_socket_directory&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Modify pg_ctl behavior and exit codes to make it easier to write an LSB conforming init script&lt;br /&gt;
|It may be desirable to condition some of the changes on a command-line switch, to avoid breaking existing scripts.  A Linux shell (sh) script is referenced which has been tested and seems to provide a high degree of conformance in multiple environments.  Study of this script might suggest areas where pg_ctl could be modified to make writing an LSB conforming script easier; however, some aspects of that script would be unnecessary with other suggested changes to pg_ctl, and discussion on the lists did not reach consensus on support for all aspects of this script.  Further discussion of particular changes is needed before beginning any work.&lt;br /&gt;
* [[Lsb_conforming_init_script|LSB conforming init script]]&lt;br /&gt;
These threads should be studied for other ideas on improvements:&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01390.php &amp;lt;nowiki&amp;gt;We should Axe /contrib/start-scripts&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01843.php &amp;lt;nowiki&amp;gt;Linux LSB init script&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00008.php &amp;lt;nowiki&amp;gt;Re: Linux LSB init script&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve pg_ctl's detection of running postmasters&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00000.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-committers/2011-06/msg00001.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== psql ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have psql \ds show all sequences and their settings&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00916.php &amp;lt;nowiki&amp;gt;Re: TODO item: Have psql show current values for a sequence&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00401.php &amp;lt;nowiki&amp;gt;Quick patch: Display sequence owner&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Have \d on a sequence indicate if the sequence is owned by a table}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move psql backslash database information into the backend, use mnemonic commands?&lt;br /&gt;
|This would allow non-psql clients to pull the same information out of the database as psql. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-01/msg00191.php &amp;lt;nowiki&amp;gt;Re: psql \d option list overloaded&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make psql's \d commands more consistent in their handling of schemas&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php &amp;lt;nowiki&amp;gt;Re: psql and schemas&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make psql's \d commands distinguish default privileges from no privileges&lt;br /&gt;
|ACL displays were visibly different for the two cases before we &amp;quot;improved&amp;quot; them by using array_to_string.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2011-05/msg00082.php &amp;lt;nowiki&amp;gt;BUG #6021: There is no difference between default and empty access privileges with \dp&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consistently display privilege information for all objects in psql}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Add &amp;amp;quot;auto&amp;amp;quot; expanded mode that outputs in expanded format if &amp;amp;quot;wrapped&amp;amp;quot; mode can't wrap the output to the screen width&lt;br /&gt;
|Consider using auto-expanded mode for backslash commands like \df+.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00417.php &amp;lt;nowiki&amp;gt;Re: psql wrapped format default for backslash-d commands&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg01638.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent tab completion of SET TRANSACTION from querying the database and therefore preventing the transaction isolation level from being set.&lt;br /&gt;
|Currently SET &amp;amp;lt;tab&amp;amp;gt; causes a database lookup to check all supported session variables.  This query causes problems because setting the transaction isolation level must be the first statement of a transaction.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|\s without arguments (display history) fails with libedit, doesn't use pager either&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2011-06/msg00114.php &amp;lt;nowiki&amp;gt; psql \s not working - OS X&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a \set variable to control whether \s displays line numbers&lt;br /&gt;
|Another option is to add \# which lists line numbers, and allows command execution.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00255.php &amp;lt;nowiki&amp;gt;Re: psql possible TODO&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Include the symbolic SQLSTATE name in verbose error reports&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-09/msg00438.php &amp;lt;nowiki&amp;gt;Re: Checking is TSearch2 query is valid&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add prompt escape to display the client and server versions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00310.php &amp;lt;nowiki&amp;gt;WIP patch for TODO Item: Add prompt escape to display the client and server versions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add option to wrap column values at whitespace boundaries, rather than chopping them at a fixed width.&lt;br /&gt;
|Currently, &amp;amp;quot;wrapped&amp;amp;quot; format chops values into fixed widths.  Perhaps the word wrapping could use the same algorithm documented in the W3C specification. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00404.php &amp;lt;nowiki&amp;gt;Re: psql wrapped format default for backslash-d commands&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://www.w3.org/TR/CSS21/tables.html#auto-table-layout}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support the ReST table output format&lt;br /&gt;
|Details about the ReST format:  http://docutils.sourceforge.net/rst.html#reference-documentation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg01007.php &amp;lt;nowiki&amp;gt;Proposal: new border setting in psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00518.php &amp;lt;nowiki&amp;gt;Re: Proposal: new border setting in psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00609.php &amp;lt;nowiki&amp;gt;Re: Proposal: new border setting in psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add option to print advice for people familiar with other databases&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg01845.php &amp;lt;nowiki&amp;gt;MySQL-ism help patch for psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|\dd is missing comments for several types of objects&lt;br /&gt;
|Comments are not handled at all for some object types, and are handled by both \dd and the individual backslash command for others. Consider a system view like pg_comments to manage this mess.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2009-09/msg00199.php &amp;lt;nowiki&amp;gt;comment on constraint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-09/msg01080.php &amp;lt;nowiki&amp;gt;pg_comments&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-05/msg00885.php &amp;lt;nowiki&amp;gt;patch: Allow \dd to show constraint comments&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ability to edit views with \ev&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00023.php &amp;lt;nowiki&amp;gt;Adding \ev view editor?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix FETCH_COUNT to handle SELECT ... INTO and WITH queries&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01565.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2010-05/msg00192.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent psql from sending remaining single-line multi-statement queries after reconnecting&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2010-05/msg00159.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01283.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Add \i option to bring in the specified file as a quoted literal&lt;br /&gt;
|This would be useful for creating functions and other areas.  Details still need to be worked out.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-02/msg00016.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-02/msg00020.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having psql -c read .psqlrc, for consistency&lt;br /&gt;
|psql -f already reads .psqlrc&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow processing of multiple -f (file) options&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve line drawing characters&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00386.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider improving the continuation prompt&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg01772.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== pg_dump / pg_restore ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Add full object name to the tag field.  eg. for operators we need '=(integer, integer)', instead of just '='.&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add pg_dumpall custom format dumps?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2010-05/msg00509.php pg_dumpall custom format]&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid using platform-dependent locale names in pg_dumpall output&lt;br /&gt;
|Using native locale names puts roadblocks in the way of porting a dump to another platform.  One possible solution is to get&lt;br /&gt;
CREATE DATABASE to accept some agreed-on set of locale names and fix them up to meet the platform's requirements.&lt;br /&gt;
* http://archives.postgresql.org/message-id/21396.1241716688@sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow selection of individual object(s) of all types, not just tables}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|In a selective dump, allow dumping of an object and all its dependencies}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add options like pg_restore -l and -L to pg_dump}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for multiple pg_restore -t options, like pg_dump&lt;br /&gt;
|pg_restore's -t switch is less useful than pg_dump's in quite a few ways: no multiple switches, no pattern matching, no ability to pick up indexes and other dependent items for a selected table.  It should be made to handle this switch just like pg_dump does.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Stop dumping CASCADE on DROP TYPE commands in clean mode}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pg_dump --clean to drop roles that own objects or have privileges&lt;br /&gt;
|tgl says: if this is about pg_dumpall, it's done as of 8.4.  If it's really about pg_dump, what does it mean?  pg_dump has no business dropping roles.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pg_dump to utilize multiple CPUs and I/O channels by dumping multiple objects simultaneously&lt;br /&gt;
|The difficulty with this is getting multiple dump processes to produce a single dump output file.  It also would require several sessions to share the same snapshot. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php &amp;lt;nowiki&amp;gt;pg_dump additional options for performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00135.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00040.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg02454.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pg_restore to load different parts of the COPY data for a single table simultaneously}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Remove support for dumping from pre-7.3 servers&lt;br /&gt;
|In 7.3 and later, we can get accurate dependency information from the server.  pg_dump still contains a lot of crufty code&lt;br /&gt;
to try to deal with the lack of dependency info in older servers, but the usefulness of maintaining that code grows small.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow pre/data/post files when schema and data are dumped separately, for performance reasons&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php &amp;lt;nowiki&amp;gt;pg_dump additional options for performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00185.php &amp;lt;nowiki&amp;gt;Re: pg_dump additional options for performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00821.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00135.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Refactor handling of database attributes between pg_dump and pg_dumpall&lt;br /&gt;
|Currently only pg_dumpall emits database attributes, such as ALTER DATABASE SET commands and database-level GRANTs.&lt;br /&gt;
Many people wish that pg_dump would do that.  One proposal is to let pg_dump issue such commands if the -C switch was used,&lt;br /&gt;
but it's unclear whether that will satisfy the demand.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg01031.php &amp;lt;nowiki&amp;gt;ALTER DATABASE vs pg_dump&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2010-05/msg00010.php summary of the issues]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change pg_dump so that a comment on the dumped database is applied to the loaded database, even if the database has a different name.&lt;br /&gt;
|This will require new backend syntax, perhaps COMMENT ON CURRENT DATABASE. This is related to the previous item.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow parallel restore of tar dumps&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-02/msg01154.php &amp;lt;nowiki&amp;gt;Re: parallel restore&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow pg_dumpall to output restorable ALTER USER/DATABASE SET settings&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00916.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00394.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02359.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-10/msg00489.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== ecpg ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Docs&lt;br /&gt;
|Document differences between ecpg and the SQL standard and information about the Informix-compatibility module.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Solve cardinality &amp;amp;gt; 1 for input descriptors / variables?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a semantic check level, e.g. check if a table really exists}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|fix handling of DB attributes that are arrays}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix nested C comments}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|sqlwarn[6] should be 'W' if the PRECISION or SCALE value specified}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make SET CONNECTION thread-aware, non-standard?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow multidimensional arrays}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement COPY FROM STDIN}} &lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a way to specify size of a bytea parameter&lt;br /&gt;
* [http://archives.postgresql.org/message-id/200906192131.n5JLVoMo044178@wwwmaster.postgresql.org &amp;lt;nowiki&amp;gt;BUG #4866: ECPG and BYTEA&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Fix small memory leaks in ecpg&lt;br /&gt;
|Memory leaks in a short running application like ecpg are not really a problem, but make debugging more complicated}} &lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow reuse of cursor name variables&lt;br /&gt;
* [http://archives.postgresql.org/message-id/20100329113435.GA3430@feivel.credativ.lan &amp;lt;nowiki&amp;gt;Problems with variable cursorname in ecpg&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== libpq ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent PQfnumber() from lowercasing unquoted column names&lt;br /&gt;
|PQfnumber() should never have been doing lowercasing, but historically it has so we need a way to prevent it}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow statement results to be automatically batched to the client&lt;br /&gt;
|Currently all statement results are transferred to the libpq client before libpq makes the results available to the application.  This feature would allow the application to make use of the first result rows while the rest are transferred, or held on the server waiting for them to be requested by libpq. One complexity is that a statement like SELECT 1/col could error out mid-way through the result set.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider disallowing multiple queries in PQexec() as an additional barrier to SQL injection attacks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg00184.php &amp;lt;nowiki&amp;gt;Re: InitPostgres and flatfiles question&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add PQexecf() that allows complex parameter substitution&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01803.php &amp;lt;nowiki&amp;gt;Last minute mini-proposal (I know, know) for PQexecf()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add SQLSTATE and severity to errors generated within libpq itself&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-interfaces/2007-11/msg00015.php &amp;lt;nowiki&amp;gt;v8.1: Error severity on libpq PGconn*&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01425.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for interface/ipaddress binding to libpq&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01811.php &amp;lt;nowiki&amp;gt;SR/libpq - outbound interface/ipaddress binding&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Triggers ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve storage of deferred trigger queue&lt;br /&gt;
|Right now all deferred trigger information is stored in backend memory.  This could exhaust memory for very large trigger queues. This item involves dumping large queues into files, or doing some kind of join to process all the triggers, some bulk operation, or a bitmap. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00876.php &amp;lt;nowiki&amp;gt;Re: BUG #4204: COPY to table with FK has memory leak&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg00464.php &amp;lt;nowiki&amp;gt;Scaling up deferred unique checks and the after trigger queue&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-08/msg00023.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow triggers to be disabled in only the current session.&lt;br /&gt;
|This is currently possible by starting a multi-statement transaction, modifying the system tables, performing the desired SQL, restoring the system tables, and committing the transaction.  ALTER TABLE ... TRIGGER requires a table lock so it is not ideal for this usage.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|With disabled triggers, allow pg_dump to use ALTER TABLE ADD FOREIGN KEY&lt;br /&gt;
|If the dump is known to be valid, allow foreign keys to be added without revalidating the data.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow statement-level triggers to access modified rows}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|When statement-level triggers are defined on a parent table, have them fire only on the parent table, and fire child table triggers only where appropriate&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg01883.php &amp;lt;nowiki&amp;gt;Statement-level triggers and inheritance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow AFTER triggers on system tables&lt;br /&gt;
|System tables are modified in many places in the backend without going through the executor and therefore not causing triggers to fire. To complete this item, the functions that modify system tables will have to fire triggers.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01665.php&lt;br /&gt;
* http://wiki.postgresql.org/wiki/DDL_Triggers&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-12/msg00022.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Tighten trigger permission checks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00564.php &amp;lt;nowiki&amp;gt;Security leak with trigger functions?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow BEFORE INSERT triggers on views&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-02/msg01466.php &amp;lt;nowiki&amp;gt;Re: Why can't I put a BEFORE EACH ROW trigger on a view?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add database and transaction-level triggers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00451.php &amp;lt;nowiki&amp;gt;Proposal for db level triggers&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00620.php &amp;lt;nowiki&amp;gt;triggers on prepare, commit, rollback... ?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce locking requirements for creating a trigger&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00635.php &amp;lt;nowiki&amp;gt;Re: Change lock requirements for adding a trigger&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid requirement for &amp;quot;AFTER&amp;quot; trigger functions to return a value&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02384.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Inheritance ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow inherited tables to inherit indexes, UNIQUE constraints, and primary/foreign keys&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-05/msg00285.php &amp;lt;nowiki&amp;gt;Partitioning/inherited tables vs FKs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00039.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00305.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Honor UNIQUE INDEX on base column in INSERTs/UPDATEs on inherited table, e.g.  INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail&lt;br /&gt;
|The main difficulty with this item is the problem of creating an index that can span multiple tables.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Determine whether ALTER TABLE / SET SCHEMA should work on inheritance hierarchies (and thus support ONLY).  If yes, implement it.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|ALTER TABLE variants sometimes support recursion and sometimes not, but this is poorly/not documented, and the ONLY marker would then be silently ignored. Clarify the documentation, and reject ONLY if it is not supported.}}&lt;br /&gt;
&lt;br /&gt;
== Indexes ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent index uniqueness checks when UPDATE does not modify the column&lt;br /&gt;
|Uniqueness (index) checks are done when updating a column even if the column is not modified by the UPDATE.&lt;br /&gt;
However, HOT already short-circuits this in common cases, so more work might not be helpful.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow the creation of on-disk bitmap indexes which can be quickly combined with other bitmap indexes&lt;br /&gt;
|Such indexes could be more compact if there are only a few distinct values. Such indexes can also be compressed.  Keeping such indexes updated can be costly.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2005-07/msg00512.php &amp;lt;nowiki&amp;gt;Re: Bitmap index AM&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg01107.php &amp;lt;nowiki&amp;gt;Bitmap index thoughts&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00265.php &amp;lt;nowiki&amp;gt;Stream bitmaps&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01214.php &amp;lt;nowiki&amp;gt;Re: Bitmapscan changes - Requesting further feedback&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00013.php &amp;lt;nowiki&amp;gt;Updated bitmap index patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00741.php &amp;lt;nowiki&amp;gt;Reviewing new index types (was Re: [PATCHES] Updated bitmap indexpatch)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01023.php &amp;lt;nowiki&amp;gt;Bitmap Indexes: request for feedback&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/message-id/800923.27831.qm@web29010.mail.ird.yahoo.com &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow accurate statistics to be collected on indexes with more than one column or expression indexes, perhaps using per-index statistics&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2006-10/msg00222.php &amp;lt;nowiki&amp;gt;Re: Simple join optimized badly?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01131.php &amp;lt;nowiki&amp;gt;Stats for multi-column indexes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00741.php &amp;lt;nowiki&amp;gt;Cross-column statistics revisited&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg01431.php &amp;lt;nowiki&amp;gt;Multi-Dimensional Histograms&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00913.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg02179.php &lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00459.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02054.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg01731.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00894.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-09/msg00679.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having a larger statistics target for indexed columns and expression indexes. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider smaller indexes that record a range of values per heap page, rather than having one index entry for every heap row&lt;br /&gt;
|This is useful if the heap is clustered by the indexed values. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00341.php &amp;lt;nowiki&amp;gt;Grouped Index Tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg01264.php &amp;lt;nowiki&amp;gt;Grouped Index Tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00465.php &amp;lt;nowiki&amp;gt;Grouped Index Tuples / Clustered Indexes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-03/msg00163.php &amp;lt;nowiki&amp;gt;Bitmapscan changes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00014.php &amp;lt;nowiki&amp;gt;Re: GIT patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00487.php &amp;lt;nowiki&amp;gt;Re: Index Tuple Compression Approach?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01589.php &amp;lt;nowiki&amp;gt;Re: Index AM change proposals, redux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add REINDEX CONCURRENTLY, like CREATE INDEX CONCURRENTLY&lt;br /&gt;
|This is difficult because you must upgrade to an exclusive table lock to replace the existing index file.  CREATE INDEX CONCURRENTLY does not have this complication.  This would allow index compaction without downtime. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-08/msg00289.php &amp;lt;nowiki&amp;gt;Re: When/if to Reindex&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow multiple indexes to be created concurrently, ideally via a single heap scan&lt;br /&gt;
|pg_restore allows parallel index builds, but it is done via subprocesses, and there is no SQL interface for this.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-04/msg00093.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider sorting entries before inserting into btree index&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-01/msg01010.php &amp;lt;nowiki&amp;gt;Re: ATTN: Clodaldo was Performance problem. Could it be related to 8.3-beta4?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow index scans to return matching index keys, not just the matching heap locations&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01657.php &amp;lt;nowiki&amp;gt;Re: Is this TODO item done?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01477.php &amp;lt;nowiki&amp;gt;Index-only quals&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow creation of an index that can do comparisons to test if a value is between two column values&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00757.php &amp;lt;nowiki&amp;gt;Proposal: temporal extension &amp;amp;quot;period&amp;amp;quot; data type&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using &amp;quot;effective_io_concurrency&amp;quot; for index scans&lt;br /&gt;
* Currently only bitmap scans use this, which might be fine because most multi-row index scans use bitmap scans.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem with btree page splits during checkpoints&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00052.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-09/msg00184.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== GIST ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add more GIST index support for geometric data types}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow GIST indexes to create certain complex index types, like digital trees (see Aoki)}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix performance issues in contrib/seg and contrib/cube GiST support&lt;br /&gt;
* [http://archives.postgresql.org/message-id/alpine.DEB.2.00.0904161633160.4053@aragorn.flymine.org GiST index performance]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/alpine.DEB.2.00.0904221704470.22330@aragorn.flymine.org draft patch]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2009-05/msg00069.php &amp;lt;nowiki&amp;gt;Re: GiST index performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2009-06/msg00068.php &amp;lt;nowiki&amp;gt;GiST index performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Hash ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add UNIQUE capability to hash indexes}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add hash WAL logging for crash recovery&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-09/msg00196.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow multi-column hash indexes}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Sorting ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider whether duplicate keys should be sorted by block/offset&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00558.php &amp;lt;nowiki&amp;gt;Remove hacks for old bad qsort() implementations?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider being smarter about memory and external files used during sorts&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg01101.php &amp;lt;nowiki&amp;gt;Sorting Improvements for 8.4&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00045.php &amp;lt;nowiki&amp;gt;Re: Sorting Improvements for 8.4&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider detoasting keys before sorting}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow sorts to use more available memory&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2007-11/msg01026.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg01123.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg01957.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Fsync ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options and whether fsync does anything&lt;br /&gt;
|Ideally this requires a separate test program like /contrib/pg_test_fsync that can be run at initdb time or optionally later.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider sorting writes during checkpoint&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00541.php &amp;lt;nowiki&amp;gt;Sorted writes in checkpoint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00050.php &amp;lt;nowiki&amp;gt;Re: Sorting writes during checkpoint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg02012.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg00278.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Cache Usage ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Speed up COUNT(*)&lt;br /&gt;
|We could use a fixed row count and a +/- count to follow MVCC visibility rules, or a single cached value could be used and invalidated if anyone modifies the table.  Another idea is to get a count directly from a unique index, but for this to be faster than a sequential scan it must avoid access to the heap to obtain tuple visibility information.  Note that the index-only scans feature is now implemented which now dramatically speeds up some COUNT(*) cases.&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Slow_Counting&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a way to calculate an &amp;amp;quot;estimated COUNT(*)&amp;amp;quot;&lt;br /&gt;
|Perhaps by using the optimizer's cardinality estimates or random sampling.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-11/msg00943.php &amp;lt;nowiki&amp;gt;Re: Improving count(*)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Slow_Counting&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow data to be pulled directly from indexes&lt;br /&gt;
|Currently indexes do not have enough tuple visibility information to allow data to be pulled from the index without also accessing the heap.  The idea is to use the visibility map used for vacuum to avoid heap lookups on pages where all tuples are visible.&lt;br /&gt;
* [http://wiki.postgresql.org/wiki/Index-only_scans Index-Only Scans wiki]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider automatic caching of statements at various levels:&lt;br /&gt;
* Parsed query tree&lt;br /&gt;
* Query execute plan&lt;br /&gt;
* Query results &lt;br /&gt;
&lt;br /&gt;
:&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg00823.php &amp;lt;nowiki&amp;gt;Cached Query Plans (was: global prepared statements)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider increasing internal areas (NUM_CLOG_BUFFERS) when shared buffers is increased&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-10/msg01419.php &amp;lt;nowiki&amp;gt;Re: slru.c race condition (was Re: TRAP: FailedAssertion(&amp;amp;quot;!((itemid)-&amp;amp;gt;lp_flags &amp;amp;amp; 0x01)&amp;amp;quot;,)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00030.php &amp;lt;nowiki&amp;gt;clog_buffers to 64 in 8.3?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-08/msg00024.php &amp;lt;nowiki&amp;gt;CLOG Patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider decreasing the amount of memory used by PrivateRefCount&lt;br /&gt;
|&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg00797.php &amp;lt;nowiki&amp;gt;PrivateRefCount (for 8.3)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg00752.php &amp;lt;nowiki&amp;gt;Re: PrivateRefCount (for 8.3)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider allowing higher priority queries to have referenced buffer cache pages stay in memory longer&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00562.php &amp;lt;nowiki&amp;gt;Re: How to keep a table in memory?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Vacuum ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Auto-fill the free space map by scanning the buffer cache or by checking pages written by the background writer&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-02/msg01125.php &amp;lt;nowiki&amp;gt;Dead Space Map&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00011.php &amp;lt;nowiki&amp;gt;Re: Automatic free space map filling&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow concurrent inserts to use recently created pages rather than creating new ones&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg00853.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having single-page pruning update the visibility map&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;https://commitfest.postgresql.org/action/patch_view?id=75&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg02344.php &amp;lt;nowiki&amp;gt;Re: visibility maps and heap_prune&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve tracking of total relation tuple counts now that vacuum doesn't always scan the whole heap&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00531.php Partial vacuum versus pg_class.reltuples]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Bias FSM towards returning free space near the beginning of the heap file, in hopes that empty pages at the end can be truncated by VACUUM&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg01124.php &amp;lt;nowiki&amp;gt;FSM search modes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a more compact data representation for dead tuple locations within VACUUM&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00143.php &amp;lt;nowiki&amp;gt;Re: Have vacuum emit a warning when it runs out of maintenance_work_mem&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide more information in order to improve user-side estimates of dead space bloat in relations&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2009-05/msg01039.php &amp;lt;nowiki&amp;gt;Re: Bloated Table&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve locking behaviour of vacuum during trailing page truncation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-03/msg00319.php&lt;br /&gt;
* http://archives.postgresql.org/message-id/4D8DF88E.7080205@Yahoo.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce the number of table scans performed by vacuum&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg01119.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00605.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-07/msg00624.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Auto-vacuum ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Issue log message to suggest VACUUM FULL if a table is nearly empty?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent long-lived temporary tables from causing frozen-xid advancement starvation&lt;br /&gt;
|The problem is that autovacuum cannot vacuum them to set frozen xids; only the session that created them can do that. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-06/msg01645.php &amp;lt;nowiki&amp;gt;Re: AutoVacuum Behaviour Question&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent autovacuum from running if an old transaction is still running from the last vacuum&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00899.php &amp;lt;nowiki&amp;gt;Re: Autovacuum and OldestXmin&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have autoanalyze of parent tables occur when child tables are modified&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-06/msg00137.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-10/msg00271.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Locking ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix priority ordering of read and write light-weight locks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00893.php &amp;lt;nowiki&amp;gt;lwlocks and starvation&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00905.php &amp;lt;nowiki&amp;gt;Re: lwlocks and starvation&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem when multiple subtransactions of the same outer transaction hold different types of locks, and one subtransaction aborts&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg01011.php &amp;lt;nowiki&amp;gt;FOR SHARE vs FOR UPDATE locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00001.php &amp;lt;nowiki&amp;gt;Re: FOR SHARE vs FOR UPDATE locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00435.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] [pgsql-patches] Phantom Command IDs, updated patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00773.php &amp;lt;nowiki&amp;gt;Re: savepoints and upgrading locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow UPDATEs on only non-referential integrity columns not to conflict with referential integrity locks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00073.php &amp;lt;nowiki&amp;gt;Referential Integrity and SHARE locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add idle_in_transaction_timeout GUC so locks are not held for long periods of time}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve deadlock detection when a page cleaning lock conflicts with a shared buffer that is pinned&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-01/msg00138.php &amp;lt;nowiki&amp;gt;BUG #3883: Autovacuum deadlock with truncate?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php &amp;lt;nowiki&amp;gt;Thoughts about bug #3883&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-committers/2008-01/msg00365.php &amp;lt;nowiki&amp;gt;Re: pgsql: Add checks to TRUNCATE, CLUSTER, and REINDEX to prevent&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Detect deadlocks involving LockBufferForCleanup()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php &amp;lt;nowiki&amp;gt;Thoughts about bug #3883&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow finer control over who is cancelled in a deadlock&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01727.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a lock timeout parameter&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00485.php &amp;lt;nowiki&amp;gt;SELECT ... FOR UPDATE [WAIT integer | NOWAIT] for 8.5&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce number of unnecessary false positives in Serializable Snapshot Isolation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-06/msg00609.php &amp;lt;nowiki&amp;gt;SSI heap_insert and page-level predicate locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Startup Time Improvements ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Experiment with multi-threaded backend for backend creation&lt;br /&gt;
|This would prevent the overhead associated with process creation. Most operating systems have trivial process creation time compared to database startup overhead, but a few operating systems (Win32, Solaris) might benefit from threading.  Also explore the idea of a single session using multiple threads to execute a statement faster.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow backends to change their database without restart&lt;br /&gt;
|This allows for faster server startup.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00843.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00336.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Write-Ahead Log ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Eliminate need to write full pages to WAL before page modification&lt;br /&gt;
|Currently, to protect against partial disk page writes, we write full page images to WAL before they are modified so we can correct any partial page writes during recovery.  These pages can also be eliminated from point-in-time archive files. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2002-06/msg00655.php &amp;lt;nowiki&amp;gt;Re: Index Scans become Seq Scans after VACUUM ANALYSE&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg01191.php &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|When full page writes are off, write CRC to WAL and check file system blocks on recovery&lt;br /&gt;
|If CRC check fails during recovery, remember the page in case a later CRC for that page properly matches.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Write full pages during file system write and not when the page is modified in the buffer cache&lt;br /&gt;
|This allows most full page writes to happen in the background writer.  It might cause problems for applying WAL on recovery into a partially-written page, but later the full page will be replaced from WAL.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce WAL traffic so only modified values are written rather than entire rows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01589.php &amp;lt;nowiki&amp;gt;Reduction in WAL for UPDATEs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow WAL information to recover corrupted pg_controldata&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00025.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] pg_resetxlog -r flag&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Find a way to reduce rotational delay when repeatedly writing last WAL page&lt;br /&gt;
|Currently fsync of WAL requires the disk platter to perform a full rotation to fsync again. One idea is to write the WAL to different offsets that might reduce the rotational delay. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2002-11/msg00483.php &amp;lt;nowiki&amp;gt;500 tpsQL + WAL log implementation&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Speed WAL recovery by allowing more than one page to be prefetched&lt;br /&gt;
|This should be done utilizing the same infrastructure used for prefetching in general to avoid introducing complex error-prone code in WAL replay. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-12/msg00683.php &amp;lt;nowiki&amp;gt;Slow PITR restore&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00497.php &amp;lt;nowiki&amp;gt;Re: [GENERAL] Slow PITR restore&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg01279.php &amp;lt;nowiki&amp;gt;Read-ahead and parallelism in redo recovery&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve WAL concurrency by increasing lock granularity&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00556.php &amp;lt;nowiki&amp;gt;Reworking WAL locking&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Be more aggressive about creating WAL files&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01325.php &amp;lt;nowiki&amp;gt;Re: PANIC caused by open_sync on Linux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-07/msg01075.php &amp;lt;nowiki&amp;gt;PreallocXlogFiles&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-04/msg00556.php &amp;lt;nowiki&amp;gt;WAL/PITR additional items&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have resource managers report the duration of their status changes&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01468.php &amp;lt;nowiki&amp;gt;Recovery of Multi-stage WAL actions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move pgfoundry's xlogdump to /contrib and have it rely more closely on the WAL backend code&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00035.php &amp;lt;nowiki&amp;gt;xlogdump&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Close deleted WAL files held open in *nix by long-lived read-only backends&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg01754.php &amp;lt;nowiki&amp;gt;Deleted WAL files held open by backends in Linux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00060.php &amp;lt;nowiki&amp;gt;Re: Deleted WAL files held open by backends in Linux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Optimizer / Executor ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve selectivity functions for geometric operators}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider increasing the default values of from_collapse_limit, join_collapse_limit, and/or geqo_threshold&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4136ffa0905210551u22eeb31bn5655dbe7c9a3aed5@mail.gmail.com from_collapse_limit vs. geqo_threshold]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve ability to display optimizer analysis using OPTIMIZER_DEBUG}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Log statements where the optimizer row estimates were dramatically different from the number of rows actually found?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider compressed annealing to search for query plans&lt;br /&gt;
|This might replace GEQO.&lt;br /&gt;
* http://archives.postgresql.org/message-id/15658.1241278636%40sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve use of expression indexes for ORDER BY &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01553.php &amp;lt;nowiki&amp;gt;Resjunk sort columns, Heikki's index-only quals patch, and bug #5000&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Modify the planner to better estimate caching effects&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-11/msg00117.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow shared buffer cache contents to affect index cost computations&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg01140.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Hashing ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using a hash for joining to a large IN (VALUES ...) list&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00450.php &amp;lt;nowiki&amp;gt;Planning large IN lists&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow single batch hash joins to preserve outer pathkeys&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg00806.php Re: Potential Join Performance Issue]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;quot;lazy&amp;quot; hash tables - look up only the tuples that are actually requested&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid building the same hash table more than once during the same query&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid hashing for distinct and then re-hashing for hash join&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4136ffa0902191346g62081081v8607f0b92c206f0a@mail.gmail.com Re: Fixing Grittner's planner issues]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Background Writer ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having the background writer update the transaction status hint bits before writing out the page&lt;br /&gt;
|Implementing this requires the background writer to have access to system catalogs and the transaction status log.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider adding buffers the background writer finds reusable to the free list &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00781.php &amp;lt;nowiki&amp;gt;Background LRU Writer/free list&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Automatically tune bgwriter_delay based on activity rather then using a fixed interval&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00781.php &amp;lt;nowiki&amp;gt;Background LRU Writer/free list&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider whether increasing BM_MAX_USAGE_COUNT improves performance&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg01007.php &amp;lt;nowiki&amp;gt;Bgwriter LRU cleaning: we've been going at this all wrong&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Test to see if calling PreallocXlogFiles() from the background writer will help with WAL segment creation latency&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-06/msg00340.php &amp;lt;nowiki&amp;gt;Re: Load Distributed Checkpoints, final patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Concurrent Use of Resources ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Do async I/O for faster random read-ahead of data&lt;br /&gt;
|Async I/O allows multiple I/O requests to be sent to the disk with results coming back asynchronously.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg00820.php &amp;lt;nowiki&amp;gt;Asynchronous I/O Support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-09/msg00255.php &amp;lt;nowiki&amp;gt;Re: random_page_costs - are defaults of 4.0 realistic for SCSI RAID 1&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00027.php &amp;lt;nowiki&amp;gt;There's random access and then there's random access&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-01/msg00170.php &amp;lt;nowiki&amp;gt;Bitmap index scan preread using posix_fadvise (Was: There's random access and then there's random access)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
The above patch is already applied as of 8.4, but it still remains to figure out how to handle plain indexscans effectively.&lt;br /&gt;
* [http://archives.postgresql.org//pgsql-hackers/2009-01/msg00806.php Problems with the patch submitted for posix_fadvise in index scans]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Experiment with multi-threaded backend for better I/O utilization&lt;br /&gt;
|This would allow a single query to make use of multiple I/O channels simultaneously.  One idea is to create a background reader that can pre-fetch sequential and index scan pages needed by other backends. This could be expanded to allow concurrent reads from multiple devices in a partitioned table.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-02/msg00123.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Experiment with multi-threaded backend for better CPU utilization&lt;br /&gt;
|This would allow several CPUs to be used for a single query, such as for sorting or query execution.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00945.php &amp;lt;nowiki&amp;gt;Multi CPU Queries - Feedback and/or suggestions wanted!&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|SMP scalability improvements&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00439.php &amp;lt;nowiki&amp;gt;Straightforward changes for increased SMP scalability&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00206.php &amp;lt;nowiki&amp;gt;Re: Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00361.php &amp;lt;nowiki&amp;gt;Re: Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== TOAST ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow user configuration of TOAST thresholds&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00213.php &amp;lt;nowiki&amp;gt;Re: Proposed adjustments in MaxTupleSize and toastthresholds&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00082.php &amp;lt;nowiki&amp;gt;pg_lzcompress strategy parameters&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce unnecessary cases of deTOASTing&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00895.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Eliminate more detoast copies for packed varlenas&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce costs of repeat de-TOASTing of values&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg01096.php &amp;lt;nowiki&amp;gt;WIP patch: reducing overhead for repeat de-TOASTing&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Monitoring ==&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Expand pg_stat_activity for easier integration with monitoring tools&lt;br /&gt;
|* http://archives.postgresql.org/message-id/4DFA13A5.2060200@2ndQuadrant.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add column to pg_stat_activity that shows the progress of long-running commands like CREATE INDEX and VACUUM&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-04/msg00203.php &amp;lt;nowiki&amp;gt;EXPLAIN progress info&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* The CLUSTER/VACUUM FULL implementation would also be useful to track this way&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have pg_stat_activity display query strings in the correct client encoding&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00131.php &amp;lt;nowiki&amp;gt;pg_stats queries versus per-database encodings&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Expose pg_controldata via an SQL interface&lt;br /&gt;
|Helpful for monitoring replicated databases&lt;br /&gt;
* http://archives.postgresql.org/message-id/4B901D73.8030003@agliodbs.com&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4B959D7A.6010907@joeconway.com initial patch]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Performance ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Use mmap() rather than SYSV for shared buffers?&lt;br /&gt;
|This would remove the requirement for SYSV SHM but would introduce portability issues. Anonymous mmap (or mmap to /dev/zero) is required to prevent I/O overhead. We could also consider mmap() for writing WAL.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00750.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00756.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rather than consider mmap()-ing in 8k pages, consider mmap()'ing entire files into a backend?&lt;br /&gt;
|Doing I/O to large tables would consume a lot of address space or require frequent mapping/unmapping.  Extending the file also causes mapping problems that might require mapping only individual pages, leading to thousands of mappings.  Another problem is that there is no way to _prevent_ I/O to disk from the dirty shared buffers so changes could hit disk before WAL is written.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01239.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider ways of storing rows more compactly on disk:&lt;br /&gt;
* Reduce the row header size?&lt;br /&gt;
* Consider reducing on-disk varlena length from four bytes to two because a heap row cannot be more than 64k in length}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider transaction start/end performance improvements&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00948.php &amp;lt;nowiki&amp;gt;Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00361.php &amp;lt;nowiki&amp;gt;Re: Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow configuration of backend priorities via the operating system&lt;br /&gt;
|Though backend priorities make priority inversion during lock waits possible, research shows that this is not a huge problem.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-02/msg00493.php &amp;lt;nowiki&amp;gt;Priorities for users or queries?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider increasing the minimum allowed number of shared buffers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-02/msg00157.php &amp;lt;nowiki&amp;gt;Re: [PATCH] Don't bail with legitimate -N/-B options&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider if CommandCounterIncrement() can avoid its AcceptInvalidationMessages() call&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-committers/2007-11/msg00585.php &amp;lt;nowiki&amp;gt;pgsql: Avoid incrementing the CommandCounter when&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider Cartesian joins when both relations are needed to form an indexscan qualification for a third relation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-12/msg00090.php &amp;lt;nowiki&amp;gt;Re: TB-sized databases&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider not storing a NULL bitmap on disk if all the NULLs are trailing&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00624.php &amp;lt;nowiki&amp;gt;Proposal for Null Bitmap Optimization(for Trailing NULLs)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-12/msg00109.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Proposal for Null Bitmap Optimization(for TrailingNULLs)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Sort large UPDATE/DELETEs so it is done in heap order&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg01119.php &amp;lt;nowiki&amp;gt;Possible future performance improvement: sort updates/deletes by ctid&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow one transaction to see tuples using the snapshot of another transaction&lt;br /&gt;
|This would assist multiple backends in working together. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00400.php &amp;lt;nowiki&amp;gt;Transaction Snapshot Cloning&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00135.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00260.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00466.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-08/msg00684.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider decreasing the I/O caused by updating tuple hint bits&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00847.php &amp;lt;nowiki&amp;gt;Hint Bits and Write I/O&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00199.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Hint Bits and Write I/O&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg00695.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00792.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg01063.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01408.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01453.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid the requirement of freezing pages that are infrequently modified &lt;br /&gt;
|If all rows on a page are visible, it is possible to set a bit in the visibility map (once the visibility map is 100% reliable) and not need to freeze the page, avoiding a page rewrite&lt;br /&gt;
*  http://archives.postgresql.org/message-id/4BF701CF.2090205@agliodbs.com&lt;br /&gt;
*  http://archives.postgresql.org/pgsql-hackers/2010-06/msg00082.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid reading in b-tree pages when replaying vacuum records in hot standby mode&lt;br /&gt;
* [http://archives.postgresql.org/message-id/1272571938.4161.14739.camel@ebony &amp;lt;nowiki&amp;gt;Hot Standby tuning for btree_xlog_vacuum()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Restructure truncation logic to be more resistant to failure&lt;br /&gt;
|This also involves not writing dirty buffers for a truncated or dropped relation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01032.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider adding logic to increase large tables by more than 8k&lt;br /&gt;
|This would reduce file system fragmentation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-03/msg00337.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Other ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Deal with encoding issues for filenames in the server filesystem&lt;br /&gt;
* {{MessageLink|20090413184335.39BE.52131E4D@oss.ntt.co.jp|a proposed patch here}}&lt;br /&gt;
* {{MessageLink|8484.1244655656@sss.pgh.pa.us|some issues about it here}}&lt;br /&gt;
* {{MessageLink|20100107103740.97A5.52131E4D@oss.ntt.co.jp|Windows-specific patch here}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Deal with encoding issues in the output of localeconv()&lt;br /&gt;
* [http://archives.postgresql.org/message-id/40c6d9160904210658y590377cfw6dbbecb53d2b8be0@mail.gmail.com bug report]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/49EF8DA0.90008@tpf.co.jp draft patch]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/21710.1243620986@sss.pgh.pa.us review of patch]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide schema name and other fields available from SQL GET DIAGNOSTICS in error reports&lt;br /&gt;
* [http://archives.postgresql.org/message-id/dcc563d10810211907n3c59a920ia9eb7cd2a6d5ea58@mail.gmail.com &amp;lt;nowiki&amp;gt;How to get schema name which violates fk constraint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg00846.php &amp;lt;nowiki&amp;gt;patch - Report the schema along table name in a referential failure 	error message&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* {{MessageLink|3191.1263306359@sss.pgh.pa.us|Re: NOT NULL violation and error-message}}&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg00213.php &amp;lt;nowiki&amp;gt;the case for machine-readable error fields&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
| Provide [http://developer.postgresql.org/pgdocs/postgres/libpq-connect.html#LIBPQ-CONNECT-FALLBACK-APPLICATION-NAME fallback_application_name] in contrib/pgbench, oid2name, and dblink.&lt;br /&gt;
* {{MessageLink|w2g9837222c1004070216u3bc46b3ahbddfdffdbfb46212@mail.gmail.com|fallback_application_name and pgbench}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add 64-bit support to /contrib/pgbench&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-07/msg00153.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg00705.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add use of 'const' for variables in source tree&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-11/msg00473.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Remove warnings created by -Wcast-align}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move platform-specific ps status display info from ps_status.c to ports}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add optional CRC checksum to heap and index pages&lt;br /&gt;
|One difficulty is how to prevent hint bit changes from affecting the computed CRC checksum.&lt;br /&gt;
* http://archives.postgresql.org/message-id/19934.1226601952%40sss.pgh.pa.us&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00002.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01028.php &amp;lt;nowiki&amp;gt;double-buffering page writes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00524.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01101.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00011.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00249.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a faster CRC32 algorithm&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01112.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow cross-compiling by generating the zic database on the target system}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve NLS maintenance of libpgport messages linked onto applications}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Use UTF8 encoding for NLS messages so all server encodings can read them properly}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow creation of universal binaries for Darwin&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00884.php &amp;lt;nowiki&amp;gt;Getting to universal binaries for Darwin&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider GnuTLS if OpenSSL license becomes a problem&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg00892.php&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-05/msg00040.php &amp;lt;nowiki&amp;gt;[PATCH] Add support for GnuTLS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg01213.php &amp;lt;nowiki&amp;gt;TODO: GNU TLS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider making NAMEDATALEN more configurable in future releases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Research use of signals and sleep wake ups&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00003.php &amp;lt;nowiki&amp;gt;Restartable signals 'n all that&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow C++ code to more easily access backend code&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00302.php &amp;lt;nowiki&amp;gt;Mostly Harmless: Welcoming our C++ friends&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider simplifying how memory context resets handle child contexts&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-08/msg00067.php &amp;lt;nowiki&amp;gt;Re: Memory leak in nodeAgg&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create three versions of libpgport to simplify client code&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00154.php &amp;lt;nowiki&amp;gt;8.4 TODO item: make src/port support libpq and ecpg directly&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve detection of shared memory segments being used by others by checking the SysV shared memory field 'nattch'&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00656.php &amp;lt;nowiki&amp;gt;postgresql in FreeBSD jails: proposal&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00673.php &amp;lt;nowiki&amp;gt;Re: postgresql in FreeBSD jails: proposal&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement the non-threaded Avahi service discovery protocol&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00939.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-02/msg00097.php &amp;lt;nowiki&amp;gt;Re: Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg01211.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-04/msg00001.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce data row alignment requirements on some 64-bit systems&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00369.php &amp;lt;nowiki&amp;gt;[WIP] Reduce alignment requirements on 64-bit systems.&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Restructure TOAST internal storage format for greater flexibility&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00049.php &amp;lt;nowiki&amp;gt;Re: PG_PAGE_LAYOUT_VERSION 5 - time for change&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Add regression tests for pg_dump/restore&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01967.php &amp;lt;nowiki&amp;gt;&amp;quot;make install-check-pg_dump&amp;quot; target in src/regress]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Research different memory allocation methods for lists&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg01467.php &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Consider removing the attribute options cache&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00039.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Restructure /contrib section&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00705.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== /contrib/pg_upgrade ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Handle large object comments&lt;br /&gt;
|This is difficult to do because the large object doesn't exist when --schema-only is loaded.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using pg_depend for checking object usage in version.c&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|If reindex is necessary, allow it to be done in parallel with pg_dump custom format&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Migrate pg_statistic by dumping it out as a flat file, so analyze is not necessary&lt;br /&gt;
|pg_class.oid is not preserved so schema.tablename must be used.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve testing, perhaps using the buildfarm&lt;br /&gt;
|The buildfarm has access to multiple versions of PostgreSQL.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create machine-readable output of pg_controldata&lt;br /&gt;
|This would avoid parsing its output.  The problem is we need pg_controldata output from both the old and new clusters so we would need to support both formats.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Remove configure.in check for link failure when cause is found}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Remove readdir() errno patch when runtime/mingwex/dirent.c rev 1.4 is released}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow psql to use readline once non-US code pages work with backslashes}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem with shared memory on the Win32 Terminal Server}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve signal handling&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2005-06/msg00027.php &amp;lt;nowiki&amp;gt;Simplify Win32 Signaling code&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Convert MSVC build system to remove most batch files&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00961.php &amp;lt;nowiki&amp;gt;MSVC build system&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support pgxs when using MSVC}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix MSVC NLS support, like for to_char()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00485.php &amp;lt;nowiki&amp;gt;NLS on MSVC  strikes back!&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-02/msg00038.php &amp;lt;nowiki&amp;gt;Fix for 8.3 MSVC locale (Was  [HACKERS] NLS on MSVC strikes back!)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Find a correct rint() substitute on Windows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00808.php &amp;lt;nowiki&amp;gt;Minor bug in src/port/rint.c&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix global namespace issues when using multiple terminal server sessions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/48F3BFCC.8030107@dunslane.net problems with Windows global namespace]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change from the current autoconf/gmake build system to cmake&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01869.php &amp;lt;nowiki&amp;gt;About CMake (was Re: [COMMITTERS] pgsql: Append major version number and for libraries soname major)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve consistency of path separator usage&lt;br /&gt;
* http://archives.postgresql.org/message-id/49C0BDC5.4010002@hagander.net&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix cross-compiling on Windows&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2010-10/msg00110.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow multiple Postgres clusters running on the same machine to distinguish themselves in the event log&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01297.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00574.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Wire Protocol Changes ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow dynamic character set handling}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add decoded type, length, precision}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Mark result columns as known-not-null when possible&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-11/msg01029.php &amp;lt;nowiki&amp;gt;Adding nullable indicator to Describe&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide more control over planner treatment of statements being prepared}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Use compression?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Update clients to use data types, typmod, schema.table.column names of result sets using new statement protocol}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make sure upgrading to a 4.1 protocol version will actually work smoothly&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28307.1318255008@sss.pgh.pa.us Re: libpq, PQdescribePrepared -&amp;gt; PQftype, PQfmod, no PQnullable]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Convert single quotes to apostrophes in the PDF documentation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2007-12/msg00059.php &amp;lt;nowiki&amp;gt;SGML docs and pdf single-quotes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a manpage for postgresql.conf&lt;br /&gt;
* {{messageLink|20080819194311.GH4428@alvh.no-ip.org|A smaller default postgresql.conf}}&lt;br /&gt;
* {{messageLink|200808211910.37524.peter_e@gmx.net|A smaller default postgresql.conf}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change the manpage-generating toolchain to use the new XML-based docbook2x tools&lt;br /&gt;
* {{messageLink|200808211910.37524.peter_e@gmx.net|A smaller default postgresql.conf}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider changing documentation format from SGML to XML&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2006-12/msg00152.php &amp;lt;nowiki&amp;gt;Re: Authoring Tools WAS: Switching to XML&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-docs/2011-04/msg00020.php&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Switching_PostgreSQL_documentation_from_SGML_to_XML&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Document support for N&amp;lt;nowiki&amp;gt;' '&amp;lt;/nowiki&amp;gt; national character string literals, if it matches the SQL standard&lt;br /&gt;
* http://archives.postgresql.org/message-id/1275895438.1849.1.camel@fsopti579.F-Secure.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add diagrams to the documentation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-docs/2010-07/msg00001.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Exotic Features ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add pre-parsing phase that converts non-ISO syntax to supported syntax&lt;br /&gt;
|This could allow SQL written for other databases to run without modification.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow plug-in modules to emulate features from other databases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add features of Oracle-style packages&lt;br /&gt;
|A package would be a schema with session-local variables, public/private functions, and initialization functions.  It is also possible to implement these capabilities in any schema and not use a separate &amp;amp;quot;packages&amp;amp;quot; syntax at all.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-08/msg00384.php &amp;lt;nowiki&amp;gt;proposal for PL packages for 8.3.&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider allowing control of upper/lower case folding of unquoted identifiers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-04/msg00818.php &amp;lt;nowiki&amp;gt;Bringing PostgreSQL torwards the standard regarding case folding&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg01527.php &amp;lt;nowiki&amp;gt;Re: [SQL] Case Preservation disregarding case sensitivity?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00849.php &amp;lt;nowiki&amp;gt;TODO Item: Consider allowing control of upper/lower case folding of unquoted,  identifiers&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00415.php &amp;lt;nowiki&amp;gt;Identifier case folding notes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00415.php &amp;lt;nowiki&amp;gt;Identifier case folding notes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add autonomous transactions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00893.php &amp;lt;nowiki&amp;gt;autonomous transactions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Give query progress indication&lt;br /&gt;
* [[Query progress indication]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rethink our type system&lt;br /&gt;
* [[Rethinking datatypes]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Features We Do ''Not'' Want ==&lt;br /&gt;
&lt;br /&gt;
The following features have been discussed ad nauseum on the PostgreSQL mailing lists and the consensus has been that the project is not interested in them.  As such, if you are going to bring them up as potential features, you will want to be familiar with all of the arguments against these features which have been previously made over the years.  If you decide to work on such features anyway, you should be aware that you face a higher-than-normal barrier to get the Project to accept them.&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|All backends running as threads in a single process (not wanted)&lt;br /&gt;
|This eliminates the process protection we get from the current setup. Thread creation is usually the same overhead as process creation on modern systems, so it seems unwise to use a pure threaded model, and MySQL and DB2 have demonstrated that threads introduce as many issues as they solve.  Threading specific operations such as I/O, seq scans, and connection management has been discussed and will probably be implemented to enable specific performance features.  Moving to a threaded engine would also require halting all other work on PostgreSQL for one to two years.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;quot;Oracle-style&amp;quot; optimizer hints (not wanted)&lt;br /&gt;
|Optimizer hints, as implemented in Oracle and other RDBMSes, are used to work around problems in the optimizer and introduce upgrade and maintenance issues.  We would rather have such problems reported and fixed.  We have discussed a more sophisticated system of per-class cost adjustment instead, but a specification remains to be developed. See [[OptimizerHintsDiscussion|Optimizer Hints Discussion]] for further information.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Embedded server (not wanted)&lt;br /&gt;
|While PostgreSQL clients runs fine in limited-resource environments, the server requires multiple processes and a stable pool of resources to run reliably and efficiently. Stripping down the PostgreSQL server to run in the same process address space as the client application would add too much complexity and failure cases. Besides, there are several very mature embedded SQL databases already available.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Obfuscated function source code (not wanted)&lt;br /&gt;
|Obfuscating function source code has minimal protective benefits because anyone with super-user access can find a way to view the code. At the same time, it would greatly complicate backups and other administrative tasks. To prevent non-super-users from viewing function source code, remove SELECT permission on pg_proc.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-09/msg00668.php &amp;lt;nowiki&amp;gt;Obfuscated stored procedures (was Re: Oracle and Postgresql)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Indeterminate behavior for the GROUP BY clause (not wanted)&lt;br /&gt;
|At least one other database product allows specification of a subset of the result columns which GROUP BY would need to be able to provide predictable results; the server is free to return any value from the group.  This is not viewed as a desirable feature.  PostgreSQL 9.1 allows result columns that are not referenced by GROUP BY if a primary key for the same table is referenced in GROUP BY.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-03/msg00297.php &amp;lt;nowiki&amp;gt;Re: SQL compatibility reminder: MySQL vs PostgreSQL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Todo]]&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/Todo</id>
		<title>Todo</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/Todo"/>
				<updated>2011-10-26T18:41:58Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;/* Wire Protocol Changes */ Make sure upgrading to a 4.1 protocol version will actually work smoothly&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;margin: 1ex 1em; float: right;&amp;quot;&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This list contains '''all known PostgreSQL bugs and feature requests'''. If you would like to work on an item, please read the [[Developer FAQ]] first. There is also a [[Development_information|development information page]].&lt;br /&gt;
&lt;br /&gt;
* {{TodoPending}} - marks ordinary, incomplete items&lt;br /&gt;
* {{TodoEasy}} - marks items that are easier to implement&lt;br /&gt;
* {{TodoDone}} - marks changes that are done, and will appear in the PostgreSQL 9.2 release.&lt;br /&gt;
&lt;br /&gt;
For help on editing this list, please see [[Talk:Todo]]. &amp;lt;b&amp;gt;Please do not add items here without discussion on the mailing list.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 1ex 4em;&amp;quot;&amp;gt;&lt;br /&gt;
== Administration ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow administrators to cancel multi-statement idle transactions&lt;br /&gt;
|This allows locks to be released, but it is complex to report the cancellation back to the client.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01340.php &amp;lt;nowiki&amp;gt;Cancelling idle in transaction state&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00441.php &amp;lt;nowiki&amp;gt;Re: Cancelling idle in transaction state&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Check for unreferenced table files created by transactions that were in-progress when the server terminated abruptly&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00096.php &amp;lt;nowiki&amp;gt;Removing unreferenced files&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Set proper permissions on non-system schemas during db creation&lt;br /&gt;
|Currently all schemas are owned by the super-user because they are copied from the template1 database.  However, since all objects are inherited from the template database, it is not clear that setting schemas to the db owner is correct.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow log_min_messages to be specified on a per-module basis&lt;br /&gt;
|This would allow administrators to see more detailed information from specific sections of the backend, e.g. checkpoints, autovacuum, etc. Another idea is to allow separate configuration files for each module, or allow arbitrary SET commands to be passed to them. See also [[Logging Brainstorm]].}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Simplify creation of partitioned tables&lt;br /&gt;
|This would allow creation of partitioned tables without requiring creation of triggers or rules for INSERT/UPDATE/DELETE, and constraints for rapid partition selection.  Options could include range and hash partition selection. See also [[Table partitioning]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow custom variables to appear in pg_settings()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00850.php &amp;lt;nowiki&amp;gt;Re: count(*) performance improvement ideas&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have custom variables be transaction-safe&lt;br /&gt;
* {{MessageLink|4B577E9F.8000505@dunslane.net|Custom GUCs still a bit broken}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement the SQL-standard mechanism whereby REVOKE ROLE revokes only the privilege granted by the invoking role, and not those granted by other roles&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-05/msg00010.php &amp;lt;nowiki&amp;gt;Re: Grantor name gets lost when grantor role dropped&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent query cancel packets from being replayed by an attacker, especially when using SSL&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg00345.php &amp;lt;nowiki&amp;gt;Replay attack of query cancel&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a way to query the log collector subprocess to determine the name of the currently active log file&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-11/msg00418.php &amp;lt;nowiki&amp;gt;Current log files when rotating?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow simpler reporting of the unix domain socket directory and allow easier configuration of its default location&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg01555.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow custom daemons to be automatically stopped/started along with the postmaster&lt;br /&gt;
|This allows easier administration of daemons like user job schedulers or replication-related daemons.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01701.php &amp;lt;nowiki&amp;gt;Re: scheduler in core&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve logging of prepared transactions recovered during startup&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg00092.php &amp;lt;nowiki&amp;gt;&amp;amp;quot;recovering prepared transaction&amp;amp;quot; after server restart message&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using POSIX shared memory to avoid System V shared memory kernel limits&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4DFA2673.3010009@enterprisedb.com &amp;lt;nowiki&amp;gt;POSIX shared memory patch status&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Address problem where superusers are assumed to be members of all groups&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00337.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Configuration files ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Change pg_ident.conf parsing to be the same as pg_hba.conf&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg02204.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow postgresql.conf file values to be changed via an SQL API, perhaps using SET GLOBAL&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg00764.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider normalizing fractions in postgresql.conf, perhaps using '%'&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00550.php &amp;lt;nowiki&amp;gt;Fractions in GUC variables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow Kerberos to disable stripping of realms so we can check the username@realm against multiple realms&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00009.php &amp;lt;nowiki&amp;gt;krb_match_realm patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve LDAP authentication configuration options&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01745.php &amp;lt;nowiki&amp;gt;Proposed Patch - LDAPS support for servers on port 636 w/o TLS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add external tool to auto-tune some postgresql.conf parameters&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00000.php &amp;lt;nowiki&amp;gt;Re: Overhauling GUCS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00033.php &amp;lt;nowiki&amp;gt;Simple postgresql.conf wizard&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add 'hostgss' pg_hba.conf option to allow GSS link-level encryption&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg01454.php &amp;lt;nowiki&amp;gt;Re: Plans for 8.4&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Process pg_hba.conf keywords as case-insensitive&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00432.php &amp;lt;nowiki&amp;gt;More robust pg_hba.conf parsing/error logging&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create utility to compute accurate random_page_cost value&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-04/msg00162.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-04/msg00362.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow configuration files to be independently validated&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01831.php&lt;br /&gt;
* http://archives.postgresql.org/message-id/12666.1310774573@sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow postgresql.conf settings to be accepted by backends even if some settings are invalid for those backends&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00330.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00375.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow all backends to receive postgresql.conf setting changes at the same time&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00330.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00375.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Tablespaces ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow a database in tablespace t1 with tables created in tablespace t2 to be used as a template for a new database created with default tablespace t2&lt;br /&gt;
|Currently all objects in the default database tablespace must have default tablespace specifications. This is because new databases are created by copying directories. If you mix default tablespace tables and tablespace-specified tables in the same directory, creating a new database from such a mixed directory would create a new database with tables that had incorrect explicit tablespaces.  To fix this would require modifying pg_class in the newly copied database, which we don't currently do.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow reporting of which objects are in which tablespaces&lt;br /&gt;
|This item is difficult because a tablespace can contain objects from multiple databases. There is a server-side function that returns the databases which use a specific tablespace, so this requires a tool that will call that function and connect to each database to find the objects in each database for that tablespace.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow WAL replay of CREATE TABLESPACE to work when the directory structure on the recovery computer is different from the original}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow per-tablespace quotas}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow tablespaces on RAM-based partitions for unlogged tables&lt;br /&gt;
* http://archives.postgresql.org/pgsql-advocacy/2011-05/msg00033.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow toast tables to be moved to a different tablespace&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00980.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Collector ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow statistics last vacuum/analyze execution times to be displayed without requiring track_counts to be enabled&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2007-04/msg00028.php &amp;lt;nowiki&amp;gt;row-level stats and last analyze time&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Clear table counters on TRUNCATE&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg00169.php &amp;lt;nowiki&amp;gt;Small TRUNCATE glitch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== SSL ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SSL authentication/encryption over unix domain sockets&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00924.php &amp;lt;nowiki&amp;gt;Re: Spoofing as the postmaster&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SSL key file permission checks to be optionally disabled when sharing SSL keys with other applications&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00069.php &amp;lt;nowiki&amp;gt;BUG #3809: SSL &amp;amp;quot;unsafe&amp;amp;quot; private key permissions bug&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SSL CRL files to be re-read during configuration file reload, rather than requiring a server restart&lt;br /&gt;
|Unlike SSL CRT files, CRL (Certificate Revocation List) files are updated frequently&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-12/msg00832.php &amp;lt;nowiki&amp;gt;Automatic CRL reload&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
Alternatively or additionally supporting OCSP (online certificate security protocol) would provide real-time revocation discovery without reloading&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Allow automatic selection of SSL client certificates from a certificate store&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00406.php &amp;lt;nowiki&amp;gt;Allow multiple certificates or keys in the postgresql.crt/.key files&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Send the full certificate server chain to the client&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-12/msg00145.php BUG #5245: Full Server Certificate Chain Not Sent to client]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Point-In-Time Recovery (PITR) ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Create dump tool for write-ahead logs for use in determining transaction id for point-in-time recovery&lt;br /&gt;
|This is useful for checking PITR recovery.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow archive_mode to be changed without server restart?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01655.php &amp;lt;nowiki&amp;gt;Enabling archive_mode without restart&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider avoiding WAL switching via archive_timeout if there has been no database activity&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg01469.php &amp;lt;nowiki&amp;gt;archive_timeout behavior for no activity&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg00395.php &amp;lt;nowiki&amp;gt;Re: archive_timeout behavior for no activity&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Standby server mode ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Allow pg_xlogfile_name() to be used in recovery mode&lt;br /&gt;
* [http://archives.postgresql.org/message-id/3f0b79eb1001190135vd9f62f1sa7868abc1ea61d12@mail.gmail.com &amp;lt;nowiki&amp;gt;Streaming replication and pg_xlogfile_name()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Prevent variables inherited from the server environment from begin used for making streaming replication connections.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01011.php &amp;lt;nowiki&amp;gt;Re: Parameter name standby_mode&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
| Allow hot file system backups on standby servers&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01727.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01490.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Change walsender so that it applies per-role settings&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg00642.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Add more control over waiting for synchronous commit&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01611.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Restructure configuration parameters for standby mode&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg01820.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Allow time-delayed application of logs on the standby&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00992.php&lt;br /&gt;
}}&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Add -X parameter to pg_basebackup to specify a different directory for px_xlog, like initdb&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Data Types ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix data types where equality comparison is not intuitive, e.g. box}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for public SYNONYMs&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00519.php &amp;lt;nowiki&amp;gt;Proposal for SYNONYMS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg02043.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-general/2010-12/msg00139.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for SQL-standard GENERATED/IDENTITY columns&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-07/msg00543.php &amp;lt;nowiki&amp;gt;Re: Three weeks left until feature freeze&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-08/msg00038.php &amp;lt;nowiki&amp;gt;GENERATED ... AS IDENTITY, Was: Re: Feature Freeze&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00344.php &amp;lt;nowiki&amp;gt;Behavior of GENERATED columns per SQL2003&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00076.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Behavior of GENERATED columns per SQL2003&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00604.php &amp;lt;nowiki&amp;gt;IDENTITY/GENERATED patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider placing all sequences in a single table, or create a system view&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php &amp;lt;nowiki&amp;gt;Re: newbie: renaming sequences task&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a special data type for regular expressions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg01067.php &amp;lt;nowiki&amp;gt;Why is there a tsquery data type?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce BIT data type overhead using short varlena headers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-12/msg00273.php &amp;lt;nowiki&amp;gt;storage size of &amp;amp;quot;bit&amp;amp;quot; data type..&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow renaming and deleting enumerated values from an existing enumerated data type&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support scoped IPv6 addresses in the inet type&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-05/msg00111.php &amp;lt;nowiki&amp;gt;strange problem with ip6&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a JSON (JavaScript Object Notation) data type&lt;br /&gt;
|This would behave similar to the XML data type, which is stored as text, but allows element lookup and conversion functions.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01494.php &amp;lt;nowiki&amp;gt;PATCH: Add hstore_to_json()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg00001.php &amp;lt;nowiki&amp;gt;Re: PATCH: Add hstore_to_json()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-03/msg01092.php &amp;lt;nowiki&amp;gt;Proposal: Add JSON support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00057.php &amp;lt;nowiki&amp;gt;Re: Proposal: Add JSON support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00481.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01694.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Considering improving performance of computing CHAR() value lengths&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00900.php &amp;lt;nowiki&amp;gt;char() overhead on read-only workloads not so insignifcant as the docs claim it is...&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01787.php &amp;lt;nowiki&amp;gt;Re: [PATCH] backend: compare word-at-a-time in bcTruelen&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add overlaps geometric operators that ignore point overlaps&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-03/msg00861.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Domains ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow functions defined as casts to domains to be called during casting&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-05/msg00072.php &amp;lt;nowiki&amp;gt;bug? non working casts for domain&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-09/msg01681.php &amp;lt;nowiki&amp;gt;TODO: Fix CREATE CAST on DOMAINs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow values to be cast to domain types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2003-06/msg01206.php &amp;lt;nowiki&amp;gt;Domain casting still doesn't work right&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00289.php &amp;lt;nowiki&amp;gt;domain casting?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00812.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make domains work better with polymorphic functions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4887.1228700773@sss.pgh.pa.us Polymorphic types vs. domains]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/15535.1238774571@sss.pgh.pa.us some difficulties with fixing it]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Dates and Times ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow infinite intervals just like infinite timestamps}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow TIMESTAMP WITH TIME ZONE to store the original timezone information, either zone name or offset from UTC&lt;br /&gt;
|If the TIMESTAMP value is stored with a time zone name, interval computations should adjust based on the time zone rules. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-10/msg00705.php &amp;lt;nowiki&amp;gt;timestamp with time zone a la sql99&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have timestamp subtraction not call justify_hours()?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-sql/2006-10/msg00059.php &amp;lt;nowiki&amp;gt;timestamp subtraction (was Re: formatting intervals with to_char)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve TIMESTAMP WITH TIME ZONE subtraction to be DST-aware&lt;br /&gt;
|Currently subtracting one date from another that crosses a daylight savings time adjustment can return '1 day 1 hour', but adding that back to the first date returns a time one hour in the future.  This is caused by the adjustment of '25 hours' to '1 day 1 hour', and '1 day' is the same time the next day, even if daylight savings adjustments are involved.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix interval display to support values exceeding 2^31 hours}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add overflow checking to timestamp and interval arithmetic}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add function to allow the creation of timestamps using parameters&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-06/msg00232.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Arrays ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for arrays of domains&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00114.php &amp;lt;nowiki&amp;gt;Re: updated WIP: arrays of composites&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow single-byte header storage for array elements}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add function to detect if an array is empty&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00475.php &amp;lt;nowiki&amp;gt;Re: array_length()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of empty arrays&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01033.php &amp;lt;nowiki&amp;gt;So what's an &amp;amp;quot;empty&amp;amp;quot; array anyway?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of NULLs in arrays&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-11/msg00009.php &amp;lt;nowiki&amp;gt;BUG #4509: array_cat's null behaviour is inconsistent&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg01040.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Binary Data ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve vacuum of large objects, like contrib/vacuumlo?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Auto-delete large objects when referencing row is deleted&lt;br /&gt;
|contrib/lo offers this functionality.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow read/write into TOAST values like large objects&lt;br /&gt;
|Writing might require the TOAST column to be stored EXTERNAL.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00049.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add API for 64-bit large object access&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-09/msg00781.php &amp;lt;nowiki&amp;gt;64-bit API for large objects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg01790.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== MONEY Data Type ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add locale-aware MONEY type, and support multiple currencies&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2005-08/msg01432.php &amp;lt;nowiki&amp;gt;A real currency type&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01181.php &amp;lt;nowiki&amp;gt;Money type todos?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|MONEY dumps in a locale-specific format making it difficult to restore to a system with a different locale}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Text Search ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow dictionaries to change the token that is passed on to later dictionaries&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-11/msg00081.php &amp;lt;nowiki&amp;gt;a tsearch2 (8.2.4) dictionary that only filters out stopwords&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a function-based API for '@@' searches&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00511.php &amp;lt;nowiki&amp;gt;Simplifying Text Search&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve text search error messages&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00966.php &amp;lt;nowiki&amp;gt;Poorly designed tsearch NOTICEs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg01146.php &amp;lt;nowiki&amp;gt;Re: Poorly designed tsearch NOTICEs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider changing error to warning for strings larger than one megabyte&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-02/msg00190.php &amp;lt;nowiki&amp;gt;BUG #3975: tsearch2 index should not bomb out of 1Mb limit&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-03/msg00062.php &amp;lt;nowiki&amp;gt;Re: [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|tsearch and tsdicts regression tests fail in Turkish locale on glibc&lt;br /&gt;
* [http://archives.postgresql.org/message-id/49749645.5070801@gmx.net tsearch with Turkish locale]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|tsquery negator operator treated as part of lexeme&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-06/msg00346.php BUG #4887: inclusion operator (@&amp;gt;) on tsqeries behaves not conforming to documentation]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of plus signs in email address user names, and perhaps improve URL parsing&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg00772.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve default parser, to more easily allow adding new tokens&lt;br /&gt;
* http://archives.postgresql.org/message-id/23485.1297727826@sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add additional support functions&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00319.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== XML ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow XML arrays to be cast to other data types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00981.php &amp;lt;nowiki&amp;gt;proposal casting from XML[] to int[], numeric[], text[]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00231.php &amp;lt;nowiki&amp;gt;Re: proposal casting from XML[] to int[], numeric[], text[]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00471.php &amp;lt;nowiki&amp;gt;Re: proposal casting from XML[] to int[], numeric[], text[]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add XML Schema validation and xmlvalidate functions (SQL:2008)}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add xmlvalidatedtd variant to support validating against a DTD?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Relax-NG validation; libxml2 supports this already}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow reliable XML operation non-UTF8 server encodings (xpath(), in particular, is known to not work)&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-01/msg00135.php &amp;lt;nowiki&amp;gt;BUG #4622: xpath only work in utf-8 server encoding&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
* http://archives.postgresql.org/message-id/4110.1238973350@sss.pgh.pa.us}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add functions from SQL:2006: XMLDOCUMENT, XMLCAST, XMLTEXT}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add XMLNAMESPACES support in XMLELEMENT and elsewhere}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move XSLT from contrib/xml2 to a more reasonable location&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg00539.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Report errors returned by the XSLT library&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg00562.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve the XSLT parameter passing API&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg00416.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|XML Canonical: Convert XML documents to canonical form to compare them. libxml2 has support for this.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add pretty-printed XML output option&lt;br /&gt;
|Parse a document and serialize it back in some indented form. libxml2 might support this.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add XMLQUERY (from the SQL/XML standard)}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow XML sthredding&lt;br /&gt;
|In some cases shredding could be better option (if there is no need to keep XML docs entirely, e.g. if we have already developed tools that understand only relational data.  This would be a separate module that implements annotated schema decomposition technique, similar to DB2 and SQL Server functionality.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix Nested or repeated xpath() that apparently mess up namespaces [http://archives.postgresql.org/pgsql-bugs/2008-03/msg00097.php] [http://archives.postgresql.org/pgsql-bugs/2008-03/msg00144.php] [http://archives.postgresql.org/pgsql-general/2008-03/msg00295.php] [http://archives.postgresql.org/pgsql-bugs/2008-07/msg00054.php] [http://archives.postgresql.org/message-id/004f01c90e91$138e9d10$3aabd730$@anstett@iaas.uni-stuttgart.de]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|XPath: Adding the &amp;lt;x&amp;gt; at the root causes problems [http://archives.postgresql.org/pgsql-bugs/2008-05/msg00184.php] [http://archives.postgresql.org/pgsql-bugs/2008-07/msg00054.php] [http://archives.postgresql.org/pgsql-general/2008-07/msg00613.php]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|xpath_table needs to be implemented/implementable to get rid of contrib/xml2 [http://archives.postgresql.org/pgsql-general/2008-05/msg00823.php]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|xpath_table is pretty broken anyway [http://archives.postgresql.org/pgsql-hackers/2010-02/msg02424.php]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|better handling of XPath data types [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00616.php] [http://archives.postgresql.org/message-id/004a01c90e90$4b986d90$e2c948b0$@anstett@iaas.uni-stuttgart.de]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of PIs and DTDs in xmlconcat() [http://archives.postgresql.org/message-id/200904211211.n3LCB09p008988@wwwmaster.postgresql.org]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Restructure XML and /contrib/xml2 functionality&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02314.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00017.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow INET subnet comparisons using non-constants to be indexed}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add an INET overlaps operator, for use by exclusion constraints &lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-03/msg00845.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Enforce typmod for function inputs, function results and parameters for spi_prepare'd statements called from PLs&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg01403.php &amp;lt;nowiki&amp;gt;Re: BUG #2917: spi_prepare doesn't accept typename aliases&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg01160.php &amp;lt;nowiki&amp;gt;RFC for adding typmods to functions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix IS OF so it matches the ISO specification, and add documentation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2003-08/msg00060.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] IS OF&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00060.php &amp;lt;nowiki&amp;gt;ToDo: add documentation for operator IS OF&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement Boyer-Moore searching in LIKE queries&lt;br /&gt;
* {{messageLink|27645.1220635769@sss.pgh.pa.us|TODO item: Implement Boyer-Moore searching (First time hacker)}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent malicious functions from being executed with the permissions of unsuspecting users&lt;br /&gt;
|Index functions are safe, so VACUUM and ANALYZE are safe too.  Triggers, CHECK and DEFAULT expressions, and rules are still vulnerable. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00268.php &amp;lt;nowiki&amp;gt;Some notes about the index-functions security vulnerability&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce memory usage of aggregates in set returning functions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2008-01/msg00031.php &amp;lt;nowiki&amp;gt;Re: Performance of aggregates over set-returning functions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix /contrib/ltree operator&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-11/msg00044.php &amp;lt;nowiki&amp;gt;BUG #3720: wrong results at using ltree&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix /contrib/btree_gist's implementation of inet indexing&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2010-10/msg00099.php &amp;lt;nowiki&amp;gt;BUG #5705: btree_gist: Index on inet changes query result&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Fix inconsistent precedence of =, &amp;amp;gt;, and &amp;amp;lt; compared to &amp;amp;lt;&amp;amp;gt;, &amp;amp;gt;=, and &amp;amp;lt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00145.php &amp;lt;nowiki&amp;gt;BUG #3822: Nonstandard precedence for comparison operators&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix regular expression bug when using complex back-references&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00000.php &amp;lt;nowiki&amp;gt;BUG #3645: regular expression back references seem broken&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have /contrib/dblink reuse unnamed connections&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00895.php &amp;lt;nowiki&amp;gt;dblink un-named connection doesn't get re-used&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve formatting of pg_get_viewdef() output&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg01648.php &amp;lt;nowiki&amp;gt;pg_get_viewdef formattiing&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01885.php &amp;lt;nowiki&amp;gt;Re: pretty print viewdefs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add function to dump pg_depend information cleanly&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00226.php &amp;lt;nowiki&amp;gt;Elementary dependency look-up&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve relation size functions such as pg_relation_size() to avoid producing an error when called against a no longer visible relation&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28488.1286461610@sss.pgh.pa.us pg_relation_size / could not open relation with OID #]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Character Formatting ===&lt;br /&gt;
&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow to_date() and to_timestamp() to accept localized month names}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add missing parameter handling in to_char()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-12/msg00948.php &amp;lt;nowiki&amp;gt;Re: to_char and i18n&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Throw an error from to_char() instead of printing a string of &amp;quot;#&amp;quot; when a number doesn't fit in the desired output format.&lt;br /&gt;
* discussed in [http://archives.postgresql.org/message-id/37ed240d0907290836w42187222n18664dfcbcb445b1@mail.gmail.com &amp;quot;to_char, support for EEEE format&amp;quot;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow to_char() on interval values to accumulate the highest unit requested&lt;br /&gt;
|2= Some special format flag would be required to request such accumulation.  Such functionality could also be added to EXTRACT. Prevent accumulation that crosses the month/day boundary because of the uneven number of days in a month.&lt;br /&gt;
* to_char(INTERVAL '1 hour 5 minutes', 'MI') =&amp;amp;gt; 65&lt;br /&gt;
* to_char(INTERVAL '43 hours 20 minutes', 'MI' ) =&amp;amp;gt; 2600&lt;br /&gt;
* to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') =&amp;amp;gt; 0:1:19:20&lt;br /&gt;
* to_char(INTERVAL '3 years 5 months','MM') =&amp;amp;gt; 41&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix to_number() handling for values not matching the format string&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg01447.php &amp;lt;nowiki&amp;gt;Re: numeric_to_number() function skipping some digits&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Multi-Language Support ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add NCHAR (as distinguished from ordinary varchar),}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a cares-about-collation column to pg_proc, so that unresolved-collation errors can be thrown at parse time&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-03/msg01520.php &amp;lt;nowiki&amp;gt;Open issues for collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Integrate collations with text search configurations&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28887.1303579034@sss.pgh.pa.us &amp;lt;nowiki&amp;gt;Some TODO items for collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Integrate collations with to_char() and related functions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28887.1303579034@sss.pgh.pa.us &amp;lt;nowiki&amp;gt;Some TODO items for collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support collation-sensitive equality and hashing functions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-06/msg00472.php &amp;lt;nowiki&amp;gt; contrib/citext versus collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a LOCALE option to CREATE DATABASE, as a shorthand&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00119.php &amp;lt;nowiki&amp;gt; Re: 8.4 open items list&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support multiple simultaneous character sets, per SQL:2008}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve UTF8 combined character handling?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add octet_length_server() and octet_length_client()}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make octet_length_client() the same as octet_length()?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problems with wrong runtime encoding conversion for NLS message files}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add URL to more complete multi-byte regression tests&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-07/msg00272.php &amp;lt;nowiki&amp;gt;Multi-byte and client side character encoding tests for copy command..&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix contrib/fuzzystrmatch to work with multibyte encodings&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-04/msg00047.php &amp;lt;nowiki&amp;gt; soundex function returns UTF-16 characters&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00138.php &amp;lt;nowiki&amp;gt; dmetaphone woes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change memory allocation for multi-byte functions so memory is allocated inside conversion functions&lt;br /&gt;
|Currently we preallocate memory based on worst-case usage.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ability to use case-insensitive regular expressions on multi-byte characters&lt;br /&gt;
|Currently it works for UTF-8, but not other multi-byte encodings&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00433.php &amp;lt;nowiki&amp;gt;Regexps vs. locale&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* {{MessageLink|20091201210024.B1393753FB7@cvs.postgresql.org|A partial solution for UTF-8}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve encoding of connection startup messages sent to the client&lt;br /&gt;
|Currently some authentication error messages are sent in the server encoding&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-12/msg00801.php &amp;lt;nowiki&amp;gt;encoding of PostgreSQL messages&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2009-01/msg00005.php &amp;lt;nowiki&amp;gt;Re: encoding of PostgreSQL messages&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|More sensible support for Unicode combining characters, normal forms&lt;br /&gt;
* http://archives.postgresql.org/message-id/200904141532.44618.peter_e@gmx.net&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Views / Rules ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Automatically create rules on views so they are updateable, per SQL:2008&lt;br /&gt;
|We can only auto-create rules for simple views.  For more complex cases users will still have to write rules manually.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00586.php &amp;lt;nowiki&amp;gt;Proposal for updatable views&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-08/msg00255.php &amp;lt;nowiki&amp;gt;Updatable views&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg01746.php &amp;lt;nowiki&amp;gt;Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Updatable_views&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add the functionality of the WITH CHECK OPTION clause to CREATE VIEW}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow VIEW/RULE recompilation when the underlying tables change&lt;br /&gt;
|This is both difficult and controversial.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01723.php Re: About &amp;quot;Allow VIEW/RULE recompilation when the underlying tables change&amp;quot;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01724.php Re: About &amp;quot;Allow VIEW/RULE recompilation when the underlying tables change&amp;quot;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make it possible to use RETURNING together with conditional DO INSTEAD rules, such as for partitioning setups&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00577.php &amp;lt;nowiki&amp;gt;RETURNING and DO INSTEAD ... Intentional or not?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add the ability to automatically create materialized views&lt;br /&gt;
|Right now materialized views require the user to create triggers on the main table to keep the summary table current.  SQL syntax should be able to manage the triggers and summary table automatically.  A more sophisticated implementation would automatically retrieve from the summary table when the main table is referenced, if possible.  See [[Materialized Views]] for implementation details&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00479.php &amp;lt;nowiki&amp;gt;GSoC - proposal - Materialized Views in PostgreSQL&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve ability to modify views via ALTER TABLE&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00691.php &amp;lt;nowiki&amp;gt;Re: idea: storing view source in system catalogs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg01410.php &amp;lt;nowiki&amp;gt;modifying views&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg00300.php &amp;lt;nowiki&amp;gt;Re: patch: Add columns via CREATE OR REPLACE VIEW&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent low-cost functions from seeing unauthorized view rows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg01346.php &amp;lt;nowiki&amp;gt;Using views for row-level access control is leaky&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== SQL Commands ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve type determination of unknown (NULL or quoted literal) result columns for UNION/INTERSECT/EXCEPT&lt;br /&gt;
* [http://archives.postgresql.org/message-id/9799.1302719551@sss.pgh.pa.us &amp;lt;nowiki&amp;gt;UNION construct type cast gives poor error message&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00838.php &amp;lt;nowiki&amp;gt;WIP: grouping sets support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00466.php &amp;lt;nowiki&amp;gt;Implementation of GROUPING SETS (T431: Extended grouping 	capabilities)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow prepared transactions with temporary tables created and dropped in the same transaction, and when an ON COMMIT DELETE ROWS temporary table is accessed&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00047.php &amp;lt;nowiki&amp;gt;Re: &amp;amp;quot;could not open relation 1663/16384/16584: No such file or directory&amp;amp;quot; in a specific combination of transactions with temp tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/492543D5.9050904@enterprisedb.com A suggestion on how to implement this]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a GUC variable to warn about non-standard SQL usage in queries}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add SQL-standard MERGE/REPLACE/UPSERT command&lt;br /&gt;
|MERGE is typically used to merge two tables.  REPLACE or UPSERT command does UPDATE, or on failure, INSERT. See [[SQL MERGE]] for notes on the implementation details.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add NOVICE output level for helpful messages&lt;br /&gt;
|For example, have it warn about unjoined tables.  This could also control automatic sequence/index creation messages.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow NOTIFY in rules involving conditionals}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow EXPLAIN to identify tables that were skipped because of constraint_exclusion&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Simplify dropping roles that have objects in several databases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow the count returned by SELECT, etc to be represented as an int64 to allow a higher range of values}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for WITH RECURSIVE ... CYCLE&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00291.php &amp;lt;nowiki&amp;gt;WITH RECURSIVE ... CYCLE in vanilla SQL: issues with arrays of rows&amp;lt;/nowiki&amp;gt;]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add DEFAULT .. AS OWNER so permission checks are done as the table owner&lt;br /&gt;
|This would be useful for SERIAL nextval() calls and CHECK constraints.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow DISTINCT to work in multiple-argument aggregate calls}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add comments on system tables/columns using the information in catalogs.sgml&lt;br /&gt;
|Ideally the information would be pulled from the SGML file automatically.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent the specification of conflicting transaction read/write options&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00684.php &amp;lt;nowiki&amp;gt;Re: SET TRANSACTION and SQL Standard&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support LATERAL subqueries&lt;br /&gt;
|Lateral subqueries can reference columns of tables defined outside the subquery at the same level, i.e. ''laterally''.&lt;br /&gt;
For example, a LATERAL subquery in a FROM clause could reference tables defined in the same FROM clause.&lt;br /&gt;
Currently only the columns of tables defined ''above'' subqueries are recognized.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00292.php &amp;lt;nowiki&amp;gt;LATERAL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg00991.php &amp;lt;nowiki&amp;gt;Re: LATERAL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent temporary tables created with ON COMMIT DELETE ROWS from repeatedly truncating the table on every commit if the table is already empty&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00842.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-03/msg00392.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-04/msg00046.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow DELETE and UPDATE to be used with LIMIT and ORDER BY&lt;br /&gt;
* http://archives.postgresql.org/pgadmin-hackers/2010-04/msg00078.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg01997.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00021.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Improve caching of prepared query plans&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow PREPARE of cursors}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have DISCARD PLANS discard plans cached by functions&lt;br /&gt;
|DISCARD all should do the same.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00431.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid multiple-evaluation of BETWEEN and IN arguments containing volatile expressions&lt;br /&gt;
* http://archives.postgresql.org/message-id/4D95B605.2020709@enterprisedb.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix nested CASE-WHEN constructs&lt;br /&gt;
* http://archives.postgresql.org/message-id/4DDCEEB8.50602@enterprisedb.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== CREATE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow CREATE TABLE AS to determine column lengths for complex expressions like SELECT col1 || col2}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have WITH CONSTRAINTS also create constraint indexes&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-04/msg00149.php &amp;lt;nowiki&amp;gt;Re: CREATE TABLE LIKE INCLUDING INDEXES support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move NOT NULL constraint information to pg_constraint&lt;br /&gt;
|Currently NOT NULL constraints are stored in pg_attribute without any designation of their origins, e.g. primary keys.  One manifest problem is that dropping a PRIMARY KEY constraint does not remove the NOT NULL constraint designation.  Another issue is that we should probably force NOT NULL to be propagated from parent tables to children, just as CHECK constraints are.  (But then does dropping PRIMARY KEY affect children?)&lt;br /&gt;
* http://archives.postgresql.org/message-id/19768.1238680878@sss.pgh.pa.us&lt;br /&gt;
* http://archives.postgresql.org/message-id/200909181005.n8IA5Ris061239@wwwmaster.postgresql.org&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-07/msg01223.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent concurrent CREATE TABLE from sometimes returning a cryptic error message&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00169.php &amp;lt;nowiki&amp;gt;BUG #3692: Conflicting create table statements throw unexpected error&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add CREATE SCHEMA ... LIKE that copies a schema}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix CREATE OR REPLACE FUNCTION to not leave objects depending on the function in inconsistent state&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-08/msg00985.php indexes on functions and create or replace function]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow temporary tables to exist as empty by default in all sessions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00006.php &amp;lt;nowiki&amp;gt;what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg01329.php &amp;lt;nowiki&amp;gt;idea: global temp tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org//pgsql-hackers/2009-05/msg00016.php &amp;lt;nowiki&amp;gt;Re: idea: global temp tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg01098.php &amp;lt;nowiki&amp;gt;global temporary tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow the creation of &amp;quot;distinct&amp;quot; types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01647.php &amp;lt;nowiki&amp;gt;Distinct types&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider analyzing temporary tables when they are first used in a query&lt;br /&gt;
|Autovacuum cannot analyze or vacuum temporary tables.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00416.php &amp;lt;nowiki&amp;gt;autovacuum and temp tables support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow an unlogged table to be changed to logged&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00315.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00437.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00323.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00237.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== UPDATE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Allow UPDATE tab SET ROW (col, ...) = (SELECT...)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-07/msg01308.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] extension for sql update&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00865.php &amp;lt;nowiki&amp;gt;UPDATE using sub selects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-04/msg00315.php &amp;lt;nowiki&amp;gt;UPDATE using sub selects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-03/msg00237.php &amp;lt;nowiki&amp;gt;Re: UPDATE using sub selects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Research self-referential UPDATEs that see inconsistent row versions in read-committed mode&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00507.php &amp;lt;nowiki&amp;gt;Concurrently updating an updatable view&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00016.php &amp;lt;nowiki&amp;gt;Re: Do we need a TODO? (was Re: Concurrently updating anupdatable view)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve performance of EvalPlanQual mechanism that rechecks already-updated rows&lt;br /&gt;
|This is related to the previous item, which questions whether it even has the right semantics&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-09/msg00045.php &amp;lt;nowiki&amp;gt;BUG #4401: concurrent updates to a table blocks one update indefinitely&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-07/msg00302.php &amp;lt;nowiki&amp;gt;BUG #4945: Parallel update(s) gone wild&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== ALTER ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have ALTER TABLE RENAME of a SERIAL column rename the sequence&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php &amp;lt;nowiki&amp;gt;Re: newbie: renaming sequences task&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have ALTER SEQUENCE RENAME rename the sequence name stored in the sequence table&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-09/msg00092.php &amp;lt;nowiki&amp;gt;BUG #3619: Renaming sequence does not update its 'sequence_name' field&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00007.php &amp;lt;nowiki&amp;gt;Re: BUG #3619: Renaming sequence does not update its 'sequence_name' field&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php &amp;lt;nowiki&amp;gt;Re: newbie: renaming sequences task&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME or ALTER TABLE RENAME CONSTRAINT&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-02/msg00168.php &amp;lt;nowiki&amp;gt;ALTER CONSTRAINT RENAME patch reverted&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ALTER DOMAIN to modify the underlying data type}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow ALTER TABLESPACE to move the tablespace to different directories}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow moving system tables to other tablespaces, where possible&lt;br /&gt;
|Currently non-global system tables must be in the default database tablespace. Global system tables can never be moved.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have ALTER INDEX update the name of a constraint using that index}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow column display reordering by recording a display, storage, and permanent id for every column?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00782.php &amp;lt;nowiki&amp;gt;Re: column ordering, was Re: [PATCHES] Enums patch v2&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg01029.php &amp;lt;nowiki&amp;gt;Column reordering in pg_dump&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow deactivating (and reactivating) indexes via ALTER TABLE&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg01191.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== CLUSTER ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Automatically maintain clustering on a table&lt;br /&gt;
|This might require some background daemon to maintain clustering during periods of low usage. It might also require tables to be only partially filled for easier reorganization.  Another idea would be to create a merged heap/index data file so an index lookup would automatically access the heap data too.  A third idea would be to store heap rows in hashed groups, perhaps using a user-supplied hash function.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2004-08/msg00350.php &amp;lt;nowiki&amp;gt;Equivalent praxis to CLUSTERED INDEX?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00155.php &amp;lt;nowiki&amp;gt;Re: Grouped Index Tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://community.enterprisedb.com/git/&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2009-10/msg00346.php &amp;lt;nowiki&amp;gt;Re: maintain_cluster_order_v5.patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== COPY ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY to report error lines and continue&lt;br /&gt;
|This requires the use of a savepoint before each COPY line is processed, with ROLLBACK on COPY failure. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00572.php &amp;lt;nowiki&amp;gt;Re: VLDB Features&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY FROM to create index entries in bulk&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00811.php &amp;lt;nowiki&amp;gt;Batch update of indexes on data loading&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY in CSV mode to control whether a quoted zero-length string is treated as NULL&lt;br /&gt;
|Currently this is always treated as a zero-length string, which generates an error when loading into an integer column &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00905.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] allow CSV quote in NULL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve COPY performance&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00954.php &amp;lt;nowiki&amp;gt;Re: 8.3 / 8.2.6 restore comparison&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01882.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY to report errors sooner&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01169.php &amp;lt;nowiki&amp;gt;Timely reporting of COPY errors&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY to handle other number formats&lt;br /&gt;
|E.g. the German notation. Best would be something like WITH DECIMAL ','.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow a stalled COPY to exit if the backend is terminated&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-04/msg00067.php &amp;lt;nowiki&amp;gt;Re: possible bug not in open items&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== GRANT/REVOKE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SERIAL sequences to inherit permissions from the base table?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow dropping of a role that has connection rights&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00736.php &amp;lt;nowiki&amp;gt;DROP ROLE dependency tracking ...&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== DECLARE CURSOR ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent DROP TABLE from dropping a table referenced by its own open cursor?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide some guarantees about the behavior of cursors that invoke volatile functions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/20997.1244563664@sss.pgh.pa.us Re: Cursor with hold emits the same row more than once across commits in 8.3.7]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== INSERT ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow INSERT/UPDATE of the system-generated oid value for a row}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|In rules, allow VALUES() to contain a mixture of 'old' and 'new' references}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== SHOW/SET ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM ANALYZE, and CLUSTER}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rationalize the discrepancy between settings that use values in bytes and SHOW that returns the object count&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2008-07/msg00007.php &amp;lt;nowiki&amp;gt;Re: [ADMIN] shared_buffers and shmmax&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== ANALYZE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have EXPLAIN ANALYZE issue NOTICE messages when the estimated and actual row counts differ by a specified percentage}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have EXPLAIN ANALYZE report rows as floating-point numbers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg01363.php &amp;lt;nowiki&amp;gt;explain analyze rows=%.0f&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00108.php &amp;lt;nowiki&amp;gt;Re: explain analyze rows=%.0f&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve how ANALYZE computes in-doubt tuples&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00771.php &amp;lt;nowiki&amp;gt;VACUUM/ANALYZE counting of in-doubt tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Window Functions ===&lt;br /&gt;
See {{messageLink|357.1230492361@sss.pgh.pa.us|TODO items for window functions}}.&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support creation of user-defined window functions&lt;br /&gt;
|We have the ability to create new window functions written in C.  Is it&lt;br /&gt;
worth the effort to create an API that would let them be written in PL/pgsql, etc?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement full support for window framing clauses&lt;br /&gt;
|In addition to done clauses described in the [http://developer.postgresql.org/pgdocs/postgres/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS latest doc], these clauses are not implemented yet.&lt;br /&gt;
* RANGE BETWEEN ... PRECEDING/FOLLOWING&lt;br /&gt;
* EXCLUDE&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Investigate tuplestore performance issues&lt;br /&gt;
|The tuplestore_in_memory() thing is just a band-aid, we ought to try to solve it properly.  tuplestore_advance seems like a weak spot as well.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00152.php &amp;lt;nowiki&amp;gt;tuplestore potential performance problem&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem|Do we really need so much duplicated code between Agg and WindowAgg?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Teach planner to evaluate multiple windows in the optimal order&lt;br /&gt;
|Currently windows are always evaluated in the query-specified order.&lt;br /&gt;
* http://archives.postgresql.org/message-id/3CDAD71E9D70417290FCF66F0178D1E1@amd64&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement DISTINCT clause in window aggregates&lt;br /&gt;
|Some proprietary RDBMSs have implemented it already, so it helps with porting from those.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Integrity Constraints ==&lt;br /&gt;
=== Keys ===&lt;br /&gt;
&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve deferrable unique constraints for cases with many conflicts&lt;br /&gt;
|The current implementation fires a trigger for each potentially conflicting row.  This might not scale well for an update that changes many key values at once.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Referential Integrity ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add MATCH PARTIAL referential integrity}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change foreign key constraint for array -&amp;amp;gt; element to mean element in array?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-10/msg01814.php &amp;lt;nowiki&amp;gt;foreign keys for array/period contains relationships&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem when cascading referential triggers make changes on cascaded tables, seeing the tables in an intermediate state&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Work-in-progress referential action trigger timing&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Optimize referential integrity checks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2005-10/msg00458.php &amp;lt;nowiki&amp;gt;Re: Effects of cascading references in foreign keys&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00744.php &amp;lt;nowiki&amp;gt;Can't ri_KeysEqual() consider two nulls as equal?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Server-Side Languages ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for polymorphic arguments and return types to languages other than PL/PgSQL}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for OUT and INOUT parameters to languages other than PL/PgSQL}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add more fine-grained specification of functions taking arbitrary data types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00367.php &amp;lt;nowiki&amp;gt;RfD: more powerful &amp;amp;quot;any&amp;amp;quot; types&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement stored procedures&lt;br /&gt;
|This might involve the control of transaction state and the return of multiple result sets&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-10/msg00454.php &amp;lt;nowiki&amp;gt;PL/pgSQL stored procedure returning multiple result sets (SELECTs)?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01375.php &amp;lt;nowiki&amp;gt;Proposal: real procedures again (8.4)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg00542.php&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-04/msg01149.php &amp;lt;nowiki&amp;gt;Gathering specs and discussion on feature (post 9.1)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow holdable cursors in SPI}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Add SPI_gettypmod() to return a field's typemod from a TupleDesc&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2005-11/msg00250.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== SQL-Language Functions ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SQL-language functions to reference parameters by parameter name&lt;br /&gt;
|Currently SQL-language functions can only refer to dollar parameters, e.g. $1&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01479.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01519.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00221.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rethink query plan caching and timing of parse analysis within SQL-language functions&lt;br /&gt;
|They should work more like plpgsql functions do ...&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2011-05/msg00078.php &amp;lt;nowiki&amp;gt;Re: BUG #6019: invalid cached plan on inherited table&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/pgSQL ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Allow listing of record column names, and access to record columns via variables, e.g. columns := r.(*), tval2 := r.(colname)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2005-07/msg00458.php &amp;lt;nowiki&amp;gt;Re: PL/PGSQL: Dynamic Record Introspection&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-05/msg00302.php &amp;lt;nowiki&amp;gt;Re: PL/PGSQL: Dynamic Record Introspection&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00031.php &amp;lt;nowiki&amp;gt;Re: PL/PGSQL: Dynamic Record Introspection&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow row and record variables to be set to NULL constants, and allow NULL tests on such variables&lt;br /&gt;
|Because a row is not scalar, do not allow assignment from NULL-valued scalars.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg00070.php &amp;lt;nowiki&amp;gt;NULL and plpgsql rows&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider keeping separate cached copies when search_path changes&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg01009.php &amp;lt;nowiki&amp;gt;pl/pgsql Plan Invalidation and search_path&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of NULL row values vs. NULL rows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg01758.php &amp;lt;nowiki&amp;gt;Null row vs. row of nulls in plpgsql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg01973.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve PERFORM handling of WITH queries or document limitation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-03/msg00309.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/Perl ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow regex operations in plperl using UTF8 characters in non-UTF8 encoded databases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/Python ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Develop a trusted variant of PL/Python.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create a new restricted execution class that will allow passing function arguments in as locals.  Passing them as globals means functions cannot be called recursively.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-02/msg01468.php &amp;lt;nowiki&amp;gt;Re: pl/python do not delete function arguments&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a DB-API compliant interface on top of the SPI interface}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|For functions returning a setof record with a composite type, cache the I/O functions for the composite type&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg02007.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix loss of information during conversion of numeric type to Python float}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/Tcl ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add table function support}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Check encoding validity of values passed back to Postgres in function returns, trigger tuple changes, and SPI calls.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Clients ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a function like pg_get_indexdef() that report more detailed index information&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00166.php &amp;lt;nowiki&amp;gt;BUG #3829: Wrong index reporting from pgAdmin III (v1.8.0 rev 6766-6767)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Split out pg_resetxlog output into pre- and post-sections&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg02040.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== pg_ctl ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow pg_ctl to work properly with configuration files located outside the PGDATA directory&lt;br /&gt;
|pg_ctl can not read the pid file because it isn't located in the config directory but in the PGDATA directory.  The solution is to allow pg_ctl to read and understand postgresql.conf to find the data_directory value.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-10/msg00024.php &amp;lt;nowiki&amp;gt;BUG #5103: &amp;amp;quot;pg_ctl -w (re)start&amp;amp;quot; fails with custom unix_socket_directory&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Modify pg_ctl behavior and exit codes to make it easier to write an LSB conforming init script&lt;br /&gt;
|It may be desirable to condition some of the changes on a command-line switch, to avoid breaking existing scripts.  A Linux shell (sh) script is referenced which has been tested and seems to provide a high degree of conformance in multiple environments.  Study of this script might suggest areas where pg_ctl could be modified to make writing an LSB conforming script easier; however, some aspects of that script would be unnecessary with other suggested changes to pg_ctl, and discussion on the lists did not reach consensus on support for all aspects of this script.  Further discussion of particular changes is needed before beginning any work.&lt;br /&gt;
* [[Lsb_conforming_init_script|LSB conforming init script]]&lt;br /&gt;
These threads should be studied for other ideas on improvements:&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01390.php &amp;lt;nowiki&amp;gt;We should Axe /contrib/start-scripts&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01843.php &amp;lt;nowiki&amp;gt;Linux LSB init script&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00008.php &amp;lt;nowiki&amp;gt;Re: Linux LSB init script&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve pg_ctl's detection of running postmasters&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00000.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-committers/2011-06/msg00001.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== psql ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have psql \ds show all sequences and their settings&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00916.php &amp;lt;nowiki&amp;gt;Re: TODO item: Have psql show current values for a sequence&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00401.php &amp;lt;nowiki&amp;gt;Quick patch: Display sequence owner&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have \d on a sequence indicate if the sequence is owned by a table}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move psql backslash database information into the backend, use mnemonic commands?&lt;br /&gt;
|This would allow non-psql clients to pull the same information out of the database as psql. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-01/msg00191.php &amp;lt;nowiki&amp;gt;Re: psql \d option list overloaded&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make psql's \d commands more consistent in their handling of schemas&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php &amp;lt;nowiki&amp;gt;Re: psql and schemas&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make psql's \d commands distinguish default privileges from no privileges&lt;br /&gt;
|ACL displays were visibly different for the two cases before we &amp;quot;improved&amp;quot; them by using array_to_string.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2011-05/msg00082.php &amp;lt;nowiki&amp;gt;BUG #6021: There is no difference between default and empty access privileges with \dp&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consistently display privilege information for all objects in psql}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add &amp;amp;quot;auto&amp;amp;quot; expanded mode that outputs in expanded format if &amp;amp;quot;wrapped&amp;amp;quot; mode can't wrap the output to the screen width&lt;br /&gt;
|Consider using auto-expanded mode for backslash commands like \df+.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00417.php &amp;lt;nowiki&amp;gt;Re: psql wrapped format default for backslash-d commands&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg01638.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent tab completion of SET TRANSACTION from querying the database and therefore preventing the transaction isolation level from being set.&lt;br /&gt;
|Currently SET &amp;amp;lt;tab&amp;amp;gt; causes a database lookup to check all supported session variables.  This query causes problems because setting the transaction isolation level must be the first statement of a transaction.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|\s without arguments (display history) fails with libedit, doesn't use pager either&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2011-06/msg00114.php &amp;lt;nowiki&amp;gt; psql \s not working - OS X&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a \set variable to control whether \s displays line numbers&lt;br /&gt;
|Another option is to add \# which lists line numbers, and allows command execution.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00255.php &amp;lt;nowiki&amp;gt;Re: psql possible TODO&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Include the symbolic SQLSTATE name in verbose error reports&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-09/msg00438.php &amp;lt;nowiki&amp;gt;Re: Checking is TSearch2 query is valid&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add prompt escape to display the client and server versions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00310.php &amp;lt;nowiki&amp;gt;WIP patch for TODO Item: Add prompt escape to display the client and server versions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add option to wrap column values at whitespace boundaries, rather than chopping them at a fixed width.&lt;br /&gt;
|Currently, &amp;amp;quot;wrapped&amp;amp;quot; format chops values into fixed widths.  Perhaps the word wrapping could use the same algorithm documented in the W3C specification. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00404.php &amp;lt;nowiki&amp;gt;Re: psql wrapped format default for backslash-d commands&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://www.w3.org/TR/CSS21/tables.html#auto-table-layout}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support the ReST table output format&lt;br /&gt;
|Details about the ReST format:  http://docutils.sourceforge.net/rst.html#reference-documentation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg01007.php &amp;lt;nowiki&amp;gt;Proposal: new border setting in psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00518.php &amp;lt;nowiki&amp;gt;Re: Proposal: new border setting in psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00609.php &amp;lt;nowiki&amp;gt;Re: Proposal: new border setting in psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add option to print advice for people familiar with other databases&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg01845.php &amp;lt;nowiki&amp;gt;MySQL-ism help patch for psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|\dd is missing comments for several types of objects&lt;br /&gt;
|Comments are not handled at all for some object types, and are handled by both \dd and the individual backslash command for others. Consider a system view like pg_comments to manage this mess.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2009-09/msg00199.php &amp;lt;nowiki&amp;gt;comment on constraint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-09/msg01080.php &amp;lt;nowiki&amp;gt;pg_comments&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-05/msg00885.php &amp;lt;nowiki&amp;gt;patch: Allow \dd to show constraint comments&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ability to edit views with \ev&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00023.php &amp;lt;nowiki&amp;gt;Adding \ev view editor?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix FETCH_COUNT to handle SELECT ... INTO and WITH queries&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01565.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2010-05/msg00192.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent psql from sending remaining single-line multi-statement queries after reconnecting&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2010-05/msg00159.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01283.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Add \i option to bring in the specified file as a quoted literal&lt;br /&gt;
|This would be useful for creating functions and other areas.  Details still need to be worked out.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-02/msg00016.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-02/msg00020.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having psql -c read .psqlrc, for consistency&lt;br /&gt;
|psql -f already reads .psqlrc&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow processing of multiple -f (file) options&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve line drawing characters&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00386.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider improving the continuation prompt&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg01772.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== pg_dump / pg_restore ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Add full object name to the tag field.  eg. for operators we need '=(integer, integer)', instead of just '='.&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add pg_dumpall custom format dumps?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2010-05/msg00509.php pg_dumpall custom format]&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid using platform-dependent locale names in pg_dumpall output&lt;br /&gt;
|Using native locale names puts roadblocks in the way of porting a dump to another platform.  One possible solution is to get&lt;br /&gt;
CREATE DATABASE to accept some agreed-on set of locale names and fix them up to meet the platform's requirements.&lt;br /&gt;
* http://archives.postgresql.org/message-id/21396.1241716688@sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow selection of individual object(s) of all types, not just tables}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|In a selective dump, allow dumping of an object and all its dependencies}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add options like pg_restore -l and -L to pg_dump}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for multiple pg_restore -t options, like pg_dump&lt;br /&gt;
|pg_restore's -t switch is less useful than pg_dump's in quite a few ways: no multiple switches, no pattern matching, no ability to pick up indexes and other dependent items for a selected table.  It should be made to handle this switch just like pg_dump does.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Stop dumping CASCADE on DROP TYPE commands in clean mode}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pg_dump --clean to drop roles that own objects or have privileges&lt;br /&gt;
|tgl says: if this is about pg_dumpall, it's done as of 8.4.  If it's really about pg_dump, what does it mean?  pg_dump has no business dropping roles.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pg_dump to utilize multiple CPUs and I/O channels by dumping multiple objects simultaneously&lt;br /&gt;
|The difficulty with this is getting multiple dump processes to produce a single dump output file.  It also would require several sessions to share the same snapshot. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php &amp;lt;nowiki&amp;gt;pg_dump additional options for performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00135.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00040.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg02454.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pg_restore to load different parts of the COPY data for a single table simultaneously}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Remove support for dumping from pre-7.3 servers&lt;br /&gt;
|In 7.3 and later, we can get accurate dependency information from the server.  pg_dump still contains a lot of crufty code&lt;br /&gt;
to try to deal with the lack of dependency info in older servers, but the usefulness of maintaining that code grows small.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pre/data/post files when schema and data are dumped separately, for performance reasons&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php &amp;lt;nowiki&amp;gt;pg_dump additional options for performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00185.php &amp;lt;nowiki&amp;gt;Re: pg_dump additional options for performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00821.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00135.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Refactor handling of database attributes between pg_dump and pg_dumpall&lt;br /&gt;
|Currently only pg_dumpall emits database attributes, such as ALTER DATABASE SET commands and database-level GRANTs.&lt;br /&gt;
Many people wish that pg_dump would do that.  One proposal is to let pg_dump issue such commands if the -C switch was used,&lt;br /&gt;
but it's unclear whether that will satisfy the demand.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg01031.php &amp;lt;nowiki&amp;gt;ALTER DATABASE vs pg_dump&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2010-05/msg00010.php summary of the issues]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change pg_dump so that a comment on the dumped database is applied to the loaded database, even if the database has a different name.&lt;br /&gt;
|This will require new backend syntax, perhaps COMMENT ON CURRENT DATABASE. This is related to the previous item.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow parallel restore of tar dumps&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-02/msg01154.php &amp;lt;nowiki&amp;gt;Re: parallel restore&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow pg_dumpall to output restorable ALTER USER/DATABASE SET settings&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00916.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00394.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02359.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-10/msg00489.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== ecpg ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Docs&lt;br /&gt;
|Document differences between ecpg and the SQL standard and information about the Informix-compatibility module.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Solve cardinality &amp;amp;gt; 1 for input descriptors / variables?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a semantic check level, e.g. check if a table really exists}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|fix handling of DB attributes that are arrays}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix nested C comments}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|sqlwarn[6] should be 'W' if the PRECISION or SCALE value specified}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make SET CONNECTION thread-aware, non-standard?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow multidimensional arrays}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement COPY FROM STDIN}} &lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a way to specify size of a bytea parameter&lt;br /&gt;
* [http://archives.postgresql.org/message-id/200906192131.n5JLVoMo044178@wwwmaster.postgresql.org &amp;lt;nowiki&amp;gt;BUG #4866: ECPG and BYTEA&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Fix small memory leaks in ecpg&lt;br /&gt;
|Memory leaks in a short running application like ecpg are not really a problem, but make debugging more complicated}} &lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow reuse of cursor name variables&lt;br /&gt;
* [http://archives.postgresql.org/message-id/20100329113435.GA3430@feivel.credativ.lan &amp;lt;nowiki&amp;gt;Problems with variable cursorname in ecpg&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== libpq ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent PQfnumber() from lowercasing unquoted column names&lt;br /&gt;
|PQfnumber() should never have been doing lowercasing, but historically it has so we need a way to prevent it}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow statement results to be automatically batched to the client&lt;br /&gt;
|Currently all statement results are transferred to the libpq client before libpq makes the results available to the application.  This feature would allow the application to make use of the first result rows while the rest are transferred, or held on the server waiting for them to be requested by libpq. One complexity is that a statement like SELECT 1/col could error out mid-way through the result set.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider disallowing multiple queries in PQexec() as an additional barrier to SQL injection attacks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg00184.php &amp;lt;nowiki&amp;gt;Re: InitPostgres and flatfiles question&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add PQexecf() that allows complex parameter substitution&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01803.php &amp;lt;nowiki&amp;gt;Last minute mini-proposal (I know, know) for PQexecf()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add SQLSTATE and severity to errors generated within libpq itself&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-interfaces/2007-11/msg00015.php &amp;lt;nowiki&amp;gt;v8.1: Error severity on libpq PGconn*&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01425.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for interface/ipaddress binding to libpq&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01811.php &amp;lt;nowiki&amp;gt;SR/libpq - outbound interface/ipaddress binding&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Triggers ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve storage of deferred trigger queue&lt;br /&gt;
|Right now all deferred trigger information is stored in backend memory.  This could exhaust memory for very large trigger queues. This item involves dumping large queues into files, or doing some kind of join to process all the triggers, some bulk operation, or a bitmap. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00876.php &amp;lt;nowiki&amp;gt;Re: BUG #4204: COPY to table with FK has memory leak&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg00464.php &amp;lt;nowiki&amp;gt;Scaling up deferred unique checks and the after trigger queue&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-08/msg00023.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow triggers to be disabled in only the current session.&lt;br /&gt;
|This is currently possible by starting a multi-statement transaction, modifying the system tables, performing the desired SQL, restoring the system tables, and committing the transaction.  ALTER TABLE ... TRIGGER requires a table lock so it is not ideal for this usage.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|With disabled triggers, allow pg_dump to use ALTER TABLE ADD FOREIGN KEY&lt;br /&gt;
|If the dump is known to be valid, allow foreign keys to be added without revalidating the data.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow statement-level triggers to access modified rows}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|When statement-level triggers are defined on a parent table, have them fire only on the parent table, and fire child table triggers only where appropriate&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg01883.php &amp;lt;nowiki&amp;gt;Statement-level triggers and inheritance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow AFTER triggers on system tables&lt;br /&gt;
|System tables are modified in many places in the backend without going through the executor and therefore not causing triggers to fire. To complete this item, the functions that modify system tables will have to fire triggers.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01665.php&lt;br /&gt;
* http://wiki.postgresql.org/wiki/DDL_Triggers&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Tighten trigger permission checks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00564.php &amp;lt;nowiki&amp;gt;Security leak with trigger functions?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow BEFORE INSERT triggers on views&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-02/msg01466.php &amp;lt;nowiki&amp;gt;Re: Why can't I put a BEFORE EACH ROW trigger on a view?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add database and transaction-level triggers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00451.php &amp;lt;nowiki&amp;gt;Proposal for db level triggers&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00620.php &amp;lt;nowiki&amp;gt;triggers on prepare, commit, rollback... ?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce locking requirements for creating a trigger&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00635.php &amp;lt;nowiki&amp;gt;Re: Change lock requirements for adding a trigger&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid requirement for &amp;quot;AFTER&amp;quot; trigger functions to return a value&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02384.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Inheritance ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow inherited tables to inherit indexes, UNIQUE constraints, and primary/foreign keys&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-05/msg00285.php &amp;lt;nowiki&amp;gt;Partitioning/inherited tables vs FKs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00039.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00305.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Honor UNIQUE INDEX on base column in INSERTs/UPDATEs on inherited table, e.g.  INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail&lt;br /&gt;
|The main difficulty with this item is the problem of creating an index that can span multiple tables.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Determine whether ALTER TABLE / SET SCHEMA should work on inheritance hierarchies (and thus support ONLY).  If yes, implement it.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|ALTER TABLE variants sometimes support recursion and sometimes not, but this is poorly/not documented, and the ONLY marker would then be silently ignored. Clarify the documentation, and reject ONLY if it is not supported.}}&lt;br /&gt;
&lt;br /&gt;
== Indexes ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent index uniqueness checks when UPDATE does not modify the column&lt;br /&gt;
|Uniqueness (index) checks are done when updating a column even if the column is not modified by the UPDATE.&lt;br /&gt;
However, HOT already short-circuits this in common cases, so more work might not be helpful.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow the creation of on-disk bitmap indexes which can be quickly combined with other bitmap indexes&lt;br /&gt;
|Such indexes could be more compact if there are only a few distinct values. Such indexes can also be compressed.  Keeping such indexes updated can be costly.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2005-07/msg00512.php &amp;lt;nowiki&amp;gt;Re: Bitmap index AM&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg01107.php &amp;lt;nowiki&amp;gt;Bitmap index thoughts&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00265.php &amp;lt;nowiki&amp;gt;Stream bitmaps&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01214.php &amp;lt;nowiki&amp;gt;Re: Bitmapscan changes - Requesting further feedback&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00013.php &amp;lt;nowiki&amp;gt;Updated bitmap index patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00741.php &amp;lt;nowiki&amp;gt;Reviewing new index types (was Re: [PATCHES] Updated bitmap indexpatch)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01023.php &amp;lt;nowiki&amp;gt;Bitmap Indexes: request for feedback&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/message-id/800923.27831.qm@web29010.mail.ird.yahoo.com &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow accurate statistics to be collected on indexes with more than one column or expression indexes, perhaps using per-index statistics&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2006-10/msg00222.php &amp;lt;nowiki&amp;gt;Re: Simple join optimized badly?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01131.php &amp;lt;nowiki&amp;gt;Stats for multi-column indexes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00741.php &amp;lt;nowiki&amp;gt;Cross-column statistics revisited&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg01431.php &amp;lt;nowiki&amp;gt;Multi-Dimensional Histograms&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00913.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg02179.php &lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00459.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02054.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg01731.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00894.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-09/msg00679.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having a larger statistics target for indexed columns and expression indexes. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider smaller indexes that record a range of values per heap page, rather than having one index entry for every heap row&lt;br /&gt;
|This is useful if the heap is clustered by the indexed values. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00341.php &amp;lt;nowiki&amp;gt;Grouped Index Tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg01264.php &amp;lt;nowiki&amp;gt;Grouped Index Tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00465.php &amp;lt;nowiki&amp;gt;Grouped Index Tuples / Clustered Indexes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-03/msg00163.php &amp;lt;nowiki&amp;gt;Bitmapscan changes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00014.php &amp;lt;nowiki&amp;gt;Re: GIT patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00487.php &amp;lt;nowiki&amp;gt;Re: Index Tuple Compression Approach?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01589.php &amp;lt;nowiki&amp;gt;Re: Index AM change proposals, redux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add REINDEX CONCURRENTLY, like CREATE INDEX CONCURRENTLY&lt;br /&gt;
|This is difficult because you must upgrade to an exclusive table lock to replace the existing index file.  CREATE INDEX CONCURRENTLY does not have this complication.  This would allow index compaction without downtime. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-08/msg00289.php &amp;lt;nowiki&amp;gt;Re: When/if to Reindex&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow multiple indexes to be created concurrently, ideally via a single heap scan&lt;br /&gt;
|pg_restore allows parallel index builds, but it is done via subprocesses, and there is no SQL interface for this.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-04/msg00093.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider sorting entries before inserting into btree index&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-01/msg01010.php &amp;lt;nowiki&amp;gt;Re: ATTN: Clodaldo was Performance problem. Could it be related to 8.3-beta4?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow index scans to return matching index keys, not just the matching heap locations&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01657.php &amp;lt;nowiki&amp;gt;Re: Is this TODO item done?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01477.php &amp;lt;nowiki&amp;gt;Index-only quals&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow creation of an index that can do comparisons to test if a value is between two column values&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00757.php &amp;lt;nowiki&amp;gt;Proposal: temporal extension &amp;amp;quot;period&amp;amp;quot; data type&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using &amp;quot;effective_io_concurrency&amp;quot; for index scans&lt;br /&gt;
* Currently only bitmap scans use this, which might be fine because most multi-row index scans use bitmap scans.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem with btree page splits during checkpoints&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00052.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-09/msg00184.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== GIST ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add more GIST index support for geometric data types}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow GIST indexes to create certain complex index types, like digital trees (see Aoki)}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix performance issues in contrib/seg and contrib/cube GiST support&lt;br /&gt;
* [http://archives.postgresql.org/message-id/alpine.DEB.2.00.0904161633160.4053@aragorn.flymine.org GiST index performance]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/alpine.DEB.2.00.0904221704470.22330@aragorn.flymine.org draft patch]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2009-05/msg00069.php &amp;lt;nowiki&amp;gt;Re: GiST index performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2009-06/msg00068.php &amp;lt;nowiki&amp;gt;GiST index performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Hash ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add UNIQUE capability to hash indexes}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add hash WAL logging for crash recovery&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-09/msg00196.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow multi-column hash indexes}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Sorting ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider whether duplicate keys should be sorted by block/offset&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00558.php &amp;lt;nowiki&amp;gt;Remove hacks for old bad qsort() implementations?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider being smarter about memory and external files used during sorts&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg01101.php &amp;lt;nowiki&amp;gt;Sorting Improvements for 8.4&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00045.php &amp;lt;nowiki&amp;gt;Re: Sorting Improvements for 8.4&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider detoasting keys before sorting}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow sorts to use more available memory&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2007-11/msg01026.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg01123.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg01957.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Fsync ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options and whether fsync does anything&lt;br /&gt;
|Ideally this requires a separate test program like /contrib/pg_test_fsync that can be run at initdb time or optionally later.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider sorting writes during checkpoint&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00541.php &amp;lt;nowiki&amp;gt;Sorted writes in checkpoint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00050.php &amp;lt;nowiki&amp;gt;Re: Sorting writes during checkpoint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg02012.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg00278.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Cache Usage ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Speed up COUNT(*)&lt;br /&gt;
|We could use a fixed row count and a +/- count to follow MVCC visibility rules, or a single cached value could be used and invalidated if anyone modifies the table.  Another idea is to get a count directly from a unique index, but for this to be faster than a sequential scan it must avoid access to the heap to obtain tuple visibility information.  Note that the index-only scans feature is now implemented which now dramatically speeds up some COUNT(*) cases.&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Slow_Counting&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a way to calculate an &amp;amp;quot;estimated COUNT(*)&amp;amp;quot;&lt;br /&gt;
|Perhaps by using the optimizer's cardinality estimates or random sampling.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-11/msg00943.php &amp;lt;nowiki&amp;gt;Re: Improving count(*)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Slow_Counting&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow data to be pulled directly from indexes&lt;br /&gt;
|Currently indexes do not have enough tuple visibility information to allow data to be pulled from the index without also accessing the heap.  The idea is to use the visibility map used for vacuum to avoid heap lookups on pages where all tuples are visible.&lt;br /&gt;
* [http://wiki.postgresql.org/wiki/Index-only_scans Index-Only Scans wiki]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider automatic caching of statements at various levels:&lt;br /&gt;
* Parsed query tree&lt;br /&gt;
* Query execute plan&lt;br /&gt;
* Query results &lt;br /&gt;
&lt;br /&gt;
:&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg00823.php &amp;lt;nowiki&amp;gt;Cached Query Plans (was: global prepared statements)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider increasing internal areas (NUM_CLOG_BUFFERS) when shared buffers is increased&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-10/msg01419.php &amp;lt;nowiki&amp;gt;Re: slru.c race condition (was Re: TRAP: FailedAssertion(&amp;amp;quot;!((itemid)-&amp;amp;gt;lp_flags &amp;amp;amp; 0x01)&amp;amp;quot;,)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00030.php &amp;lt;nowiki&amp;gt;clog_buffers to 64 in 8.3?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-08/msg00024.php &amp;lt;nowiki&amp;gt;CLOG Patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider decreasing the amount of memory used by PrivateRefCount&lt;br /&gt;
|&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg00797.php &amp;lt;nowiki&amp;gt;PrivateRefCount (for 8.3)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg00752.php &amp;lt;nowiki&amp;gt;Re: PrivateRefCount (for 8.3)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider allowing higher priority queries to have referenced buffer cache pages stay in memory longer&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00562.php &amp;lt;nowiki&amp;gt;Re: How to keep a table in memory?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Vacuum ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Auto-fill the free space map by scanning the buffer cache or by checking pages written by the background writer&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-02/msg01125.php &amp;lt;nowiki&amp;gt;Dead Space Map&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00011.php &amp;lt;nowiki&amp;gt;Re: Automatic free space map filling&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow concurrent inserts to use recently created pages rather than creating new ones&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg00853.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having single-page pruning update the visibility map&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;https://commitfest.postgresql.org/action/patch_view?id=75&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg02344.php &amp;lt;nowiki&amp;gt;Re: visibility maps and heap_prune&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve tracking of total relation tuple counts now that vacuum doesn't always scan the whole heap&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00531.php Partial vacuum versus pg_class.reltuples]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Bias FSM towards returning free space near the beginning of the heap file, in hopes that empty pages at the end can be truncated by VACUUM&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg01124.php &amp;lt;nowiki&amp;gt;FSM search modes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a more compact data representation for dead tuple locations within VACUUM&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00143.php &amp;lt;nowiki&amp;gt;Re: Have vacuum emit a warning when it runs out of maintenance_work_mem&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide more information in order to improve user-side estimates of dead space bloat in relations&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2009-05/msg01039.php &amp;lt;nowiki&amp;gt;Re: Bloated Table&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve locking behaviour of vacuum during trailing page truncation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-03/msg00319.php&lt;br /&gt;
* http://archives.postgresql.org/message-id/4D8DF88E.7080205@Yahoo.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce the number of table scans performed by vacuum&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg01119.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00605.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-07/msg00624.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Auto-vacuum ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Issue log message to suggest VACUUM FULL if a table is nearly empty?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent long-lived temporary tables from causing frozen-xid advancement starvation&lt;br /&gt;
|The problem is that autovacuum cannot vacuum them to set frozen xids; only the session that created them can do that. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-06/msg01645.php &amp;lt;nowiki&amp;gt;Re: AutoVacuum Behaviour Question&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent autovacuum from running if an old transaction is still running from the last vacuum&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00899.php &amp;lt;nowiki&amp;gt;Re: Autovacuum and OldestXmin&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have autoanalyze of parent tables occur when child tables are modified&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-06/msg00137.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-10/msg00271.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Locking ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix priority ordering of read and write light-weight locks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00893.php &amp;lt;nowiki&amp;gt;lwlocks and starvation&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00905.php &amp;lt;nowiki&amp;gt;Re: lwlocks and starvation&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem when multiple subtransactions of the same outer transaction hold different types of locks, and one subtransaction aborts&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg01011.php &amp;lt;nowiki&amp;gt;FOR SHARE vs FOR UPDATE locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00001.php &amp;lt;nowiki&amp;gt;Re: FOR SHARE vs FOR UPDATE locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00435.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] [pgsql-patches] Phantom Command IDs, updated patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00773.php &amp;lt;nowiki&amp;gt;Re: savepoints and upgrading locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow UPDATEs on only non-referential integrity columns not to conflict with referential integrity locks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00073.php &amp;lt;nowiki&amp;gt;Referential Integrity and SHARE locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add idle_in_transaction_timeout GUC so locks are not held for long periods of time}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve deadlock detection when a page cleaning lock conflicts with a shared buffer that is pinned&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-01/msg00138.php &amp;lt;nowiki&amp;gt;BUG #3883: Autovacuum deadlock with truncate?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php &amp;lt;nowiki&amp;gt;Thoughts about bug #3883&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-committers/2008-01/msg00365.php &amp;lt;nowiki&amp;gt;Re: pgsql: Add checks to TRUNCATE, CLUSTER, and REINDEX to prevent&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Detect deadlocks involving LockBufferForCleanup()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php &amp;lt;nowiki&amp;gt;Thoughts about bug #3883&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow finer control over who is cancelled in a deadlock&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01727.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a lock timeout parameter&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00485.php &amp;lt;nowiki&amp;gt;SELECT ... FOR UPDATE [WAIT integer | NOWAIT] for 8.5&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce number of unnecessary false positives in Serializable Snapshot Isolation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-06/msg00609.php &amp;lt;nowiki&amp;gt;SSI heap_insert and page-level predicate locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Startup Time Improvements ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Experiment with multi-threaded backend for backend creation&lt;br /&gt;
|This would prevent the overhead associated with process creation. Most operating systems have trivial process creation time compared to database startup overhead, but a few operating systems (Win32, Solaris) might benefit from threading.  Also explore the idea of a single session using multiple threads to execute a statement faster.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow backends to change their database without restart&lt;br /&gt;
|This allows for faster server startup.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00843.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00336.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Write-Ahead Log ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Eliminate need to write full pages to WAL before page modification&lt;br /&gt;
|Currently, to protect against partial disk page writes, we write full page images to WAL before they are modified so we can correct any partial page writes during recovery.  These pages can also be eliminated from point-in-time archive files. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2002-06/msg00655.php &amp;lt;nowiki&amp;gt;Re: Index Scans become Seq Scans after VACUUM ANALYSE&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg01191.php &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|When full page writes are off, write CRC to WAL and check file system blocks on recovery&lt;br /&gt;
|If CRC check fails during recovery, remember the page in case a later CRC for that page properly matches.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Write full pages during file system write and not when the page is modified in the buffer cache&lt;br /&gt;
|This allows most full page writes to happen in the background writer.  It might cause problems for applying WAL on recovery into a partially-written page, but later the full page will be replaced from WAL.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce WAL traffic so only modified values are written rather than entire rows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01589.php &amp;lt;nowiki&amp;gt;Reduction in WAL for UPDATEs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow WAL information to recover corrupted pg_controldata&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00025.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] pg_resetxlog -r flag&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Find a way to reduce rotational delay when repeatedly writing last WAL page&lt;br /&gt;
|Currently fsync of WAL requires the disk platter to perform a full rotation to fsync again. One idea is to write the WAL to different offsets that might reduce the rotational delay. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2002-11/msg00483.php &amp;lt;nowiki&amp;gt;500 tpsQL + WAL log implementation&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Speed WAL recovery by allowing more than one page to be prefetched&lt;br /&gt;
|This should be done utilizing the same infrastructure used for prefetching in general to avoid introducing complex error-prone code in WAL replay. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-12/msg00683.php &amp;lt;nowiki&amp;gt;Slow PITR restore&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00497.php &amp;lt;nowiki&amp;gt;Re: [GENERAL] Slow PITR restore&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg01279.php &amp;lt;nowiki&amp;gt;Read-ahead and parallelism in redo recovery&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve WAL concurrency by increasing lock granularity&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00556.php &amp;lt;nowiki&amp;gt;Reworking WAL locking&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Be more aggressive about creating WAL files&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01325.php &amp;lt;nowiki&amp;gt;Re: PANIC caused by open_sync on Linux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-07/msg01075.php &amp;lt;nowiki&amp;gt;PreallocXlogFiles&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-04/msg00556.php &amp;lt;nowiki&amp;gt;WAL/PITR additional items&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have resource managers report the duration of their status changes&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01468.php &amp;lt;nowiki&amp;gt;Recovery of Multi-stage WAL actions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move pgfoundry's xlogdump to /contrib and have it rely more closely on the WAL backend code&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00035.php &amp;lt;nowiki&amp;gt;xlogdump&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Close deleted WAL files held open in *nix by long-lived read-only backends&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg01754.php &amp;lt;nowiki&amp;gt;Deleted WAL files held open by backends in Linux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00060.php &amp;lt;nowiki&amp;gt;Re: Deleted WAL files held open by backends in Linux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Optimizer / Executor ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve selectivity functions for geometric operators}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider increasing the default values of from_collapse_limit, join_collapse_limit, and/or geqo_threshold&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4136ffa0905210551u22eeb31bn5655dbe7c9a3aed5@mail.gmail.com from_collapse_limit vs. geqo_threshold]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve ability to display optimizer analysis using OPTIMIZER_DEBUG}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Log statements where the optimizer row estimates were dramatically different from the number of rows actually found?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider compressed annealing to search for query plans&lt;br /&gt;
|This might replace GEQO.&lt;br /&gt;
* http://archives.postgresql.org/message-id/15658.1241278636%40sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve use of expression indexes for ORDER BY &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01553.php &amp;lt;nowiki&amp;gt;Resjunk sort columns, Heikki's index-only quals patch, and bug #5000&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Modify the planner to better estimate caching effects&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-11/msg00117.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow shared buffer cache contents to affect index cost computations&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg01140.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Hashing ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using a hash for joining to a large IN (VALUES ...) list&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00450.php &amp;lt;nowiki&amp;gt;Planning large IN lists&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow single batch hash joins to preserve outer pathkeys&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg00806.php Re: Potential Join Performance Issue]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;quot;lazy&amp;quot; hash tables - look up only the tuples that are actually requested&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid building the same hash table more than once during the same query&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid hashing for distinct and then re-hashing for hash join&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4136ffa0902191346g62081081v8607f0b92c206f0a@mail.gmail.com Re: Fixing Grittner's planner issues]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Background Writer ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having the background writer update the transaction status hint bits before writing out the page&lt;br /&gt;
|Implementing this requires the background writer to have access to system catalogs and the transaction status log.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider adding buffers the background writer finds reusable to the free list &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00781.php &amp;lt;nowiki&amp;gt;Background LRU Writer/free list&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Automatically tune bgwriter_delay based on activity rather then using a fixed interval&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00781.php &amp;lt;nowiki&amp;gt;Background LRU Writer/free list&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider whether increasing BM_MAX_USAGE_COUNT improves performance&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg01007.php &amp;lt;nowiki&amp;gt;Bgwriter LRU cleaning: we've been going at this all wrong&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Test to see if calling PreallocXlogFiles() from the background writer will help with WAL segment creation latency&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-06/msg00340.php &amp;lt;nowiki&amp;gt;Re: Load Distributed Checkpoints, final patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Concurrent Use of Resources ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Do async I/O for faster random read-ahead of data&lt;br /&gt;
|Async I/O allows multiple I/O requests to be sent to the disk with results coming back asynchronously.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg00820.php &amp;lt;nowiki&amp;gt;Asynchronous I/O Support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-09/msg00255.php &amp;lt;nowiki&amp;gt;Re: random_page_costs - are defaults of 4.0 realistic for SCSI RAID 1&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00027.php &amp;lt;nowiki&amp;gt;There's random access and then there's random access&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-01/msg00170.php &amp;lt;nowiki&amp;gt;Bitmap index scan preread using posix_fadvise (Was: There's random access and then there's random access)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
The above patch is already applied as of 8.4, but it still remains to figure out how to handle plain indexscans effectively.&lt;br /&gt;
* [http://archives.postgresql.org//pgsql-hackers/2009-01/msg00806.php Problems with the patch submitted for posix_fadvise in index scans]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Experiment with multi-threaded backend for better I/O utilization&lt;br /&gt;
|This would allow a single query to make use of multiple I/O channels simultaneously.  One idea is to create a background reader that can pre-fetch sequential and index scan pages needed by other backends. This could be expanded to allow concurrent reads from multiple devices in a partitioned table.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-02/msg00123.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Experiment with multi-threaded backend for better CPU utilization&lt;br /&gt;
|This would allow several CPUs to be used for a single query, such as for sorting or query execution.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00945.php &amp;lt;nowiki&amp;gt;Multi CPU Queries - Feedback and/or suggestions wanted!&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|SMP scalability improvements&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00439.php &amp;lt;nowiki&amp;gt;Straightforward changes for increased SMP scalability&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00206.php &amp;lt;nowiki&amp;gt;Re: Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00361.php &amp;lt;nowiki&amp;gt;Re: Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== TOAST ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow user configuration of TOAST thresholds&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00213.php &amp;lt;nowiki&amp;gt;Re: Proposed adjustments in MaxTupleSize and toastthresholds&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00082.php &amp;lt;nowiki&amp;gt;pg_lzcompress strategy parameters&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce unnecessary cases of deTOASTing&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00895.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Eliminate more detoast copies for packed varlenas&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce costs of repeat de-TOASTing of values&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg01096.php &amp;lt;nowiki&amp;gt;WIP patch: reducing overhead for repeat de-TOASTing&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Monitoring ==&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Expand pg_stat_activity for easier integration with monitoring tools&lt;br /&gt;
|* http://archives.postgresql.org/message-id/4DFA13A5.2060200@2ndQuadrant.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add column to pg_stat_activity that shows the progress of long-running commands like CREATE INDEX and VACUUM&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-04/msg00203.php &amp;lt;nowiki&amp;gt;EXPLAIN progress info&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* The CLUSTER/VACUUM FULL implementation would also be useful to track this way&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have pg_stat_activity display query strings in the correct client encoding&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00131.php &amp;lt;nowiki&amp;gt;pg_stats queries versus per-database encodings&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Expose pg_controldata via an SQL interface&lt;br /&gt;
|Helpful for monitoring replicated databases&lt;br /&gt;
* http://archives.postgresql.org/message-id/4B901D73.8030003@agliodbs.com&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4B959D7A.6010907@joeconway.com initial patch]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Performance ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Use mmap() rather than SYSV for shared buffers?&lt;br /&gt;
|This would remove the requirement for SYSV SHM but would introduce portability issues. Anonymous mmap (or mmap to /dev/zero) is required to prevent I/O overhead. We could also consider mmap() for writing WAL.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00750.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00756.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rather than consider mmap()-ing in 8k pages, consider mmap()'ing entire files into a backend?&lt;br /&gt;
|Doing I/O to large tables would consume a lot of address space or require frequent mapping/unmapping.  Extending the file also causes mapping problems that might require mapping only individual pages, leading to thousands of mappings.  Another problem is that there is no way to _prevent_ I/O to disk from the dirty shared buffers so changes could hit disk before WAL is written.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01239.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider ways of storing rows more compactly on disk:&lt;br /&gt;
* Reduce the row header size?&lt;br /&gt;
* Consider reducing on-disk varlena length from four bytes to two because a heap row cannot be more than 64k in length}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider transaction start/end performance improvements&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00948.php &amp;lt;nowiki&amp;gt;Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00361.php &amp;lt;nowiki&amp;gt;Re: Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow configuration of backend priorities via the operating system&lt;br /&gt;
|Though backend priorities make priority inversion during lock waits possible, research shows that this is not a huge problem.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-02/msg00493.php &amp;lt;nowiki&amp;gt;Priorities for users or queries?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider increasing the minimum allowed number of shared buffers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-02/msg00157.php &amp;lt;nowiki&amp;gt;Re: [PATCH] Don't bail with legitimate -N/-B options&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider if CommandCounterIncrement() can avoid its AcceptInvalidationMessages() call&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-committers/2007-11/msg00585.php &amp;lt;nowiki&amp;gt;pgsql: Avoid incrementing the CommandCounter when&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider Cartesian joins when both relations are needed to form an indexscan qualification for a third relation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-12/msg00090.php &amp;lt;nowiki&amp;gt;Re: TB-sized databases&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider not storing a NULL bitmap on disk if all the NULLs are trailing&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00624.php &amp;lt;nowiki&amp;gt;Proposal for Null Bitmap Optimization(for Trailing NULLs)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-12/msg00109.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Proposal for Null Bitmap Optimization(for TrailingNULLs)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Sort large UPDATE/DELETEs so it is done in heap order&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg01119.php &amp;lt;nowiki&amp;gt;Possible future performance improvement: sort updates/deletes by ctid&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow one transaction to see tuples using the snapshot of another transaction&lt;br /&gt;
|This would assist multiple backends in working together. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00400.php &amp;lt;nowiki&amp;gt;Transaction Snapshot Cloning&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00135.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00260.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00466.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-08/msg00684.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider decreasing the I/O caused by updating tuple hint bits&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00847.php &amp;lt;nowiki&amp;gt;Hint Bits and Write I/O&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00199.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Hint Bits and Write I/O&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg00695.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00792.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg01063.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01408.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01453.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid the requirement of freezing pages that are infrequently modified &lt;br /&gt;
|If all rows on a page are visible, it is possible to set a bit in the visibility map (once the visibility map is 100% reliable) and not need to freeze the page, avoiding a page rewrite&lt;br /&gt;
*  http://archives.postgresql.org/message-id/4BF701CF.2090205@agliodbs.com&lt;br /&gt;
*  http://archives.postgresql.org/pgsql-hackers/2010-06/msg00082.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid reading in b-tree pages when replaying vacuum records in hot standby mode&lt;br /&gt;
* [http://archives.postgresql.org/message-id/1272571938.4161.14739.camel@ebony &amp;lt;nowiki&amp;gt;Hot Standby tuning for btree_xlog_vacuum()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Restructure truncation logic to be more resistant to failure&lt;br /&gt;
|This also involves not writing dirty buffers for a truncated or dropped relation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01032.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider adding logic to increase large tables by more than 8k&lt;br /&gt;
|This would reduce file system fragmentation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-03/msg00337.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Other ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Deal with encoding issues for filenames in the server filesystem&lt;br /&gt;
* {{MessageLink|20090413184335.39BE.52131E4D@oss.ntt.co.jp|a proposed patch here}}&lt;br /&gt;
* {{MessageLink|8484.1244655656@sss.pgh.pa.us|some issues about it here}}&lt;br /&gt;
* {{MessageLink|20100107103740.97A5.52131E4D@oss.ntt.co.jp|Windows-specific patch here}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Deal with encoding issues in the output of localeconv()&lt;br /&gt;
* [http://archives.postgresql.org/message-id/40c6d9160904210658y590377cfw6dbbecb53d2b8be0@mail.gmail.com bug report]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/49EF8DA0.90008@tpf.co.jp draft patch]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/21710.1243620986@sss.pgh.pa.us review of patch]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide schema name and other fields available from SQL GET DIAGNOSTICS in error reports&lt;br /&gt;
* [http://archives.postgresql.org/message-id/dcc563d10810211907n3c59a920ia9eb7cd2a6d5ea58@mail.gmail.com &amp;lt;nowiki&amp;gt;How to get schema name which violates fk constraint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg00846.php &amp;lt;nowiki&amp;gt;patch - Report the schema along table name in a referential failure 	error message&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* {{MessageLink|3191.1263306359@sss.pgh.pa.us|Re: NOT NULL violation and error-message}}&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg00213.php &amp;lt;nowiki&amp;gt;the case for machine-readable error fields&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
| Provide [http://developer.postgresql.org/pgdocs/postgres/libpq-connect.html#LIBPQ-CONNECT-FALLBACK-APPLICATION-NAME fallback_application_name] in contrib/pgbench, oid2name, and dblink.&lt;br /&gt;
* {{MessageLink|w2g9837222c1004070216u3bc46b3ahbddfdffdbfb46212@mail.gmail.com|fallback_application_name and pgbench}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add 64-bit support to /contrib/pgbench&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-07/msg00153.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg00705.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add use of 'const' for variables in source tree}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Remove warnings created by -Wcast-align}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move platform-specific ps status display info from ps_status.c to ports}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add optional CRC checksum to heap and index pages&lt;br /&gt;
|One difficulty is how to prevent hint bit changes from affecting the computed CRC checksum.&lt;br /&gt;
* http://archives.postgresql.org/message-id/19934.1226601952%40sss.pgh.pa.us&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00002.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01028.php &amp;lt;nowiki&amp;gt;double-buffering page writes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00524.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01101.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00011.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00249.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a faster CRC32 algorithm&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01112.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow cross-compiling by generating the zic database on the target system}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve NLS maintenance of libpgport messages linked onto applications}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Use UTF8 encoding for NLS messages so all server encodings can read them properly}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow creation of universal binaries for Darwin&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00884.php &amp;lt;nowiki&amp;gt;Getting to universal binaries for Darwin&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider GnuTLS if OpenSSL license becomes a problem&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg00892.php&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-05/msg00040.php &amp;lt;nowiki&amp;gt;[PATCH] Add support for GnuTLS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg01213.php &amp;lt;nowiki&amp;gt;TODO: GNU TLS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider making NAMEDATALEN more configurable in future releases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Research use of signals and sleep wake ups&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00003.php &amp;lt;nowiki&amp;gt;Restartable signals 'n all that&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow C++ code to more easily access backend code&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00302.php &amp;lt;nowiki&amp;gt;Mostly Harmless: Welcoming our C++ friends&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider simplifying how memory context resets handle child contexts&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-08/msg00067.php &amp;lt;nowiki&amp;gt;Re: Memory leak in nodeAgg&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create three versions of libpgport to simplify client code&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00154.php &amp;lt;nowiki&amp;gt;8.4 TODO item: make src/port support libpq and ecpg directly&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve detection of shared memory segments being used by others by checking the SysV shared memory field 'nattch'&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00656.php &amp;lt;nowiki&amp;gt;postgresql in FreeBSD jails: proposal&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00673.php &amp;lt;nowiki&amp;gt;Re: postgresql in FreeBSD jails: proposal&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement the non-threaded Avahi service discovery protocol&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00939.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-02/msg00097.php &amp;lt;nowiki&amp;gt;Re: Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg01211.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-04/msg00001.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce data row alignment requirements on some 64-bit systems&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00369.php &amp;lt;nowiki&amp;gt;[WIP] Reduce alignment requirements on 64-bit systems.&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Restructure TOAST internal storage format for greater flexibility&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00049.php &amp;lt;nowiki&amp;gt;Re: PG_PAGE_LAYOUT_VERSION 5 - time for change&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Add regression tests for pg_dump/restore&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01967.php &amp;lt;nowiki&amp;gt;&amp;quot;make install-check-pg_dump&amp;quot; target in src/regress]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Research different memory allocation methods for lists&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg01467.php &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Consider removing the attribute options cache&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00039.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Restructure /contrib section&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00705.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== /contrib/pg_upgrade ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Handle large object comments&lt;br /&gt;
|This is difficult to do because the large object doesn't exist when --schema-only is loaded.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using pg_depend for checking object usage in version.c&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|If reindex is necessary, allow it to be done in parallel with pg_dump custom format&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Migrate pg_statistic by dumping it out as a flat file, so analyze is not necessary&lt;br /&gt;
|pg_class.oid is not preserved so schema.tablename must be used.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve testing, perhaps using the buildfarm&lt;br /&gt;
|The buildfarm has access to multiple versions of PostgreSQL.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create machine-readable output of pg_controldata&lt;br /&gt;
|This would avoid parsing its output.  The problem is we need pg_controldata output from both the old and new clusters so we would need to support both formats.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Remove configure.in check for link failure when cause is found}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Remove readdir() errno patch when runtime/mingwex/dirent.c rev 1.4 is released}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow psql to use readline once non-US code pages work with backslashes}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem with shared memory on the Win32 Terminal Server}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve signal handling&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2005-06/msg00027.php &amp;lt;nowiki&amp;gt;Simplify Win32 Signaling code&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Convert MSVC build system to remove most batch files&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00961.php &amp;lt;nowiki&amp;gt;MSVC build system&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support pgxs when using MSVC}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix MSVC NLS support, like for to_char()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00485.php &amp;lt;nowiki&amp;gt;NLS on MSVC  strikes back!&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-02/msg00038.php &amp;lt;nowiki&amp;gt;Fix for 8.3 MSVC locale (Was  [HACKERS] NLS on MSVC strikes back!)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Find a correct rint() substitute on Windows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00808.php &amp;lt;nowiki&amp;gt;Minor bug in src/port/rint.c&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix global namespace issues when using multiple terminal server sessions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/48F3BFCC.8030107@dunslane.net problems with Windows global namespace]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change from the current autoconf/gmake build system to cmake&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01869.php &amp;lt;nowiki&amp;gt;About CMake (was Re: [COMMITTERS] pgsql: Append major version number and for libraries soname major)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve consistency of path separator usage&lt;br /&gt;
* http://archives.postgresql.org/message-id/49C0BDC5.4010002@hagander.net&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix cross-compiling on Windows&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2010-10/msg00110.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow multiple  Postgres clusters running on the same machine to distinguish themselves in the event log&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01297.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00574.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Wire Protocol Changes ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow dynamic character set handling}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add decoded type, length, precision}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Mark result columns as known-not-null when possible&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-11/msg01029.php &amp;lt;nowiki&amp;gt;Adding nullable indicator to Describe&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide more control over planner treatment of statements being prepared}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Use compression?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Update clients to use data types, typmod, schema.table.column names of result sets using new statement protocol}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make sure upgrading to a 4.1 protocol version will actually work smoothly&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28307.1318255008@sss.pgh.pa.us Re: libpq, PQdescribePrepared -&amp;gt; PQftype, PQfmod, no PQnullable]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Convert single quotes to apostrophes in the PDF documentation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2007-12/msg00059.php &amp;lt;nowiki&amp;gt;SGML docs and pdf single-quotes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a manpage for postgresql.conf&lt;br /&gt;
* {{messageLink|20080819194311.GH4428@alvh.no-ip.org|A smaller default postgresql.conf}}&lt;br /&gt;
* {{messageLink|200808211910.37524.peter_e@gmx.net|A smaller default postgresql.conf}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change the manpage-generating toolchain to use the new XML-based docbook2x tools&lt;br /&gt;
* {{messageLink|200808211910.37524.peter_e@gmx.net|A smaller default postgresql.conf}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider changing documentation format from SGML to XML&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2006-12/msg00152.php &amp;lt;nowiki&amp;gt;Re: Authoring Tools WAS: Switching to XML&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-docs/2011-04/msg00020.php&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Switching_PostgreSQL_documentation_from_SGML_to_XML&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Document support for N&amp;lt;nowiki&amp;gt;' '&amp;lt;/nowiki&amp;gt; national character string literals, if it matches the SQL standard&lt;br /&gt;
* http://archives.postgresql.org/message-id/1275895438.1849.1.camel@fsopti579.F-Secure.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add diagrams to the documentation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-docs/2010-07/msg00001.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Exotic Features ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add pre-parsing phase that converts non-ISO syntax to supported syntax&lt;br /&gt;
|This could allow SQL written for other databases to run without modification.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow plug-in modules to emulate features from other databases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add features of Oracle-style packages&lt;br /&gt;
|A package would be a schema with session-local variables, public/private functions, and initialization functions.  It is also possible to implement these capabilities in any schema and not use a separate &amp;amp;quot;packages&amp;amp;quot; syntax at all.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-08/msg00384.php &amp;lt;nowiki&amp;gt;proposal for PL packages for 8.3.&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider allowing control of upper/lower case folding of unquoted identifiers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-04/msg00818.php &amp;lt;nowiki&amp;gt;Bringing PostgreSQL torwards the standard regarding case folding&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg01527.php &amp;lt;nowiki&amp;gt;Re: [SQL] Case Preservation disregarding case sensitivity?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00849.php &amp;lt;nowiki&amp;gt;TODO Item: Consider allowing control of upper/lower case folding of unquoted,  identifiers&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00415.php &amp;lt;nowiki&amp;gt;Identifier case folding notes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00415.php &amp;lt;nowiki&amp;gt;Identifier case folding notes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add autonomous transactions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00893.php &amp;lt;nowiki&amp;gt;autonomous transactions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Give query progress indication&lt;br /&gt;
* [[Query progress indication]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rethink our type system&lt;br /&gt;
* [[Rethinking datatypes]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Features We Do ''Not'' Want ==&lt;br /&gt;
&lt;br /&gt;
The following features have been discussed ad nauseum on the PostgreSQL mailing lists and the consensus has been that the project is not interested in them.  As such, if you are going to bring them up as potential features, you will want to be familiar with all of the arguments against these features which have been previously made over the years.  If you decide to work on such features anyway, you should be aware that you face a higher-than-normal barrier to get the Project to accept them.&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|All backends running as threads in a single process (not wanted)&lt;br /&gt;
|This eliminates the process protection we get from the current setup. Thread creation is usually the same overhead as process creation on modern systems, so it seems unwise to use a pure threaded model, and MySQL and DB2 have demonstrated that threads introduce as many issues as they solve.  Threading specific operations such as I/O, seq scans, and connection management has been discussed and will probably be implemented to enable specific performance features.  Moving to a threaded engine would also require halting all other work on PostgreSQL for one to two years.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;quot;Oracle-style&amp;quot; optimizer hints (not wanted)&lt;br /&gt;
|Optimizer hints, as implemented in Oracle and other RDBMSes, are used to work around problems in the optimizer and introduce upgrade and maintenance issues.  We would rather have such problems reported and fixed.  We have discussed a more sophisticated system of per-class cost adjustment instead, but a specification remains to be developed. See [[OptimizerHintsDiscussion|Optimizer Hints Discussion]] for further information.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Embedded server (not wanted)&lt;br /&gt;
|While PostgreSQL clients runs fine in limited-resource environments, the server requires multiple processes and a stable pool of resources to run reliably and efficiently. Stripping down the PostgreSQL server to run in the same process address space as the client application would add too much complexity and failure cases. Besides, there are several very mature embedded SQL databases already available.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Obfuscated function source code (not wanted)&lt;br /&gt;
|Obfuscating function source code has minimal protective benefits because anyone with super-user access can find a way to view the code. At the same time, it would greatly complicate backups and other administrative tasks. To prevent non-super-users from viewing function source code, remove SELECT permission on pg_proc.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-09/msg00668.php &amp;lt;nowiki&amp;gt;Obfuscated stored procedures (was Re: Oracle and Postgresql)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Indeterminate behavior for the GROUP BY clause (not wanted)&lt;br /&gt;
|At least one other database product allows specification of a subset of the result columns which GROUP BY would need to be able to provide predictable results; the server is free to return any value from the group.  This is not viewed as a desirable feature.  PostgreSQL 9.1 allows result columns that are not referenced by GROUP BY if a primary key for the same table is referenced in GROUP BY.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-03/msg00297.php &amp;lt;nowiki&amp;gt;Re: SQL compatibility reminder: MySQL vs PostgreSQL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Todo]]&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/91releasedraft</id>
		<title>91releasedraft</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/91releasedraft"/>
				<updated>2011-08-26T09:13:06Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;/* Details of New Features */ fix description of collation feature&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Email Release Text ==&lt;br /&gt;
&lt;br /&gt;
The PostgreSQL Global Development Group announces the release of PostgreSQL 9.1.  This latest version of the leading open source database offers innovative technology, unmatched extensibility, and new features such as synchronous replication, K-Nearest Neighbor indexing, and foreign data wrappers.  &lt;br /&gt;
&lt;br /&gt;
“PostgreSQL 9.1 provides some of the most advanced enterprise capabilities of any open source database, and is backed by a vibrant and innovative community with proven customer success.  PostgreSQL is well positioned for building and running applications in the cloud,” said Charles Fan, Sr. VP R&amp;amp;D, VMware.&lt;br /&gt;
&lt;br /&gt;
Responding to Users&lt;br /&gt;
&lt;br /&gt;
Version 9.1 delivers several features which users have been requesting for years, removing roadblocks to deploying new or ported applications on PostgreSQL.  These include:&lt;br /&gt;
&lt;br /&gt;
* Synchronous Replication: enable high-availability with consistency across multiple servers&lt;br /&gt;
* Per-Column Collations: support linguistically-correct sorting per database, table or column.&lt;br /&gt;
* Unlogged Tables: greatly improves performance for ephemeral data&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Heroku runs the largest PostgreSQL database-as-a-service in the world,&amp;quot; said James Lindenbaum, Heroku co-founder. &amp;quot;The release of synchronous data replication with 9.1 provides our customers with innovative new ways of protecting mission-critical data, and validates PostgreSQL as one of the fastest-moving datastores available.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Advancing the State of the Art&lt;br /&gt;
&lt;br /&gt;
Our community of contributors is innovating with cutting-edge features, including ones new to the entire database industry.  Some of the new features that are only available on PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
* K-Nearest-Neighbor Indexing: index on &amp;quot;distance&amp;quot; for faster location and text-search queries&lt;br /&gt;
* Serializable Snapshot Isolation: keeps concurrent transactions consistent without blocking, using &amp;quot;true serializability&amp;quot;&lt;br /&gt;
* Writeable Common Table Expressions: execute complex multi-stage data updates in a single query&lt;br /&gt;
* Security-Enhanced Postgres: deploy military-grade security and Mandatory Access Control&lt;br /&gt;
&lt;br /&gt;
&amp;quot;OpenERP has always relied on the enterprise-class features of PostgreSQL to provide a fast, reliable and scalable foundation for the Business Applications supporting our customers' operations every day. Data integrity in highly concurrent and transactional contexts is a critical topic for us, and we're very enthusiastic about the new Serializable Snapshot Isolation of PostgreSQL 9.1!&amp;quot;  said Olivier Dony, OpenERP Community Manager.&lt;br /&gt;
&lt;br /&gt;
Extending the Database Engine&lt;br /&gt;
&lt;br /&gt;
PostgreSQL's extensibility enables users to add new functionality to a running production database, and use them for tasks no other database system can perform.  Version 9.1 adds critical new extensibility features, including:&lt;br /&gt;
&lt;br /&gt;
* Foreign Table Wrappers: attach and query other databases from PostgreSQL&lt;br /&gt;
* Extensions: easily create, load, and manage new database features&lt;br /&gt;
&lt;br /&gt;
All of the above features, and more, are detailed on the What's New In 9.1 wiki page, as well as our release notes.  &lt;br /&gt;
&lt;br /&gt;
In PostgreSQL's 25th year of database development, our community continues to introduce new innovations with every annual release.  Download version 9.1 now and experience the most advanced open source database system in the world.&lt;br /&gt;
&lt;br /&gt;
== Extended Release ==&lt;br /&gt;
&lt;br /&gt;
=== Details of New Features ===&lt;br /&gt;
&lt;br /&gt;
'''Responding to Users'''&lt;br /&gt;
&lt;br /&gt;
Version 9.1 delivers several features which users have been requesting for years, removing roadblocks to deploying new or ported applications on PostgreSQL.  These include:&lt;br /&gt;
&lt;br /&gt;
* '''Synchronous Replication for Clustering:''' Enable high-availability with consistency across multiple nodes, by deploying PostgreSQL clusters using synchronous replication. Synchronous replication supports &amp;quot;2-safe replication&amp;quot; which ensures transactions have been confirmed by a standby server in addition to the master. Synchronous replication improves reliability over other techniques, and data loss will be limited to events where both the primary and standby servers crash at the same time.&lt;br /&gt;
&lt;br /&gt;
* '''Per-column Collations for Multi-lingual Databases:''' Users can now set the collation for strings on a single column.  This permits true multilingual databases, where each text column is a different language, and indexes and sorts correctly for that language.&lt;br /&gt;
&lt;br /&gt;
* '''Unlogged Tables to Improve Performance:''' When performance is more important than durability, unlogged tables provide a way to improve performance while keeping the data managed within PostgreSQL. Removing logging reduces I/O overhead, yielding performance improvements up to 10 times faster when compared to logged tables. Scenarios expected to leverage unlogged tables include web session data, real time logging, ETL and temporary/intermediate tables for functions.&lt;br /&gt;
&lt;br /&gt;
'''Advancing the State of the Art'''&lt;br /&gt;
&lt;br /&gt;
Our community is innovating, delivering cutting-edge features which are new to the database industry.  Some of these features are only available on PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
* '''Powerful Similarity Searches with K-Nearest-Neighbor (KNN) Indexing:''' Create new applications using PostgreSQL KNN-GiST indexes, which provide innovative indexing to avoid expensive table scans. KNN enhances PostgreSQL's query capabilities by using mathematical &amp;quot;distance&amp;quot; for indexing and searches. These indexes can be used to enhance common text searches, text-similarity searches, geospatial location comparisons and other queries. Example searches that took 2 seconds without the index returned in 20 ms with this feature. Text search indexes can be also now be configured to provide indexing support for LIKE '%string%' queries without changing any SQL.  PostgreSQL is among the first database systems to have KNN.&lt;br /&gt;
&lt;br /&gt;
* '''Serializable Snapshot Isolation:''' allows users to enforce arbitrarily complex user-defined business rules within the database without blocking, by automatically detecting live race conditions in your SQL transactions at runtime.  This feature currently exists only in PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
* '''Writeable Common Table Expressions (wCTE):''' Supports the relational integrity of your data by allowing you to update multiple, cascading, related records in a single statement.  By using the results of one query to execute another query, you can update recursively, hierarchically, across foreign keys, or even more creatively.  PostgreSQL provides the most complete and flexible implementation of this SQL feature available.&lt;br /&gt;
&lt;br /&gt;
* '''Security-Enhanced Postgres (SE-Postgres):''' Deploy military-grade security and mandatory access control with full-integration support for Security-Enhanced Linux (SE-Linux). SE-Linux is a NSA project that modifies the Linux kernel with security-related functions.  It has been endorsed by and included with major Linux distributions including, but not limited to, Red Hat, CentOS, Debian and Ubuntu.  PostgreSQL is the only database system which has tight integration with SE-Linux.&lt;br /&gt;
&lt;br /&gt;
'''Extending the Database Engine'''&lt;br /&gt;
&lt;br /&gt;
PostgreSQL's extensibility enables users to add new functionality to a running production database, and use them for tasks no other database system can perform. Version 9.1 adds critical new extensibility features, including: &lt;br /&gt;
&lt;br /&gt;
* Foreign Data Wrappers (FDW): as part of our standards-compliant SQL/MED support for querying data outside the PostgreSQL database, FDWs allow users to create &amp;quot;drivers&amp;quot; and attach external data sources, which can be used as read-only tables.  FDWs make PostgreSQL a powerful tool for enterprise data integration, and they make migration easier.  FDWs initially available from the community include comma-separated-value (CSV) files, Oracle, MySQL, CouchDB, and Twitter sources.  And many more are expected in the near future. &lt;br /&gt;
&lt;br /&gt;
* Extensions: while PostgreSQL has always been extensible, now users can easily create, load, upgrade, and manage any of dozens of database extensions using the EXTENSION database object.  The new site PGXN.org offers a repository for contributing and downloading extensions.&lt;br /&gt;
&lt;br /&gt;
=== 25th Anniversary ===&lt;br /&gt;
&lt;br /&gt;
The POSTGRES project was inaugurated at the University of California, Berkeley, in June 1986 with the publication of the original POSTGRES desing by Lawrence A. Rowe and Michael R. Stonebraker.  In the 25 years since then, POSTGRES became an open source project, converted to using SQL, changed its name to PostgreSQL, and became one of the leading relational databases in the world.  &lt;br /&gt;
&lt;br /&gt;
There have been 23 releases of POSTGRES and PostgreSQL, including version 9.1.  PostgreSQL is the only major SQL database system to have consistent, featureful releases every year.&lt;br /&gt;
&lt;br /&gt;
=== Full Text of Quotes ===&lt;br /&gt;
&lt;br /&gt;
“PostgreSQL 9.1 provides some of the most advanced enterprise capabilities of any open source database, and is backed by a vibrant and innovative community with proven customer success.  PostgreSQL is well positioned for building and running applications in the cloud,” said Charles Fan, Sr. VP R&amp;amp;D, VMware.&lt;br /&gt;
&lt;br /&gt;
About VMWare: VMware (NYSE:VMW), the global leader in virtualization and cloud infrastructure, delivers customer-proven solutions that accelerate IT by reducing complexity and enabling more flexible, agile service delivery. VMware enables enterprises to adopt a cloud model that addresses their unique business challenges. VMware’s approach accelerates the transition to cloud computing while preserving existing investments and improving security and control. With more than 250,000 customers and 25,000 partners, VMware solutions help organizations of all sizes lower costs, increase business agility and ensure freedom of choice.  Contact: prinquiries@vmware.com or phone +1 (650) 427-2485&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Heroku runs the largest PostgreSQL database-as-a-service in the world,&amp;quot; said James Lindenbaum, Heroku co-founder. &amp;quot;The release of synchronous data replication with 9.1 provides our customers with innovative new ways of protecting mission-critical data, and validates PostgreSQL as one of the fastest-moving datastores available.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
About Heroku: Heroku provides a platform as a service (PAAS) for building, deploying, and running cloud apps using Ruby. The architecture of our platform includes tools for deployment and management, a runtime for scalability, fault tolerance, and an add-ons system for extending the capabilities of our platform. Contact: Jill Ratkevic (jill@blackswansmedia.com)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;OpenERP has always relied on the enterprise-class features of PostgreSQL to provide a fast, reliable and scalable foundation for the Business Applications supporting our customers' operations every day. Data integrity in highly concurrent and transactional contexts is a critical topic for us, and we're very enthusiastic about the new Serializable Snapshot Isolation of PosgtreSQL 9.1! Synchronous replication and more performance optimizations are two other reasons we are looking forward to the next release of PostgreSQL, truly the epitome of Open Source software,&amp;quot; said Olivier Dony, OpenERP Community Manager.&lt;br /&gt;
&lt;br /&gt;
About OpenERP: OpenERP is an open source comprehensive suite of business applications including Sales, CRM, Project management, Warehouse management, Manufacturing, Accounting and Human Resources. OpenERP has separate client and server components. XML-RPC interfaces are available.  OpenERP was founded by CEO Fabien Pinckaers in 2005. Fabien's vision was that Open Source provided a better way to meet customers' expectations.  Contact: info@openerp.com&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/Todo</id>
		<title>Todo</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/Todo"/>
				<updated>2011-08-21T07:58:58Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;/* PL/Python */ Remove obsolete items&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;margin: 1ex 1em; float: right;&amp;quot;&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This list contains '''all known PostgreSQL bugs and feature requests'''. If you would like to work on an item, please read the [[Developer FAQ]] first. There is also a [[Development_information|development information page]].&lt;br /&gt;
&lt;br /&gt;
* {{TodoPending}} - marks ordinary, incomplete items&lt;br /&gt;
* {{TodoEasy}} - marks items that are easier to implement&lt;br /&gt;
* {{TodoDone}} - marks changes that are done, and will appear in the PostgreSQL 9.2 release.&lt;br /&gt;
&lt;br /&gt;
For help on editing this list, please see [[Talk:Todo]]. &amp;lt;b&amp;gt;Please do not add items here without discussion on the mailing list.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 1ex 4em;&amp;quot;&amp;gt;&lt;br /&gt;
== Administration ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow administrators to cancel multi-statement idle transactions&lt;br /&gt;
|This allows locks to be released, but it is complex to report the cancellation back to the client.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01340.php &amp;lt;nowiki&amp;gt;Cancelling idle in transaction state&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00441.php &amp;lt;nowiki&amp;gt;Re: Cancelling idle in transaction state&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Check for unreferenced table files created by transactions that were in-progress when the server terminated abruptly&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00096.php &amp;lt;nowiki&amp;gt;Removing unreferenced files&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Set proper permissions on non-system schemas during db creation&lt;br /&gt;
|Currently all schemas are owned by the super-user because they are copied from the template1 database.  However, since all objects are inherited from the template database, it is not clear that setting schemas to the db owner is correct.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow log_min_messages to be specified on a per-module basis&lt;br /&gt;
|This would allow administrators to see more detailed information from specific sections of the backend, e.g. checkpoints, autovacuum, etc. Another idea is to allow separate configuration files for each module, or allow arbitrary SET commands to be passed to them. See also [[Logging Brainstorm]].}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Simplify creation of partitioned tables&lt;br /&gt;
|This would allow creation of partitioned tables without requiring creation of triggers or rules for INSERT/UPDATE/DELETE, and constraints for rapid partition selection.  Options could include range and hash partition selection. See also [[Table partitioning]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow custom variables to appear in pg_settings()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00850.php &amp;lt;nowiki&amp;gt;Re: count(*) performance improvement ideas&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have custom variables be transaction-safe&lt;br /&gt;
* {{MessageLink|4B577E9F.8000505@dunslane.net|Custom GUCs still a bit broken}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement the SQL-standard mechanism whereby REVOKE ROLE revokes only the privilege granted by the invoking role, and not those granted by other roles&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-05/msg00010.php &amp;lt;nowiki&amp;gt;Re: Grantor name gets lost when grantor role dropped&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent query cancel packets from being replayed by an attacker, especially when using SSL&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg00345.php &amp;lt;nowiki&amp;gt;Replay attack of query cancel&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a way to query the log collector subprocess to determine the name of the currently active log file&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-11/msg00418.php &amp;lt;nowiki&amp;gt;Current log files when rotating?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow simpler reporting of the unix domain socket directory and allow easier configuration of its default location&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg01555.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow custom daemons to be automatically stopped/started along with the postmaster&lt;br /&gt;
|This allows easier administration of daemons like user job schedulers or replication-related daemons.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01701.php &amp;lt;nowiki&amp;gt;Re: scheduler in core&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve logging of prepared transactions recovered during startup&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg00092.php &amp;lt;nowiki&amp;gt;&amp;amp;quot;recovering prepared transaction&amp;amp;quot; after server restart message&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using POSIX shared memory to avoid System V shared memory kernel limits&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4DFA2673.3010009@enterprisedb.com &amp;lt;nowiki&amp;gt;POSIX shared memory patch status&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Configuration files ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Change pg_ident.conf parsing to be the same as pg_hba.conf&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg02204.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow postgresql.conf file values to be changed via an SQL API, perhaps using SET GLOBAL&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg00764.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider normalizing fractions in postgresql.conf, perhaps using '%'&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00550.php &amp;lt;nowiki&amp;gt;Fractions in GUC variables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow Kerberos to disable stripping of realms so we can check the username@realm against multiple realms&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00009.php &amp;lt;nowiki&amp;gt;krb_match_realm patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve LDAP authentication configuration options&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01745.php &amp;lt;nowiki&amp;gt;Proposed Patch - LDAPS support for servers on port 636 w/o TLS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add external tool to auto-tune some postgresql.conf parameters&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00000.php &amp;lt;nowiki&amp;gt;Re: Overhauling GUCS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00033.php &amp;lt;nowiki&amp;gt;Simple postgresql.conf wizard&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add 'hostgss' pg_hba.conf option to allow GSS link-level encryption&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg01454.php &amp;lt;nowiki&amp;gt;Re: Plans for 8.4&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Process pg_hba.conf keywords as case-insensitive&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00432.php &amp;lt;nowiki&amp;gt;More robust pg_hba.conf parsing/error logging&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create utility to compute accurate random_page_cost value&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-04/msg00162.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-04/msg00362.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow configuration files to be independently validated&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01831.php&lt;br /&gt;
* http://archives.postgresql.org/message-id/12666.1310774573@sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow postgresql.conf settings to be accepted by backends even if some settings are invalid for those backends&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00330.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00375.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow all backends to receive postgresql.conf setting changes at the same time&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00330.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00375.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Tablespaces ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow a database in tablespace t1 with tables created in tablespace t2 to be used as a template for a new database created with default tablespace t2&lt;br /&gt;
|Currently all objects in the default database tablespace must have default tablespace specifications. This is because new databases are created by copying directories. If you mix default tablespace tables and tablespace-specified tables in the same directory, creating a new database from such a mixed directory would create a new database with tables that had incorrect explicit tablespaces.  To fix this would require modifying pg_class in the newly copied database, which we don't currently do.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow reporting of which objects are in which tablespaces&lt;br /&gt;
|This item is difficult because a tablespace can contain objects from multiple databases. There is a server-side function that returns the databases which use a specific tablespace, so this requires a tool that will call that function and connect to each database to find the objects in each database for that tablespace.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow WAL replay of CREATE TABLESPACE to work when the directory structure on the recovery computer is different from the original}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow per-tablespace quotas}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow tablespaces on RAM-based partitions for unlogged tables&lt;br /&gt;
* http://archives.postgresql.org/pgsql-advocacy/2011-05/msg00033.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow toast tables to be moved to a different tablespace&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00980.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Collector ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow statistics last vacuum/analyze execution times to be displayed without requiring track_counts to be enabled&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2007-04/msg00028.php &amp;lt;nowiki&amp;gt;row-level stats and last analyze time&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Clear table counters on TRUNCATE&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg00169.php &amp;lt;nowiki&amp;gt;Small TRUNCATE glitch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== SSL ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SSL authentication/encryption over unix domain sockets&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00924.php &amp;lt;nowiki&amp;gt;Re: Spoofing as the postmaster&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SSL key file permission checks to be optionally disabled when sharing SSL keys with other applications&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00069.php &amp;lt;nowiki&amp;gt;BUG #3809: SSL &amp;amp;quot;unsafe&amp;amp;quot; private key permissions bug&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SSL CRL files to be re-read during configuration file reload, rather than requiring a server restart&lt;br /&gt;
|Unlike SSL CRT files, CRL (Certificate Revocation List) files are updated frequently&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-12/msg00832.php &amp;lt;nowiki&amp;gt;Automatic CRL reload&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
Alternatively or additionally supporting OCSP (online certificate security protocol) would provide real-time revocation discovery without reloading&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Allow automatic selection of SSL client certificates from a certificate store&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00406.php &amp;lt;nowiki&amp;gt;Allow multiple certificates or keys in the postgresql.crt/.key files&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Send the full certificate server chain to the client&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-12/msg00145.php BUG #5245: Full Server Certificate Chain Not Sent to client]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Point-In-Time Recovery (PITR) ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Create dump tool for write-ahead logs for use in determining transaction id for point-in-time recovery&lt;br /&gt;
|This is useful for checking PITR recovery.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow archive_mode to be changed without server restart?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01655.php &amp;lt;nowiki&amp;gt;Enabling archive_mode without restart&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider avoiding WAL switching via archive_timeout if there has been no database activity&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg01469.php &amp;lt;nowiki&amp;gt;archive_timeout behavior for no activity&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg00395.php &amp;lt;nowiki&amp;gt;Re: archive_timeout behavior for no activity&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Standby server mode ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Allow pg_xlogfile_name() to be used in recovery mode&lt;br /&gt;
* [http://archives.postgresql.org/message-id/3f0b79eb1001190135vd9f62f1sa7868abc1ea61d12@mail.gmail.com &amp;lt;nowiki&amp;gt;Streaming replication and pg_xlogfile_name()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Prevent variables inherited from the server environment from begin used for making streaming replication connections.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01011.php &amp;lt;nowiki&amp;gt;Re: Parameter name standby_mode&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
| Allow hot file system backups on standby servers&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01727.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01490.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Change walsender so that it applies per-role settings&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg00642.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Add more control over waiting for synchronous commit&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01611.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Restructure configuration parameters for standby mode&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg01820.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Allow time-delayed application of logs on the standby&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00992.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Data Types ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix data types where equality comparison is not intuitive, e.g. box}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for public SYNONYMs&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00519.php &amp;lt;nowiki&amp;gt;Proposal for SYNONYMS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg02043.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-general/2010-12/msg00139.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for SQL-standard GENERATED/IDENTITY columns&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-07/msg00543.php &amp;lt;nowiki&amp;gt;Re: Three weeks left until feature freeze&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-08/msg00038.php &amp;lt;nowiki&amp;gt;GENERATED ... AS IDENTITY, Was: Re: Feature Freeze&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00344.php &amp;lt;nowiki&amp;gt;Behavior of GENERATED columns per SQL2003&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00076.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Behavior of GENERATED columns per SQL2003&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00604.php &amp;lt;nowiki&amp;gt;IDENTITY/GENERATED patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider placing all sequences in a single table, or create a system view&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php &amp;lt;nowiki&amp;gt;Re: newbie: renaming sequences task&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a special data type for regular expressions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg01067.php &amp;lt;nowiki&amp;gt;Why is there a tsquery data type?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce BIT data type overhead using short varlena headers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-12/msg00273.php &amp;lt;nowiki&amp;gt;storage size of &amp;amp;quot;bit&amp;amp;quot; data type..&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow renaming and deleting enumerated values from an existing enumerated data type&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support scoped IPv6 addresses in the inet type&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-05/msg00111.php &amp;lt;nowiki&amp;gt;strange problem with ip6&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a JSON (JavaScript Object Notation) data type&lt;br /&gt;
|This would behave similar to the XML data type, which is stored as text, but allows element lookup and conversion functions.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01494.php &amp;lt;nowiki&amp;gt;PATCH: Add hstore_to_json()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg00001.php &amp;lt;nowiki&amp;gt;Re: PATCH: Add hstore_to_json()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-03/msg01092.php &amp;lt;nowiki&amp;gt;Proposal: Add JSON support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00057.php &amp;lt;nowiki&amp;gt;Re: Proposal: Add JSON support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00481.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01694.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Considering improving performance of computing CHAR() value lengths&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00900.php &amp;lt;nowiki&amp;gt;char() overhead on read-only workloads not so insignifcant as the docs claim it is...&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01787.php &amp;lt;nowiki&amp;gt;Re: [PATCH] backend: compare word-at-a-time in bcTruelen&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add overlaps geometric operators that ignore point overlaps&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-03/msg00861.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Domains ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow functions defined as casts to domains to be called during casting&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-05/msg00072.php &amp;lt;nowiki&amp;gt;bug? non working casts for domain&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-09/msg01681.php &amp;lt;nowiki&amp;gt;TODO: Fix CREATE CAST on DOMAINs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow values to be cast to domain types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2003-06/msg01206.php &amp;lt;nowiki&amp;gt;Domain casting still doesn't work right&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00289.php &amp;lt;nowiki&amp;gt;domain casting?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00812.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make domains work better with polymorphic functions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4887.1228700773@sss.pgh.pa.us Polymorphic types vs. domains]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/15535.1238774571@sss.pgh.pa.us some difficulties with fixing it]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Dates and Times ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow infinite intervals just like infinite timestamps}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow TIMESTAMP WITH TIME ZONE to store the original timezone information, either zone name or offset from UTC&lt;br /&gt;
|If the TIMESTAMP value is stored with a time zone name, interval computations should adjust based on the time zone rules. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-10/msg00705.php &amp;lt;nowiki&amp;gt;timestamp with time zone a la sql99&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have timestamp subtraction not call justify_hours()?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-sql/2006-10/msg00059.php &amp;lt;nowiki&amp;gt;timestamp subtraction (was Re: formatting intervals with to_char)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve TIMESTAMP WITH TIME ZONE subtraction to be DST-aware&lt;br /&gt;
|Currently subtracting one date from another that crosses a daylight savings time adjustment can return '1 day 1 hour', but adding that back to the first date returns a time one hour in the future.  This is caused by the adjustment of '25 hours' to '1 day 1 hour', and '1 day' is the same time the next day, even if daylight savings adjustments are involved.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix interval display to support values exceeding 2^31 hours}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add overflow checking to timestamp and interval arithmetic}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add function to allow the creation of timestamps using parameters&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-06/msg00232.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Arrays ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for arrays of domains&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00114.php &amp;lt;nowiki&amp;gt;Re: updated WIP: arrays of composites&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow single-byte header storage for array elements}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add function to detect if an array is empty&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00475.php &amp;lt;nowiki&amp;gt;Re: array_length()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of empty arrays&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01033.php &amp;lt;nowiki&amp;gt;So what's an &amp;amp;quot;empty&amp;amp;quot; array anyway?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of NULLs in arrays&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-11/msg00009.php &amp;lt;nowiki&amp;gt;BUG #4509: array_cat's null behaviour is inconsistent&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg01040.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Binary Data ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve vacuum of large objects, like contrib/vacuumlo?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Auto-delete large objects when referencing row is deleted&lt;br /&gt;
|contrib/lo offers this functionality.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow read/write into TOAST values like large objects&lt;br /&gt;
|Writing might require the TOAST column to be stored EXTERNAL.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00049.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add API for 64-bit large object access&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-09/msg00781.php &amp;lt;nowiki&amp;gt;64-bit API for large objects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg01790.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== MONEY Data Type ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add locale-aware MONEY type, and support multiple currencies&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2005-08/msg01432.php &amp;lt;nowiki&amp;gt;A real currency type&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01181.php &amp;lt;nowiki&amp;gt;Money type todos?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|MONEY dumps in a locale-specific format making it difficult to restore to a system with a different locale}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Text Search ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow dictionaries to change the token that is passed on to later dictionaries&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-11/msg00081.php &amp;lt;nowiki&amp;gt;a tsearch2 (8.2.4) dictionary that only filters out stopwords&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a function-based API for '@@' searches&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00511.php &amp;lt;nowiki&amp;gt;Simplifying Text Search&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve text search error messages&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00966.php &amp;lt;nowiki&amp;gt;Poorly designed tsearch NOTICEs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg01146.php &amp;lt;nowiki&amp;gt;Re: Poorly designed tsearch NOTICEs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider changing error to warning for strings larger than one megabyte&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-02/msg00190.php &amp;lt;nowiki&amp;gt;BUG #3975: tsearch2 index should not bomb out of 1Mb limit&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-03/msg00062.php &amp;lt;nowiki&amp;gt;Re: [BUGS] BUG #3975: tsearch2 index should not bomb out of 1Mb limit&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|tsearch and tsdicts regression tests fail in Turkish locale on glibc&lt;br /&gt;
* [http://archives.postgresql.org/message-id/49749645.5070801@gmx.net tsearch with Turkish locale]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|tsquery negator operator treated as part of lexeme&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-06/msg00346.php BUG #4887: inclusion operator (@&amp;gt;) on tsqeries behaves not conforming to documentation]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of plus signs in email address user names, and perhaps improve URL parsing&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg00772.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve default parser, to more easily allow adding new tokens&lt;br /&gt;
* http://archives.postgresql.org/message-id/23485.1297727826@sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add additional support functions&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00319.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== XML ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow XML arrays to be cast to other data types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00981.php &amp;lt;nowiki&amp;gt;proposal casting from XML[] to int[], numeric[], text[]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00231.php &amp;lt;nowiki&amp;gt;Re: proposal casting from XML[] to int[], numeric[], text[]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00471.php &amp;lt;nowiki&amp;gt;Re: proposal casting from XML[] to int[], numeric[], text[]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add XML Schema validation and xmlvalidate functions (SQL:2008)}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add xmlvalidatedtd variant to support validating against a DTD?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Relax-NG validation; libxml2 supports this already}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow reliable XML operation non-UTF8 server encodings (xpath(), in particular, is known to not work)&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-01/msg00135.php &amp;lt;nowiki&amp;gt;BUG #4622: xpath only work in utf-8 server encoding&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
* http://archives.postgresql.org/message-id/4110.1238973350@sss.pgh.pa.us}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add functions from SQL:2006: XMLDOCUMENT, XMLCAST, XMLTEXT}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add XMLNAMESPACES support in XMLELEMENT and elsewhere}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move XSLT from contrib/xml2 to a more reasonable location&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg00539.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Report errors returned by the XSLT library&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg00562.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve the XSLT parameter passing API&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg00416.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|XML Canonical: Convert XML documents to canonical form to compare them. libxml2 has support for this.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add pretty-printed XML output option&lt;br /&gt;
|Parse a document and serialize it back in some indented form. libxml2 might support this.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add XMLQUERY (from the SQL/XML standard)}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow XML sthredding&lt;br /&gt;
|In some cases shredding could be better option (if there is no need to keep XML docs entirely, e.g. if we have already developed tools that understand only relational data.  This would be a separate module that implements annotated schema decomposition technique, similar to DB2 and SQL Server functionality.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix Nested or repeated xpath() that apparently mess up namespaces [http://archives.postgresql.org/pgsql-bugs/2008-03/msg00097.php] [http://archives.postgresql.org/pgsql-bugs/2008-03/msg00144.php] [http://archives.postgresql.org/pgsql-general/2008-03/msg00295.php] [http://archives.postgresql.org/pgsql-bugs/2008-07/msg00054.php] [http://archives.postgresql.org/message-id/004f01c90e91$138e9d10$3aabd730$@anstett@iaas.uni-stuttgart.de]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|XPath: Adding the &amp;lt;x&amp;gt; at the root causes problems [http://archives.postgresql.org/pgsql-bugs/2008-05/msg00184.php] [http://archives.postgresql.org/pgsql-bugs/2008-07/msg00054.php] [http://archives.postgresql.org/pgsql-general/2008-07/msg00613.php]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|xpath_table needs to be implemented/implementable to get rid of contrib/xml2 [http://archives.postgresql.org/pgsql-general/2008-05/msg00823.php]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|xpath_table is pretty broken anyway [http://archives.postgresql.org/pgsql-hackers/2010-02/msg02424.php]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|better handling of XPath data types [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00616.php] [http://archives.postgresql.org/message-id/004a01c90e90$4b986d90$e2c948b0$@anstett@iaas.uni-stuttgart.de]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of PIs and DTDs in xmlconcat() [http://archives.postgresql.org/message-id/200904211211.n3LCB09p008988@wwwmaster.postgresql.org]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Restructure XML and /contrib/xml2 functionality&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02314.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00017.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow INET subnet comparisons using non-constants to be indexed}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add an INET overlaps operator, for use by exclusion constraints &lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-03/msg00845.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Enforce typmod for function inputs, function results and parameters for spi_prepare'd statements called from PLs&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg01403.php &amp;lt;nowiki&amp;gt;Re: BUG #2917: spi_prepare doesn't accept typename aliases&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg01160.php &amp;lt;nowiki&amp;gt;RFC for adding typmods to functions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix IS OF so it matches the ISO specification, and add documentation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2003-08/msg00060.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] IS OF&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00060.php &amp;lt;nowiki&amp;gt;ToDo: add documentation for operator IS OF&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement Boyer-Moore searching in LIKE queries&lt;br /&gt;
* {{messageLink|27645.1220635769@sss.pgh.pa.us|TODO item: Implement Boyer-Moore searching (First time hacker)}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent malicious functions from being executed with the permissions of unsuspecting users&lt;br /&gt;
|Index functions are safe, so VACUUM and ANALYZE are safe too.  Triggers, CHECK and DEFAULT expressions, and rules are still vulnerable. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00268.php &amp;lt;nowiki&amp;gt;Some notes about the index-functions security vulnerability&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce memory usage of aggregates in set returning functions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2008-01/msg00031.php &amp;lt;nowiki&amp;gt;Re: Performance of aggregates over set-returning functions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix /contrib/ltree operator&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-11/msg00044.php &amp;lt;nowiki&amp;gt;BUG #3720: wrong results at using ltree&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix /contrib/btree_gist's implementation of inet indexing&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2010-10/msg00099.php &amp;lt;nowiki&amp;gt;BUG #5705: btree_gist: Index on inet changes query result&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Fix inconsistent precedence of =, &amp;amp;gt;, and &amp;amp;lt; compared to &amp;amp;lt;&amp;amp;gt;, &amp;amp;gt;=, and &amp;amp;lt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00145.php &amp;lt;nowiki&amp;gt;BUG #3822: Nonstandard precedence for comparison operators&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix regular expression bug when using complex back-references&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00000.php &amp;lt;nowiki&amp;gt;BUG #3645: regular expression back references seem broken&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have /contrib/dblink reuse unnamed connections&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00895.php &amp;lt;nowiki&amp;gt;dblink un-named connection doesn't get re-used&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve formatting of pg_get_viewdef() output&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg01648.php &amp;lt;nowiki&amp;gt;pg_get_viewdef formattiing&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01885.php &amp;lt;nowiki&amp;gt;Re: pretty print viewdefs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add function to dump pg_depend information cleanly&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00226.php &amp;lt;nowiki&amp;gt;Elementary dependency look-up&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve relation size functions such as pg_relation_size() to avoid producing an error when called against a no longer visible relation&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28488.1286461610@sss.pgh.pa.us pg_relation_size / could not open relation with OID #]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Character Formatting ===&lt;br /&gt;
&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow to_date() and to_timestamp() to accept localized month names}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add missing parameter handling in to_char()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-12/msg00948.php &amp;lt;nowiki&amp;gt;Re: to_char and i18n&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Throw an error from to_char() instead of printing a string of &amp;quot;#&amp;quot; when a number doesn't fit in the desired output format.&lt;br /&gt;
* discussed in [http://archives.postgresql.org/message-id/37ed240d0907290836w42187222n18664dfcbcb445b1@mail.gmail.com &amp;quot;to_char, support for EEEE format&amp;quot;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow to_char() on interval values to accumulate the highest unit requested&lt;br /&gt;
|2= Some special format flag would be required to request such accumulation.  Such functionality could also be added to EXTRACT. Prevent accumulation that crosses the month/day boundary because of the uneven number of days in a month.&lt;br /&gt;
* to_char(INTERVAL '1 hour 5 minutes', 'MI') =&amp;amp;gt; 65&lt;br /&gt;
* to_char(INTERVAL '43 hours 20 minutes', 'MI' ) =&amp;amp;gt; 2600&lt;br /&gt;
* to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') =&amp;amp;gt; 0:1:19:20&lt;br /&gt;
* to_char(INTERVAL '3 years 5 months','MM') =&amp;amp;gt; 41&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix to_number() handling for values not matching the format string&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg01447.php &amp;lt;nowiki&amp;gt;Re: numeric_to_number() function skipping some digits&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Multi-Language Support ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add NCHAR (as distinguished from ordinary varchar),}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a cares-about-collation column to pg_proc, so that unresolved-collation errors can be thrown at parse time&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-03/msg01520.php &amp;lt;nowiki&amp;gt;Open issues for collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Integrate collations with text search configurations&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28887.1303579034@sss.pgh.pa.us &amp;lt;nowiki&amp;gt;Some TODO items for collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Integrate collations with to_char() and related functions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/28887.1303579034@sss.pgh.pa.us &amp;lt;nowiki&amp;gt;Some TODO items for collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support collation-sensitive equality and hashing functions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-06/msg00472.php &amp;lt;nowiki&amp;gt; contrib/citext versus collations&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a LOCALE option to CREATE DATABASE, as a shorthand&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00119.php &amp;lt;nowiki&amp;gt; Re: 8.4 open items list&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support multiple simultaneous character sets, per SQL:2008}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve UTF8 combined character handling?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add octet_length_server() and octet_length_client()}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make octet_length_client() the same as octet_length()?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problems with wrong runtime encoding conversion for NLS message files}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add URL to more complete multi-byte regression tests&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-07/msg00272.php &amp;lt;nowiki&amp;gt;Multi-byte and client side character encoding tests for copy command..&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix contrib/fuzzystrmatch to work with multibyte encodings&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-04/msg00047.php &amp;lt;nowiki&amp;gt; soundex function returns UTF-16 characters&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00138.php &amp;lt;nowiki&amp;gt; dmetaphone woes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change memory allocation for multi-byte functions so memory is allocated inside conversion functions&lt;br /&gt;
|Currently we preallocate memory based on worst-case usage.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ability to use case-insensitive regular expressions on multi-byte characters&lt;br /&gt;
|Currently it works for UTF-8, but not other multi-byte encodings&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00433.php &amp;lt;nowiki&amp;gt;Regexps vs. locale&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* {{MessageLink|20091201210024.B1393753FB7@cvs.postgresql.org|A partial solution for UTF-8}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve encoding of connection startup messages sent to the client&lt;br /&gt;
|Currently some authentication error messages are sent in the server encoding&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-12/msg00801.php &amp;lt;nowiki&amp;gt;encoding of PostgreSQL messages&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2009-01/msg00005.php &amp;lt;nowiki&amp;gt;Re: encoding of PostgreSQL messages&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|More sensible support for Unicode combining characters, normal forms&lt;br /&gt;
* http://archives.postgresql.org/message-id/200904141532.44618.peter_e@gmx.net&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Views / Rules ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Automatically create rules on views so they are updateable, per SQL:2008&lt;br /&gt;
|We can only auto-create rules for simple views.  For more complex cases users will still have to write rules manually.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00586.php &amp;lt;nowiki&amp;gt;Proposal for updatable views&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-08/msg00255.php &amp;lt;nowiki&amp;gt;Updatable views&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg01746.php &amp;lt;nowiki&amp;gt;Re: [COMMITTERS] pgsql: Automatic view update rules Bernd Helmle&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Updatable_views&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add the functionality of the WITH CHECK OPTION clause to CREATE VIEW}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow VIEW/RULE recompilation when the underlying tables change&lt;br /&gt;
|This is both difficult and controversial.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01723.php Re: About &amp;quot;Allow VIEW/RULE recompilation when the underlying tables change&amp;quot;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg01724.php Re: About &amp;quot;Allow VIEW/RULE recompilation when the underlying tables change&amp;quot;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make it possible to use RETURNING together with conditional DO INSTEAD rules, such as for partitioning setups&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00577.php &amp;lt;nowiki&amp;gt;RETURNING and DO INSTEAD ... Intentional or not?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add the ability to automatically create materialized views&lt;br /&gt;
|Right now materialized views require the user to create triggers on the main table to keep the summary table current.  SQL syntax should be able to manage the triggers and summary table automatically.  A more sophisticated implementation would automatically retrieve from the summary table when the main table is referenced, if possible.  See [[Materialized Views]] for implementation details&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00479.php &amp;lt;nowiki&amp;gt;GSoC - proposal - Materialized Views in PostgreSQL&amp;lt;/nowiki&amp;gt;] &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve ability to modify views via ALTER TABLE&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00691.php &amp;lt;nowiki&amp;gt;Re: idea: storing view source in system catalogs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg01410.php &amp;lt;nowiki&amp;gt;modifying views&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg00300.php &amp;lt;nowiki&amp;gt;Re: patch: Add columns via CREATE OR REPLACE VIEW&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent low-cost functions from seeing unauthorized view rows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg01346.php &amp;lt;nowiki&amp;gt;Using views for row-level access control is leaky&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== SQL Commands ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve type determination of unknown (NULL or quoted literal) result columns for UNION/INTERSECT/EXCEPT&lt;br /&gt;
* [http://archives.postgresql.org/message-id/9799.1302719551@sss.pgh.pa.us &amp;lt;nowiki&amp;gt;UNION construct type cast gives poor error message&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00838.php &amp;lt;nowiki&amp;gt;WIP: grouping sets support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00466.php &amp;lt;nowiki&amp;gt;Implementation of GROUPING SETS (T431: Extended grouping 	capabilities)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow prepared transactions with temporary tables created and dropped in the same transaction, and when an ON COMMIT DELETE ROWS temporary table is accessed&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00047.php &amp;lt;nowiki&amp;gt;Re: &amp;amp;quot;could not open relation 1663/16384/16584: No such file or directory&amp;amp;quot; in a specific combination of transactions with temp tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/492543D5.9050904@enterprisedb.com A suggestion on how to implement this]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a GUC variable to warn about non-standard SQL usage in queries}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add SQL-standard MERGE/REPLACE/UPSERT command&lt;br /&gt;
|MERGE is typically used to merge two tables.  REPLACE or UPSERT command does UPDATE, or on failure, INSERT. See [[SQL MERGE]] for notes on the implementation details.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add NOVICE output level for helpful messages&lt;br /&gt;
|For example, have it warn about unjoined tables.  This could also control automatic sequence/index creation messages.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow NOTIFY in rules involving conditionals}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow EXPLAIN to identify tables that were skipped because of constraint_exclusion&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Simplify dropping roles that have objects in several databases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow the count returned by SELECT, etc to be represented as an int64 to allow a higher range of values}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for WITH RECURSIVE ... CYCLE&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00291.php &amp;lt;nowiki&amp;gt;WITH RECURSIVE ... CYCLE in vanilla SQL: issues with arrays of rows&amp;lt;/nowiki&amp;gt;]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add DEFAULT .. AS OWNER so permission checks are done as the table owner&lt;br /&gt;
|This would be useful for SERIAL nextval() calls and CHECK constraints.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow DISTINCT to work in multiple-argument aggregate calls}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add comments on system tables/columns using the information in catalogs.sgml&lt;br /&gt;
|Ideally the information would be pulled from the SGML file automatically.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent the specification of conflicting transaction read/write options&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00684.php &amp;lt;nowiki&amp;gt;Re: SET TRANSACTION and SQL Standard&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support LATERAL subqueries&lt;br /&gt;
|Lateral subqueries can reference columns of tables defined outside the subquery at the same level, i.e. ''laterally''.&lt;br /&gt;
For example, a LATERAL subquery in a FROM clause could reference tables defined in the same FROM clause.&lt;br /&gt;
Currently only the columns of tables defined ''above'' subqueries are recognized.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00292.php &amp;lt;nowiki&amp;gt;LATERAL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg00991.php &amp;lt;nowiki&amp;gt;Re: LATERAL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent temporary tables created with ON COMMIT DELETE ROWS from repeatedly truncating the table on every commit if the table is already empty&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg00842.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-03/msg00392.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-04/msg00046.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow DELETE and UPDATE to be used with LIMIT and ORDER BY&lt;br /&gt;
* http://archives.postgresql.org/pgadmin-hackers/2010-04/msg00078.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg01997.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00021.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow finer control over the caching of prepared query plans&lt;br /&gt;
|Currently anonymous (un-named) queries prepared via the wire protocol are replanned every time bind parameters are supplied --- allow SQL PREPARE to do the same.  Also, allow control over replanning prepared queries either manually or automatically when statistics for execute parameters differ dramatically from those used during planning.&lt;br /&gt;
* http://archives.postgresql.org/message-id/201002151911.o1FJBYh22763@momjian.us&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00597.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow PREPARE of cursors}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have DISCARD PLANS discard plans cached by functions&lt;br /&gt;
|DISCARD all should do the same.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00431.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid multiple-evaluation of BETWEEN and IN arguments containing volatile expressions&lt;br /&gt;
* http://archives.postgresql.org/message-id/4D95B605.2020709@enterprisedb.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix nested CASE-WHEN constructs&lt;br /&gt;
* http://archives.postgresql.org/message-id/4DDCEEB8.50602@enterprisedb.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== CREATE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow CREATE TABLE AS to determine column lengths for complex expressions like SELECT col1 || col2}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have WITH CONSTRAINTS also create constraint indexes&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-04/msg00149.php &amp;lt;nowiki&amp;gt;Re: CREATE TABLE LIKE INCLUDING INDEXES support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move NOT NULL constraint information to pg_constraint&lt;br /&gt;
|Currently NOT NULL constraints are stored in pg_attribute without any designation of their origins, e.g. primary keys.  One manifest problem is that dropping a PRIMARY KEY constraint does not remove the NOT NULL constraint designation.  Another issue is that we should probably force NOT NULL to be propagated from parent tables to children, just as CHECK constraints are.  (But then does dropping PRIMARY KEY affect children?)&lt;br /&gt;
* http://archives.postgresql.org/message-id/19768.1238680878@sss.pgh.pa.us&lt;br /&gt;
* http://archives.postgresql.org/message-id/200909181005.n8IA5Ris061239@wwwmaster.postgresql.org&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-07/msg01223.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent concurrent CREATE TABLE from sometimes returning a cryptic error message&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00169.php &amp;lt;nowiki&amp;gt;BUG #3692: Conflicting create table statements throw unexpected error&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add CREATE SCHEMA ... LIKE that copies a schema}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix CREATE OR REPLACE FUNCTION to not leave objects depending on the function in inconsistent state&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-08/msg00985.php indexes on functions and create or replace function]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow temporary tables to exist as empty by default in all sessions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00006.php &amp;lt;nowiki&amp;gt;what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg01329.php &amp;lt;nowiki&amp;gt;idea: global temp tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org//pgsql-hackers/2009-05/msg00016.php &amp;lt;nowiki&amp;gt;Re: idea: global temp tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg01098.php &amp;lt;nowiki&amp;gt;global temporary tables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow the creation of &amp;quot;distinct&amp;quot; types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01647.php &amp;lt;nowiki&amp;gt;Distinct types&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider analyzing temporary tables when they are first used in a query&lt;br /&gt;
|Autovacuum cannot analyze or vacuum temporary tables.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-04/msg00416.php &amp;lt;nowiki&amp;gt;autovacuum and temp tables support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow an unlogged table to be changed to logged&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00315.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== UPDATE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Allow UPDATE tab SET ROW (col, ...) = (SELECT...)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-07/msg01308.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] extension for sql update&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00865.php &amp;lt;nowiki&amp;gt;UPDATE using sub selects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-04/msg00315.php &amp;lt;nowiki&amp;gt;UPDATE using sub selects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-03/msg00237.php &amp;lt;nowiki&amp;gt;Re: UPDATE using sub selects&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Research self-referential UPDATEs that see inconsistent row versions in read-committed mode&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00507.php &amp;lt;nowiki&amp;gt;Concurrently updating an updatable view&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00016.php &amp;lt;nowiki&amp;gt;Re: Do we need a TODO? (was Re: Concurrently updating anupdatable view)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve performance of EvalPlanQual mechanism that rechecks already-updated rows&lt;br /&gt;
|This is related to the previous item, which questions whether it even has the right semantics&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-09/msg00045.php &amp;lt;nowiki&amp;gt;BUG #4401: concurrent updates to a table blocks one update indefinitely&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-07/msg00302.php &amp;lt;nowiki&amp;gt;BUG #4945: Parallel update(s) gone wild&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== ALTER ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have ALTER TABLE RENAME of a SERIAL column rename the sequence&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php &amp;lt;nowiki&amp;gt;Re: newbie: renaming sequences task&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have ALTER SEQUENCE RENAME rename the sequence name stored in the sequence table&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-09/msg00092.php &amp;lt;nowiki&amp;gt;BUG #3619: Renaming sequence does not update its 'sequence_name' field&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-10/msg00007.php &amp;lt;nowiki&amp;gt;Re: BUG #3619: Renaming sequence does not update its 'sequence_name' field&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00008.php &amp;lt;nowiki&amp;gt;Re: newbie: renaming sequences task&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME or ALTER TABLE RENAME CONSTRAINT&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-02/msg00168.php &amp;lt;nowiki&amp;gt;ALTER CONSTRAINT RENAME patch reverted&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ALTER DOMAIN to modify the underlying data type}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow ALTER TABLESPACE to move the tablespace to different directories}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow moving system tables to other tablespaces, where possible&lt;br /&gt;
|Currently non-global system tables must be in the default database tablespace. Global system tables can never be moved.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have ALTER INDEX update the name of a constraint using that index}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow column display reordering by recording a display, storage, and permanent id for every column?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00782.php &amp;lt;nowiki&amp;gt;Re: column ordering, was Re: [PATCHES] Enums patch v2&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg01029.php &amp;lt;nowiki&amp;gt;Column reordering in pg_dump&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow deactivating (and reactivating) indexes via ALTER TABLE&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg01191.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== CLUSTER ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Automatically maintain clustering on a table&lt;br /&gt;
|This might require some background daemon to maintain clustering during periods of low usage. It might also require tables to be only partially filled for easier reorganization.  Another idea would be to create a merged heap/index data file so an index lookup would automatically access the heap data too.  A third idea would be to store heap rows in hashed groups, perhaps using a user-supplied hash function.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2004-08/msg00350.php &amp;lt;nowiki&amp;gt;Equivalent praxis to CLUSTERED INDEX?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00155.php &amp;lt;nowiki&amp;gt;Re: Grouped Index Tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://community.enterprisedb.com/git/&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2009-10/msg00346.php &amp;lt;nowiki&amp;gt;Re: maintain_cluster_order_v5.patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== COPY ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY to report error lines and continue&lt;br /&gt;
|This requires the use of a savepoint before each COPY line is processed, with ROLLBACK on COPY failure. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00572.php &amp;lt;nowiki&amp;gt;Re: VLDB Features&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY on a newly-created table to skip WAL logging&lt;br /&gt;
|On crash recovery, the table involved in the COPY would be removed or have its heap and index files truncated.  One issue is that no other backend should be able to add to the table at the same time, which is something that is currently allowed.  This currently is done if the table is created inside the same transaction block as the COPY because no other backends can see the table.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY FROM to create index entries in bulk&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00811.php &amp;lt;nowiki&amp;gt;Batch update of indexes on data loading&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY in CSV mode to control whether a quoted zero-length string is treated as NULL&lt;br /&gt;
|Currently this is always treated as a zero-length string, which generates an error when loading into an integer column &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00905.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] allow CSV quote in NULL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve COPY performance&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00954.php &amp;lt;nowiki&amp;gt;Re: 8.3 / 8.2.6 restore comparison&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01882.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY to report errors sooner&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01169.php &amp;lt;nowiki&amp;gt;Timely reporting of COPY errors&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow COPY to handle other number formats&lt;br /&gt;
|E.g. the German notation. Best would be something like WITH DECIMAL ','.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow a stalled COPY to exit if the backend is terminated&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-04/msg00067.php &amp;lt;nowiki&amp;gt;Re: possible bug not in open items&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== GRANT/REVOKE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SERIAL sequences to inherit permissions from the base table?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow dropping of a role that has connection rights&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00736.php &amp;lt;nowiki&amp;gt;DROP ROLE dependency tracking ...&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== DECLARE CURSOR ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent DROP TABLE from dropping a table referenced by its own open cursor?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide some guarantees about the behavior of cursors that invoke volatile functions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/20997.1244563664@sss.pgh.pa.us Re: Cursor with hold emits the same row more than once across commits in 8.3.7]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== INSERT ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow INSERT/UPDATE of the system-generated oid value for a row}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|In rules, allow VALUES() to contain a mixture of 'old' and 'new' references}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== SHOW/SET ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add SET PERFORMANCE_TIPS option to suggest INDEX, VACUUM, VACUUM ANALYZE, and CLUSTER}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rationalize the discrepancy between settings that use values in bytes and SHOW that returns the object count&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2008-07/msg00007.php &amp;lt;nowiki&amp;gt;Re: [ADMIN] shared_buffers and shmmax&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== ANALYZE ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have EXPLAIN ANALYZE issue NOTICE messages when the estimated and actual row counts differ by a specified percentage}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have EXPLAIN ANALYZE report rows as floating-point numbers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg01363.php &amp;lt;nowiki&amp;gt;explain analyze rows=%.0f&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00108.php &amp;lt;nowiki&amp;gt;Re: explain analyze rows=%.0f&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve how ANALYZE computes in-doubt tuples&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00771.php &amp;lt;nowiki&amp;gt;VACUUM/ANALYZE counting of in-doubt tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Window Functions ===&lt;br /&gt;
See {{messageLink|357.1230492361@sss.pgh.pa.us|TODO items for window functions}}.&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support creation of user-defined window functions&lt;br /&gt;
|We have the ability to create new window functions written in C.  Is it&lt;br /&gt;
worth the effort to create an API that would let them be written in PL/pgsql, etc?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement full support for window framing clauses&lt;br /&gt;
|In addition to done clauses described in the [http://developer.postgresql.org/pgdocs/postgres/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS latest doc], these clauses are not implemented yet.&lt;br /&gt;
* RANGE BETWEEN ... PRECEDING/FOLLOWING&lt;br /&gt;
* EXCLUDE&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Investigate tuplestore performance issues&lt;br /&gt;
|The tuplestore_in_memory() thing is just a band-aid, we ought to try to solve it properly.  tuplestore_advance seems like a weak spot as well.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00152.php &amp;lt;nowiki&amp;gt;tuplestore potential performance problem&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem|Do we really need so much duplicated code between Agg and WindowAgg?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Teach planner to evaluate multiple windows in the optimal order&lt;br /&gt;
|Currently windows are always evaluated in the query-specified order.&lt;br /&gt;
* http://archives.postgresql.org/message-id/3CDAD71E9D70417290FCF66F0178D1E1@amd64&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement DISTINCT clause in window aggregates&lt;br /&gt;
|Some proprietary RDBMSs have implemented it already, so it helps with porting from those.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Integrity Constraints ==&lt;br /&gt;
=== Keys ===&lt;br /&gt;
&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve deferrable unique constraints for cases with many conflicts&lt;br /&gt;
|The current implementation fires a trigger for each potentially conflicting row.  This might not scale well for an update that changes many key values at once.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Referential Integrity ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add MATCH PARTIAL referential integrity}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change foreign key constraint for array -&amp;amp;gt; element to mean element in array?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-10/msg01814.php &amp;lt;nowiki&amp;gt;foreign keys for array/period contains relationships&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem when cascading referential triggers make changes on cascaded tables, seeing the tables in an intermediate state&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-09/msg00174.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Work-in-progress referential action trigger timing&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Optimize referential integrity checks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2005-10/msg00458.php &amp;lt;nowiki&amp;gt;Re: Effects of cascading references in foreign keys&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00744.php &amp;lt;nowiki&amp;gt;Can't ri_KeysEqual() consider two nulls as equal?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Server-Side Languages ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for polymorphic arguments and return types to languages other than PL/PgSQL}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for OUT and INOUT parameters to languages other than PL/PgSQL}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add more fine-grained specification of functions taking arbitrary data types&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00367.php &amp;lt;nowiki&amp;gt;RfD: more powerful &amp;amp;quot;any&amp;amp;quot; types&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement stored procedures&lt;br /&gt;
|This might involve the control of transaction state and the return of multiple result sets&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-10/msg00454.php &amp;lt;nowiki&amp;gt;PL/pgSQL stored procedure returning multiple result sets (SELECTs)?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01375.php &amp;lt;nowiki&amp;gt;Proposal: real procedures again (8.4)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg00542.php&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-04/msg01149.php &amp;lt;nowiki&amp;gt;Gathering specs and discussion on feature (post 9.1)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow holdable cursors in SPI}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Add SPI_gettypmod() to return a field's typemod from a TupleDesc&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2005-11/msg00250.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== SQL-Language Functions ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow SQL-language functions to reference parameters by parameter name&lt;br /&gt;
|Currently SQL-language functions can only refer to dollar parameters, e.g. $1&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01479.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01519.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00221.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rethink query plan caching and timing of parse analysis within SQL-language functions&lt;br /&gt;
|They should work more like plpgsql functions do ...&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2011-05/msg00078.php &amp;lt;nowiki&amp;gt;Re: BUG #6019: invalid cached plan on inherited table&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/pgSQL ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow handling of %TYPE arrays, e.g. tab.col%TYPE[]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Allow listing of record column names, and access to record columns via variables, e.g. columns := r.(*), tval2 := r.(colname)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2005-07/msg00458.php &amp;lt;nowiki&amp;gt;Re: PL/PGSQL: Dynamic Record Introspection&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-05/msg00302.php &amp;lt;nowiki&amp;gt;Re: PL/PGSQL: Dynamic Record Introspection&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00031.php &amp;lt;nowiki&amp;gt;Re: PL/PGSQL: Dynamic Record Introspection&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow row and record variables to be set to NULL constants, and allow NULL tests on such variables&lt;br /&gt;
|Because a row is not scalar, do not allow assignment from NULL-valued scalars.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg00070.php &amp;lt;nowiki&amp;gt;NULL and plpgsql rows&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider keeping separate cached copies when search_path changes&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg01009.php &amp;lt;nowiki&amp;gt;pl/pgsql Plan Invalidation and search_path&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve handling of NULL row values vs. NULL rows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg01758.php &amp;lt;nowiki&amp;gt;Null row vs. row of nulls in plpgsql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg01973.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/Perl ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow regex operations in plperl using UTF8 characters in non-UTF8 encoded databases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/Python ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Develop a trusted variant of PL/Python.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create a new restricted execution class that will allow passing function arguments in as locals.  Passing them as globals means functions cannot be called recursively.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-02/msg01468.php &amp;lt;nowiki&amp;gt;Re: pl/python do not delete function arguments&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a DB-API compliant interface on top of the SPI interface}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|For functions returning a setof record with a composite type, cache the I/O functions for the composite type&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg02007.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix loss of information during conversion of numeric type to Python float}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== PL/Tcl ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add table function support}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Check encoding validity of values passed back to Postgres in function returns, trigger tuple changes, and SPI calls.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Clients ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a function like pg_get_indexdef() that report more detailed index information&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-12/msg00166.php &amp;lt;nowiki&amp;gt;BUG #3829: Wrong index reporting from pgAdmin III (v1.8.0 rev 6766-6767)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Split out pg_resetxlog output into pre- and post-sections&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg02040.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== pg_ctl ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pg_ctl to work properly with configuration files located outside the PGDATA directory&lt;br /&gt;
|pg_ctl can not read the pid file because it isn't located in the config directory but in the PGDATA directory.  The solution is to allow pg_ctl to read and understand postgresql.conf to find the data_directory value.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2009-10/msg00024.php &amp;lt;nowiki&amp;gt;BUG #5103: &amp;amp;quot;pg_ctl -w (re)start&amp;amp;quot; fails with custom unix_socket_directory&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Modify pg_ctl behavior and exit codes to make it easier to write an LSB conforming init script&lt;br /&gt;
|It may be desirable to condition some of the changes on a command-line switch, to avoid breaking existing scripts.  A Linux shell (sh) script is referenced which has been tested and seems to provide a high degree of conformance in multiple environments.  Study of this script might suggest areas where pg_ctl could be modified to make writing an LSB conforming script easier; however, some aspects of that script would be unnecessary with other suggested changes to pg_ctl, and discussion on the lists did not reach consensus on support for all aspects of this script.  Further discussion of particular changes is needed before beginning any work.&lt;br /&gt;
* [[Lsb_conforming_init_script|LSB conforming init script]]&lt;br /&gt;
These threads should be studied for other ideas on improvements:&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01390.php &amp;lt;nowiki&amp;gt;We should Axe /contrib/start-scripts&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01843.php &amp;lt;nowiki&amp;gt;Linux LSB init script&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00008.php &amp;lt;nowiki&amp;gt;Re: Linux LSB init script&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve pg_ctl's detection of running postmasters&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00000.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-committers/2011-06/msg00001.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== psql ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have psql \ds show all sequences and their settings&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00916.php &amp;lt;nowiki&amp;gt;Re: TODO item: Have psql show current values for a sequence&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00401.php &amp;lt;nowiki&amp;gt;Quick patch: Display sequence owner&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have \d on a sequence indicate if the sequence is owned by a table}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move psql backslash database information into the backend, use mnemonic commands?&lt;br /&gt;
|This would allow non-psql clients to pull the same information out of the database as psql. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-01/msg00191.php &amp;lt;nowiki&amp;gt;Re: psql \d option list overloaded&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make psql's \d commands more consistent in their handling of schemas&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php &amp;lt;nowiki&amp;gt;Re: psql and schemas&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make psql's \d commands distinguish default privileges from no privileges&lt;br /&gt;
|ACL displays were visibly different for the two cases before we &amp;quot;improved&amp;quot; them by using array_to_string.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2011-05/msg00082.php &amp;lt;nowiki&amp;gt;BUG #6021: There is no difference between default and empty access privileges with \dp&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consistently display privilege information for all objects in psql}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add &amp;amp;quot;auto&amp;amp;quot; expanded mode that outputs in expanded format if &amp;amp;quot;wrapped&amp;amp;quot; mode can't wrap the output to the screen width&lt;br /&gt;
|Consider using auto-expanded mode for backslash commands like \df+.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00417.php &amp;lt;nowiki&amp;gt;Re: psql wrapped format default for backslash-d commands&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg01638.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent tab completion of SET TRANSACTION from querying the database and therefore preventing the transaction isolation level from being set.&lt;br /&gt;
|Currently SET &amp;amp;lt;tab&amp;amp;gt; causes a database lookup to check all supported session variables.  This query causes problems because setting the transaction isolation level must be the first statement of a transaction.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|\s without arguments (display history) fails with libedit, doesn't use pager either&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2011-06/msg00114.php &amp;lt;nowiki&amp;gt; psql \s not working - OS X&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a \set variable to control whether \s displays line numbers&lt;br /&gt;
|Another option is to add \# which lists line numbers, and allows command execution.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00255.php &amp;lt;nowiki&amp;gt;Re: psql possible TODO&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Include the symbolic SQLSTATE name in verbose error reports&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-09/msg00438.php &amp;lt;nowiki&amp;gt;Re: Checking is TSearch2 query is valid&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add prompt escape to display the client and server versions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00310.php &amp;lt;nowiki&amp;gt;WIP patch for TODO Item: Add prompt escape to display the client and server versions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add option to wrap column values at whitespace boundaries, rather than chopping them at a fixed width.&lt;br /&gt;
|Currently, &amp;amp;quot;wrapped&amp;amp;quot; format chops values into fixed widths.  Perhaps the word wrapping could use the same algorithm documented in the W3C specification. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00404.php &amp;lt;nowiki&amp;gt;Re: psql wrapped format default for backslash-d commands&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://www.w3.org/TR/CSS21/tables.html#auto-table-layout}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support the ReST table output format&lt;br /&gt;
|Details about the ReST format:  http://docutils.sourceforge.net/rst.html#reference-documentation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg01007.php &amp;lt;nowiki&amp;gt;Proposal: new border setting in psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00518.php &amp;lt;nowiki&amp;gt;Re: Proposal: new border setting in psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00609.php &amp;lt;nowiki&amp;gt;Re: Proposal: new border setting in psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add option to print advice for people familiar with other databases&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-01/msg01845.php &amp;lt;nowiki&amp;gt;MySQL-ism help patch for psql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|\dd is missing comments for several types of objects&lt;br /&gt;
|Comments are not handled at all for some object types, and are handled by both \dd and the individual backslash command for others. Consider a system view like pg_comments to manage this mess.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2009-09/msg00199.php &amp;lt;nowiki&amp;gt;comment on constraint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-09/msg01080.php &amp;lt;nowiki&amp;gt;pg_comments&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-05/msg00885.php &amp;lt;nowiki&amp;gt;patch: Allow \dd to show constraint comments&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add ability to edit views with \ev&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00023.php &amp;lt;nowiki&amp;gt;Adding \ev view editor?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix FETCH_COUNT to handle SELECT ... INTO and WITH queries&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01565.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2010-05/msg00192.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent psql from sending remaining single-line multi-statement queries after reconnecting&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2010-05/msg00159.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01283.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Add \i option to bring in the specified file as a quoted literal&lt;br /&gt;
|This would be useful for creating functions and other areas.  Details still need to be worked out.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-02/msg00016.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-02/msg00020.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having psql -c read .psqlrc, for consistency&lt;br /&gt;
|psql -f already reads .psqlrc&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow processing of multiple -f (file) options&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve line drawing characters&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00386.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== pg_dump / pg_restore ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;Add full object name to the tag field.  eg. for operators we need '=(integer, integer)', instead of just '='.&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add pg_dumpall custom format dumps?&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2010-05/msg00509.php pg_dumpall custom format]&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid using platform-dependent locale names in pg_dumpall output&lt;br /&gt;
|Using native locale names puts roadblocks in the way of porting a dump to another platform.  One possible solution is to get&lt;br /&gt;
CREATE DATABASE to accept some agreed-on set of locale names and fix them up to meet the platform's requirements.&lt;br /&gt;
* http://archives.postgresql.org/message-id/21396.1241716688@sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow selection of individual object(s) of all types, not just tables}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|In a selective dump, allow dumping of an object and all its dependencies}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add options like pg_restore -l and -L to pg_dump}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for multiple pg_restore -t options, like pg_dump&lt;br /&gt;
|pg_restore's -t switch is less useful than pg_dump's in quite a few ways: no multiple switches, no pattern matching, no ability to pick up indexes and other dependent items for a selected table.  It should be made to handle this switch just like pg_dump does.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Stop dumping CASCADE on DROP TYPE commands in clean mode}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pg_dump --clean to drop roles that own objects or have privileges&lt;br /&gt;
|tgl says: if this is about pg_dumpall, it's done as of 8.4.  If it's really about pg_dump, what does it mean?  pg_dump has no business dropping roles.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Remove unnecessary function pointer abstractions in pg_dump source code}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pg_dump to utilize multiple CPUs and I/O channels by dumping multiple objects simultaneously&lt;br /&gt;
|The difficulty with this is getting multiple dump processes to produce a single dump output file.  It also would require several sessions to share the same snapshot. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php &amp;lt;nowiki&amp;gt;pg_dump additional options for performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00135.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00040.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg02454.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pg_restore to load different parts of the COPY data for a single table simultaneously}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Remove support for dumping from pre-7.3 servers&lt;br /&gt;
|In 7.3 and later, we can get accurate dependency information from the server.  pg_dump still contains a lot of crufty code&lt;br /&gt;
to try to deal with the lack of dependency info in older servers, but the usefulness of maintaining that code grows small.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pre/data/post files when schema and data are dumped separately, for performance reasons&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00205.php &amp;lt;nowiki&amp;gt;pg_dump additional options for performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00185.php &amp;lt;nowiki&amp;gt;Re: pg_dump additional options for performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00821.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00135.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Refactor handling of database attributes between pg_dump and pg_dumpall&lt;br /&gt;
|Currently only pg_dumpall emits database attributes, such as ALTER DATABASE SET commands and database-level GRANTs.&lt;br /&gt;
Many people wish that pg_dump would do that.  One proposal is to let pg_dump issue such commands if the -C switch was used,&lt;br /&gt;
but it's unclear whether that will satisfy the demand.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg01031.php &amp;lt;nowiki&amp;gt;ALTER DATABASE vs pg_dump&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2010-05/msg00010.php summary of the issues]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change pg_dump so that a comment on the dumped database is applied to the loaded database, even if the database has a different name.&lt;br /&gt;
|This will require new backend syntax, perhaps COMMENT ON CURRENT DATABASE. This is related to the previous item.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow parallel restore of tar dumps&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-02/msg01154.php &amp;lt;nowiki&amp;gt;Re: parallel restore&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow pg_dumpall to output restorable ALTER USER/DATABASE SET settings&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00916.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00394.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02359.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== ecpg ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Docs&lt;br /&gt;
|Document differences between ecpg and the SQL standard and information about the Informix-compatibility module.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Solve cardinality &amp;amp;gt; 1 for input descriptors / variables?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add a semantic check level, e.g. check if a table really exists}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|fix handling of DB attributes that are arrays}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix nested C comments}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|sqlwarn[6] should be 'W' if the PRECISION or SCALE value specified}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Make SET CONNECTION thread-aware, non-standard?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow multidimensional arrays}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement COPY FROM STDIN}} &lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a way to specify size of a bytea parameter&lt;br /&gt;
* [http://archives.postgresql.org/message-id/200906192131.n5JLVoMo044178@wwwmaster.postgresql.org &amp;lt;nowiki&amp;gt;BUG #4866: ECPG and BYTEA&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Fix small memory leaks in ecpg&lt;br /&gt;
|Memory leaks in a short running application like ecpg are not really a problem, but make debugging more complicated}} &lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow reuse of cursor name variables&lt;br /&gt;
* [http://archives.postgresql.org/message-id/20100329113435.GA3430@feivel.credativ.lan &amp;lt;nowiki&amp;gt;Problems with variable cursorname in ecpg&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== libpq ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent PQfnumber() from lowercasing unquoted column names&lt;br /&gt;
|PQfnumber() should never have been doing lowercasing, but historically it has so we need a way to prevent it}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow statement results to be automatically batched to the client&lt;br /&gt;
|Currently all statement results are transferred to the libpq client before libpq makes the results available to the application.  This feature would allow the application to make use of the first result rows while the rest are transferred, or held on the server waiting for them to be requested by libpq. One complexity is that a statement like SELECT 1/col could error out mid-way through the result set.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider disallowing multiple queries in PQexec() as an additional barrier to SQL injection attacks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg00184.php &amp;lt;nowiki&amp;gt;Re: InitPostgres and flatfiles question&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add PQexecf() that allows complex parameter substitution&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01803.php &amp;lt;nowiki&amp;gt;Last minute mini-proposal (I know, know) for PQexecf()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add SQLSTATE and severity to errors generated within libpq itself&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-interfaces/2007-11/msg00015.php &amp;lt;nowiki&amp;gt;v8.1: Error severity on libpq PGconn*&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01425.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add support for interface/ipaddress binding to libpq&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01811.php &amp;lt;nowiki&amp;gt;SR/libpq - outbound interface/ipaddress binding&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Triggers ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve storage of deferred trigger queue&lt;br /&gt;
|Right now all deferred trigger information is stored in backend memory.  This could exhaust memory for very large trigger queues. This item involves dumping large queues into files, or doing some kind of join to process all the triggers, some bulk operation, or a bitmap. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00876.php &amp;lt;nowiki&amp;gt;Re: BUG #4204: COPY to table with FK has memory leak&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-10/msg00464.php &amp;lt;nowiki&amp;gt;Scaling up deferred unique checks and the after trigger queue&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-08/msg00023.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow triggers to be disabled in only the current session.&lt;br /&gt;
|This is currently possible by starting a multi-statement transaction, modifying the system tables, performing the desired SQL, restoring the system tables, and committing the transaction.  ALTER TABLE ... TRIGGER requires a table lock so it is not ideal for this usage.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|With disabled triggers, allow pg_dump to use ALTER TABLE ADD FOREIGN KEY&lt;br /&gt;
|If the dump is known to be valid, allow foreign keys to be added without revalidating the data.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow statement-level triggers to access modified rows}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|When statement-level triggers are defined on a parent table, have them fire only on the parent table, and fire child table triggers only where appropriate&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg01883.php &amp;lt;nowiki&amp;gt;Statement-level triggers and inheritance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow AFTER triggers on system tables&lt;br /&gt;
|System tables are modified in many places in the backend without going through the executor and therefore not causing triggers to fire. To complete this item, the functions that modify system tables will have to fire triggers.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01665.php&lt;br /&gt;
* http://wiki.postgresql.org/wiki/DDL_Triggers&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Tighten trigger permission checks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00564.php &amp;lt;nowiki&amp;gt;Security leak with trigger functions?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow BEFORE INSERT triggers on views&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-02/msg01466.php &amp;lt;nowiki&amp;gt;Re: Why can't I put a BEFORE EACH ROW trigger on a view?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add database and transaction-level triggers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00451.php &amp;lt;nowiki&amp;gt;Proposal for db level triggers&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00620.php &amp;lt;nowiki&amp;gt;triggers on prepare, commit, rollback... ?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce locking requirements for creating a trigger&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00635.php &amp;lt;nowiki&amp;gt;Re: Change lock requirements for adding a trigger&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid requirement for &amp;quot;AFTER&amp;quot; trigger functions to return a value&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02384.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Inheritance ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow inherited tables to inherit indexes, UNIQUE constraints, and primary/foreign keys&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-05/msg00285.php &amp;lt;nowiki&amp;gt;Partitioning/inherited tables vs FKs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00039.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00305.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Honor UNIQUE INDEX on base column in INSERTs/UPDATEs on inherited table, e.g.  INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail&lt;br /&gt;
|The main difficulty with this item is the problem of creating an index that can span multiple tables.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Determine whether ALTER TABLE / SET SCHEMA should work on inheritance hierarchies (and thus support ONLY).  If yes, implement it.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|ALTER TABLE variants sometimes support recursion and sometimes not, but this is poorly/not documented, and the ONLY marker would then be silently ignored. Clarify the documentation, and reject ONLY if it is not supported.}}&lt;br /&gt;
&lt;br /&gt;
== Indexes ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent index uniqueness checks when UPDATE does not modify the column&lt;br /&gt;
|Uniqueness (index) checks are done when updating a column even if the column is not modified by the UPDATE.&lt;br /&gt;
However, HOT already short-circuits this in common cases, so more work might not be helpful.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow the creation of on-disk bitmap indexes which can be quickly combined with other bitmap indexes&lt;br /&gt;
|Such indexes could be more compact if there are only a few distinct values. Such indexes can also be compressed.  Keeping such indexes updated can be costly.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2005-07/msg00512.php &amp;lt;nowiki&amp;gt;Re: Bitmap index AM&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg01107.php &amp;lt;nowiki&amp;gt;Bitmap index thoughts&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00265.php &amp;lt;nowiki&amp;gt;Stream bitmaps&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01214.php &amp;lt;nowiki&amp;gt;Re: Bitmapscan changes - Requesting further feedback&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00013.php &amp;lt;nowiki&amp;gt;Updated bitmap index patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00741.php &amp;lt;nowiki&amp;gt;Reviewing new index types (was Re: [PATCHES] Updated bitmap indexpatch)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01023.php &amp;lt;nowiki&amp;gt;Bitmap Indexes: request for feedback&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/message-id/800923.27831.qm@web29010.mail.ird.yahoo.com &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow accurate statistics to be collected on indexes with more than one column or expression indexes, perhaps using per-index statistics&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2006-10/msg00222.php &amp;lt;nowiki&amp;gt;Re: Simple join optimized badly?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01131.php &amp;lt;nowiki&amp;gt;Stats for multi-column indexes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00741.php &amp;lt;nowiki&amp;gt;Cross-column statistics revisited&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg01431.php &amp;lt;nowiki&amp;gt;Multi-Dimensional Histograms&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00913.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg02179.php &lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00459.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg02054.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg01731.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having a larger statistics target for indexed columns and expression indexes. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider smaller indexes that record a range of values per heap page, rather than having one index entry for every heap row&lt;br /&gt;
|This is useful if the heap is clustered by the indexed values. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00341.php &amp;lt;nowiki&amp;gt;Grouped Index Tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg01264.php &amp;lt;nowiki&amp;gt;Grouped Index Tuples&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg00465.php &amp;lt;nowiki&amp;gt;Grouped Index Tuples / Clustered Indexes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-03/msg00163.php &amp;lt;nowiki&amp;gt;Bitmapscan changes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00014.php &amp;lt;nowiki&amp;gt;Re: GIT patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00487.php &amp;lt;nowiki&amp;gt;Re: Index Tuple Compression Approach?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01589.php &amp;lt;nowiki&amp;gt;Re: Index AM change proposals, redux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add REINDEX CONCURRENTLY, like CREATE INDEX CONCURRENTLY&lt;br /&gt;
|This is difficult because you must upgrade to an exclusive table lock to replace the existing index file.  CREATE INDEX CONCURRENTLY does not have this complication.  This would allow index compaction without downtime. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-08/msg00289.php &amp;lt;nowiki&amp;gt;Re: When/if to Reindex&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow multiple indexes to be created concurrently, ideally via a single heap scan&lt;br /&gt;
|pg_restore allows parallel index builds, but it is done via subprocesses, and there is no SQL interface for this.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-04/msg00093.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider sorting entries before inserting into btree index&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-01/msg01010.php &amp;lt;nowiki&amp;gt;Re: ATTN: Clodaldo was Performance problem. Could it be related to 8.3-beta4?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow index scans to return matching index keys, not just the matching heap locations&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01657.php &amp;lt;nowiki&amp;gt;Re: Is this TODO item done?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01477.php &amp;lt;nowiki&amp;gt;Index-only quals&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow creation of an index that can do comparisons to test if a value is between two column values&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00757.php &amp;lt;nowiki&amp;gt;Proposal: temporal extension &amp;amp;quot;period&amp;amp;quot; data type&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using &amp;quot;effective_io_concurrency&amp;quot; for index scans&lt;br /&gt;
* Currently only bitmap scans use this, which might be fine because most multi-row index scans use bitmap scans.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== GIST ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add more GIST index support for geometric data types}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow GIST indexes to create certain complex index types, like digital trees (see Aoki)}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix performance issues in contrib/seg and contrib/cube GiST support&lt;br /&gt;
* [http://archives.postgresql.org/message-id/alpine.DEB.2.00.0904161633160.4053@aragorn.flymine.org GiST index performance]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/alpine.DEB.2.00.0904221704470.22330@aragorn.flymine.org draft patch]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2009-05/msg00069.php &amp;lt;nowiki&amp;gt;Re: GiST index performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2009-06/msg00068.php &amp;lt;nowiki&amp;gt;GiST index performance&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Hash ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add UNIQUE capability to hash indexes}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add hash WAL logging for crash recovery}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow multi-column hash indexes}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Sorting ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider whether duplicate keys should be sorted by block/offset&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00558.php &amp;lt;nowiki&amp;gt;Remove hacks for old bad qsort() implementations?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider being smarter about memory and external files used during sorts&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg01101.php &amp;lt;nowiki&amp;gt;Sorting Improvements for 8.4&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00045.php &amp;lt;nowiki&amp;gt;Re: Sorting Improvements for 8.4&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider detoasting keys before sorting}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow sorts to use more available memory&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2007-11/msg01026.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-09/msg01123.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg01957.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Fsync ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options and whether fsync does anything&lt;br /&gt;
|Ideally this requires a separate test program like /contrib/pg_test_fsync that can be run at initdb time or optionally later.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider sorting writes during checkpoint&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00541.php &amp;lt;nowiki&amp;gt;Sorted writes in checkpoint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00050.php &amp;lt;nowiki&amp;gt;Re: Sorting writes during checkpoint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg02012.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg00278.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Cache Usage ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Speed up COUNT(*)&lt;br /&gt;
|We could use a fixed row count and a +/- count to follow MVCC visibility rules, or a single cached value could be used and invalidated if anyone modifies the table.  Another idea is to get a count directly from a unique index, but for this to be faster than a sequential scan it must avoid access to the heap to obtain tuple visibility information.&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Slow_Counting&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a way to calculate an &amp;amp;quot;estimated COUNT(*)&amp;amp;quot;&lt;br /&gt;
|Perhaps by using the optimizer's cardinality estimates or random sampling.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-11/msg00943.php &amp;lt;nowiki&amp;gt;Re: Improving count(*)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Slow_Counting&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow data to be pulled directly from indexes&lt;br /&gt;
|Currently indexes do not have enough tuple visibility information to allow data to be pulled from the index without also accessing the heap.  The idea is to use the visibility map used for vacuum to avoid heap lookups on pages where all tuples are visible.&lt;br /&gt;
* [http://wiki.postgresql.org/wiki/Index-only_scans Index-Only Scans wiki]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider automatic caching of statements at various levels:&lt;br /&gt;
* Parsed query tree&lt;br /&gt;
* Query execute plan&lt;br /&gt;
* Query results &lt;br /&gt;
&lt;br /&gt;
:&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg00823.php &amp;lt;nowiki&amp;gt;Cached Query Plans (was: global prepared statements)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider increasing internal areas (NUM_CLOG_BUFFERS) when shared buffers is increased&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-10/msg01419.php &amp;lt;nowiki&amp;gt;Re: slru.c race condition (was Re: TRAP: FailedAssertion(&amp;amp;quot;!((itemid)-&amp;amp;gt;lp_flags &amp;amp;amp; 0x01)&amp;amp;quot;,)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00030.php &amp;lt;nowiki&amp;gt;clog_buffers to 64 in 8.3?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-08/msg00024.php &amp;lt;nowiki&amp;gt;CLOG Patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider decreasing the amount of memory used by PrivateRefCount&lt;br /&gt;
|&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg00797.php &amp;lt;nowiki&amp;gt;PrivateRefCount (for 8.3)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-01/msg00752.php &amp;lt;nowiki&amp;gt;Re: PrivateRefCount (for 8.3)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider allowing higher priority queries to have referenced buffer cache pages stay in memory longer&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00562.php &amp;lt;nowiki&amp;gt;Re: How to keep a table in memory?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Vacuum ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Auto-fill the free space map by scanning the buffer cache or by checking pages written by the background writer&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-02/msg01125.php &amp;lt;nowiki&amp;gt;Dead Space Map&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-03/msg00011.php &amp;lt;nowiki&amp;gt;Re: Automatic free space map filling&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow concurrent inserts to use recently created pages rather than creating new ones&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg00853.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having single-page pruning update the visibility map&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;https://commitfest.postgresql.org/action/patch_view?id=75&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg02344.php &amp;lt;nowiki&amp;gt;Re: visibility maps and heap_prune&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve tracking of total relation tuple counts now that vacuum doesn't always scan the whole heap&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-06/msg00531.php Partial vacuum versus pg_class.reltuples]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Bias FSM towards returning free space near the beginning of the heap file, in hopes that empty pages at the end can be truncated by VACUUM&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg01124.php &amp;lt;nowiki&amp;gt;FSM search modes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a more compact data representation for dead tuple locations within VACUUM&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-05/msg00143.php &amp;lt;nowiki&amp;gt;Re: Have vacuum emit a warning when it runs out of maintenance_work_mem&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide more information in order to improve user-side estimates of dead space bloat in relations&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2009-05/msg01039.php &amp;lt;nowiki&amp;gt;Re: Bloated Table&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve locking behaviour of vacuum during trailing page truncation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-03/msg00319.php&lt;br /&gt;
* http://archives.postgresql.org/message-id/4D8DF88E.7080205@Yahoo.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce the number of table scans performed by vacuum&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg01119.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg00605.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-07/msg00624.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Auto-vacuum ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Issue log message to suggest VACUUM FULL if a table is nearly empty?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent long-lived temporary tables from causing frozen-xid advancement starvation&lt;br /&gt;
|The problem is that autovacuum cannot vacuum them to set frozen xids; only the session that created them can do that. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-06/msg01645.php &amp;lt;nowiki&amp;gt;Re: AutoVacuum Behaviour Question&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent autovacuum from running if an old transaction is still running from the last vacuum&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00899.php &amp;lt;nowiki&amp;gt;Re: Autovacuum and OldestXmin&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have autoanalyze of parent tables occur when child tables are modified&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-06/msg00137.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-10/msg00271.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Locking ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix priority ordering of read and write light-weight locks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00893.php &amp;lt;nowiki&amp;gt;lwlocks and starvation&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-11/msg00905.php &amp;lt;nowiki&amp;gt;Re: lwlocks and starvation&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem when multiple subtransactions of the same outer transaction hold different types of locks, and one subtransaction aborts&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-11/msg01011.php &amp;lt;nowiki&amp;gt;FOR SHARE vs FOR UPDATE locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg00001.php &amp;lt;nowiki&amp;gt;Re: FOR SHARE vs FOR UPDATE locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00435.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] [pgsql-patches] Phantom Command IDs, updated patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00773.php &amp;lt;nowiki&amp;gt;Re: savepoints and upgrading locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow UPDATEs on only non-referential integrity columns not to conflict with referential integrity locks&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00073.php &amp;lt;nowiki&amp;gt;Referential Integrity and SHARE locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add idle_in_transaction_timeout GUC so locks are not held for long periods of time}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve deadlock detection when a page cleaning lock conflicts with a shared buffer that is pinned&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-01/msg00138.php &amp;lt;nowiki&amp;gt;BUG #3883: Autovacuum deadlock with truncate?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php &amp;lt;nowiki&amp;gt;Thoughts about bug #3883&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-committers/2008-01/msg00365.php &amp;lt;nowiki&amp;gt;Re: pgsql: Add checks to TRUNCATE, CLUSTER, and REINDEX to prevent&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Detect deadlocks involving LockBufferForCleanup()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00873.php &amp;lt;nowiki&amp;gt;Thoughts about bug #3883&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow finer control over who is cancelled in a deadlock&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01727.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a lock timeout parameter&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-05/msg00485.php &amp;lt;nowiki&amp;gt;SELECT ... FOR UPDATE [WAIT integer | NOWAIT] for 8.5&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce number of unnecessary false positives in Serializable Snapshot Isolation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2011-06/msg00609.php &amp;lt;nowiki&amp;gt;SSI heap_insert and page-level predicate locks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Startup Time Improvements ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Experiment with multi-threaded backend for backend creation&lt;br /&gt;
|This would prevent the overhead associated with process creation. Most operating systems have trivial process creation time compared to database startup overhead, but a few operating systems (Win32, Solaris) might benefit from threading.  Also explore the idea of a single session using multiple threads to execute a statement faster.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow backends to change their database without restart&lt;br /&gt;
|This allows for faster server startup.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00843.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00336.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Write-Ahead Log ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Eliminate need to write full pages to WAL before page modification&lt;br /&gt;
|Currently, to protect against partial disk page writes, we write full page images to WAL before they are modified so we can correct any partial page writes during recovery.  These pages can also be eliminated from point-in-time archive files. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2002-06/msg00655.php &amp;lt;nowiki&amp;gt;Re: Index Scans become Seq Scans after VACUUM ANALYSE&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg01191.php &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|When full page writes are off, write CRC to WAL and check file system blocks on recovery&lt;br /&gt;
|If CRC check fails during recovery, remember the page in case a later CRC for that page properly matches.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Write full pages during file system write and not when the page is modified in the buffer cache&lt;br /&gt;
|This allows most full page writes to happen in the background writer.  It might cause problems for applying WAL on recovery into a partially-written page, but later the full page will be replaced from WAL.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce WAL traffic so only modified values are written rather than entire rows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-03/msg01589.php &amp;lt;nowiki&amp;gt;Reduction in WAL for UPDATEs&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow WAL information to recover corrupted pg_controldata&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00025.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] pg_resetxlog -r flag&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Find a way to reduce rotational delay when repeatedly writing last WAL page&lt;br /&gt;
|Currently fsync of WAL requires the disk platter to perform a full rotation to fsync again. One idea is to write the WAL to different offsets that might reduce the rotational delay. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2002-11/msg00483.php &amp;lt;nowiki&amp;gt;500 tpsQL + WAL log implementation&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Speed WAL recovery by allowing more than one page to be prefetched&lt;br /&gt;
|This should be done utilizing the same infrastructure used for prefetching in general to avoid introducing complex error-prone code in WAL replay. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-12/msg00683.php &amp;lt;nowiki&amp;gt;Slow PITR restore&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00497.php &amp;lt;nowiki&amp;gt;Re: [GENERAL] Slow PITR restore&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg01279.php &amp;lt;nowiki&amp;gt;Read-ahead and parallelism in redo recovery&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve WAL concurrency by increasing lock granularity&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00556.php &amp;lt;nowiki&amp;gt;Reworking WAL locking&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Be more aggressive about creating WAL files&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01325.php &amp;lt;nowiki&amp;gt;Re: PANIC caused by open_sync on Linux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-07/msg01075.php &amp;lt;nowiki&amp;gt;PreallocXlogFiles&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2005-04/msg00556.php &amp;lt;nowiki&amp;gt;WAL/PITR additional items&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have resource managers report the duration of their status changes&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg01468.php &amp;lt;nowiki&amp;gt;Recovery of Multi-stage WAL actions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move pgfoundry's xlogdump to /contrib and have it rely more closely on the WAL backend code&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00035.php &amp;lt;nowiki&amp;gt;xlogdump&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Close deleted WAL files held open in *nix by long-lived read-only backends&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg01754.php &amp;lt;nowiki&amp;gt;Deleted WAL files held open by backends in Linux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00060.php &amp;lt;nowiki&amp;gt;Re: Deleted WAL files held open by backends in Linux&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Optimizer / Executor ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve selectivity functions for geometric operators}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider increasing the default values of from_collapse_limit, join_collapse_limit, and/or geqo_threshold&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4136ffa0905210551u22eeb31bn5655dbe7c9a3aed5@mail.gmail.com from_collapse_limit vs. geqo_threshold]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve ability to display optimizer analysis using OPTIMIZER_DEBUG}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Log statements where the optimizer row estimates were dramatically different from the number of rows actually found?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider compressed annealing to search for query plans&lt;br /&gt;
|This might replace GEQO.&lt;br /&gt;
* http://archives.postgresql.org/message-id/15658.1241278636%40sss.pgh.pa.us&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve use of expression indexes for ORDER BY &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg01553.php &amp;lt;nowiki&amp;gt;Resjunk sort columns, Heikki's index-only quals patch, and bug #5000&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Modify the planner to better estimate caching effects&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2010-11/msg00117.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow shared buffer cache contents to affect index cost computations&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-06/msg01140.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Hashing ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using a hash for joining to a large IN (VALUES ...) list&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-05/msg00450.php &amp;lt;nowiki&amp;gt;Planning large IN lists&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow single batch hash joins to preserve outer pathkeys&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-09/msg00806.php Re: Potential Join Performance Issue]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;quot;lazy&amp;quot; hash tables - look up only the tuples that are actually requested&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid building the same hash table more than once during the same query&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid hashing for distinct and then re-hashing for hash join&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4136ffa0902191346g62081081v8607f0b92c206f0a@mail.gmail.com Re: Fixing Grittner's planner issues]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-04/msg00153.php a few crazy ideas about hash joins]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Background Writer ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider having the background writer update the transaction status hint bits before writing out the page&lt;br /&gt;
|Implementing this requires the background writer to have access to system catalogs and the transaction status log.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider adding buffers the background writer finds reusable to the free list &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00781.php &amp;lt;nowiki&amp;gt;Background LRU Writer/free list&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Automatically tune bgwriter_delay based on activity rather then using a fixed interval&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-04/msg00781.php &amp;lt;nowiki&amp;gt;Background LRU Writer/free list&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider whether increasing BM_MAX_USAGE_COUNT improves performance&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg01007.php &amp;lt;nowiki&amp;gt;Bgwriter LRU cleaning: we've been going at this all wrong&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Test to see if calling PreallocXlogFiles() from the background writer will help with WAL segment creation latency&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-06/msg00340.php &amp;lt;nowiki&amp;gt;Re: Load Distributed Checkpoints, final patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Concurrent Use of Resources ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Do async I/O for faster random read-ahead of data&lt;br /&gt;
|Async I/O allows multiple I/O requests to be sent to the disk with results coming back asynchronously.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg00820.php &amp;lt;nowiki&amp;gt;Asynchronous I/O Support&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-09/msg00255.php &amp;lt;nowiki&amp;gt;Re: random_page_costs - are defaults of 4.0 realistic for SCSI RAID 1&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00027.php &amp;lt;nowiki&amp;gt;There's random access and then there's random access&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-01/msg00170.php &amp;lt;nowiki&amp;gt;Bitmap index scan preread using posix_fadvise (Was: There's random access and then there's random access)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
The above patch is already applied as of 8.4, but it still remains to figure out how to handle plain indexscans effectively.&lt;br /&gt;
* [http://archives.postgresql.org//pgsql-hackers/2009-01/msg00806.php Problems with the patch submitted for posix_fadvise in index scans]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Experiment with multi-threaded backend for better I/O utilization&lt;br /&gt;
|This would allow a single query to make use of multiple I/O channels simultaneously.  One idea is to create a background reader that can pre-fetch sequential and index scan pages needed by other backends. This could be expanded to allow concurrent reads from multiple devices in a partitioned table.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-performance/2011-02/msg00123.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Experiment with multi-threaded backend for better CPU utilization&lt;br /&gt;
|This would allow several CPUs to be used for a single query, such as for sorting or query execution.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00945.php &amp;lt;nowiki&amp;gt;Multi CPU Queries - Feedback and/or suggestions wanted!&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|SMP scalability improvements&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00439.php &amp;lt;nowiki&amp;gt;Straightforward changes for increased SMP scalability&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00206.php &amp;lt;nowiki&amp;gt;Re: Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00361.php &amp;lt;nowiki&amp;gt;Re: Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== TOAST ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow user configuration of TOAST thresholds&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-02/msg00213.php &amp;lt;nowiki&amp;gt;Re: Proposed adjustments in MaxTupleSize and toastthresholds&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00082.php &amp;lt;nowiki&amp;gt;pg_lzcompress strategy parameters&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce unnecessary cases of deTOASTing&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-09/msg00895.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Eliminate more detoast copies for packed varlenas&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce costs of repeat de-TOASTing of values&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg01096.php &amp;lt;nowiki&amp;gt;WIP patch: reducing overhead for repeat de-TOASTing&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Monitoring ==&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Expand pg_stat_activity for easier integration with monitoring tools&lt;br /&gt;
|* http://archives.postgresql.org/message-id/4DFA13A5.2060200@2ndQuadrant.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add column to pg_stat_activity that shows the progress of long-running commands like CREATE INDEX and VACUUM&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-04/msg00203.php &amp;lt;nowiki&amp;gt;EXPLAIN progress info&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* The CLUSTER/VACUUM FULL implementation would also be useful to track this way&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have pg_stat_activity display query strings in the correct client encoding&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-01/msg00131.php &amp;lt;nowiki&amp;gt;pg_stats queries versus per-database encodings&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Expose pg_controldata via an SQL interface&lt;br /&gt;
|Helpful for monitoring replicated databases&lt;br /&gt;
* http://archives.postgresql.org/message-id/4B901D73.8030003@agliodbs.com&lt;br /&gt;
* [http://archives.postgresql.org/message-id/4B959D7A.6010907@joeconway.com initial patch]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Performance ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Use mmap() rather than SYSV for shared buffers?&lt;br /&gt;
|This would remove the requirement for SYSV SHM but would introduce portability issues. Anonymous mmap (or mmap to /dev/zero) is required to prevent I/O overhead. We could also consider mmap() for writing WAL.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00750.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg00756.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rather than consider mmap()-ing in 8k pages, consider mmap()'ing entire files into a backend?&lt;br /&gt;
|Doing I/O to large tables would consume a lot of address space or require frequent mapping/unmapping.  Extending the file also causes mapping problems that might require mapping only individual pages, leading to thousands of mappings.  Another problem is that there is no way to _prevent_ I/O to disk from the dirty shared buffers so changes could hit disk before WAL is written.&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01239.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider ways of storing rows more compactly on disk:&lt;br /&gt;
* Reduce the row header size?&lt;br /&gt;
* Consider reducing on-disk varlena length from four bytes to two because a heap row cannot be more than 64k in length}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider transaction start/end performance improvements&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00948.php &amp;lt;nowiki&amp;gt;Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00361.php &amp;lt;nowiki&amp;gt;Re: Reducing Transaction Start/End Contention&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow configuration of backend priorities via the operating system&lt;br /&gt;
|Though backend priorities make priority inversion during lock waits possible, research shows that this is not a huge problem.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2007-02/msg00493.php &amp;lt;nowiki&amp;gt;Priorities for users or queries?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider increasing the minimum allowed number of shared buffers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2008-02/msg00157.php &amp;lt;nowiki&amp;gt;Re: [PATCH] Don't bail with legitimate -N/-B options&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider if CommandCounterIncrement() can avoid its AcceptInvalidationMessages() call&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-committers/2007-11/msg00585.php &amp;lt;nowiki&amp;gt;pgsql: Avoid incrementing the CommandCounter when&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider Cartesian joins when both relations are needed to form an indexscan qualification for a third relation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-performance/2007-12/msg00090.php &amp;lt;nowiki&amp;gt;Re: TB-sized databases&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider not storing a NULL bitmap on disk if all the NULLs are trailing&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-12/msg00624.php &amp;lt;nowiki&amp;gt;Proposal for Null Bitmap Optimization(for Trailing NULLs)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-12/msg00109.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Proposal for Null Bitmap Optimization(for TrailingNULLs)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Sort large UPDATE/DELETEs so it is done in heap order&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg01119.php &amp;lt;nowiki&amp;gt;Possible future performance improvement: sort updates/deletes by ctid&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow one transaction to see tuples using the snapshot of another transaction&lt;br /&gt;
|This would assist multiple backends in working together. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00400.php &amp;lt;nowiki&amp;gt;Transaction Snapshot Cloning&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00135.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-12/msg00260.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg00466.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-08/msg00684.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider decreasing the I/O caused by updating tuple hint bits&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00847.php &amp;lt;nowiki&amp;gt;Hint Bits and Write I/O&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-07/msg00199.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Hint Bits and Write I/O&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg00695.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00792.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-01/msg01063.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01408.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01453.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid the requirement of freezing pages that are infrequently modified &lt;br /&gt;
|If all rows on a page are visible, it is possible to set a bit in the visibility map (once the visibility map is 100% reliable) and not need to freeze the page, avoiding a page rewrite&lt;br /&gt;
*  http://archives.postgresql.org/message-id/4BF701CF.2090205@agliodbs.com&lt;br /&gt;
*  http://archives.postgresql.org/pgsql-hackers/2010-06/msg00082.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Avoid reading in b-tree pages when replaying vacuum records in hot standby mode&lt;br /&gt;
* [http://archives.postgresql.org/message-id/1272571938.4161.14739.camel@ebony &amp;lt;nowiki&amp;gt;Hot Standby tuning for btree_xlog_vacuum()&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Restructure truncation logic to be more resistant to failure&lt;br /&gt;
|This also involves not writing dirty buffers for a truncated or dropped relation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg01032.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider adding logic to increase large tables by more than 8k&lt;br /&gt;
|This would reduce file system fragmentation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2011-03/msg00337.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous Other ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Deal with encoding issues for filenames in the server filesystem&lt;br /&gt;
* {{MessageLink|20090413184335.39BE.52131E4D@oss.ntt.co.jp|a proposed patch here}}&lt;br /&gt;
* {{MessageLink|8484.1244655656@sss.pgh.pa.us|some issues about it here}}&lt;br /&gt;
* {{MessageLink|20100107103740.97A5.52131E4D@oss.ntt.co.jp|Windows-specific patch here}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Deal with encoding issues in the output of localeconv()&lt;br /&gt;
* [http://archives.postgresql.org/message-id/40c6d9160904210658y590377cfw6dbbecb53d2b8be0@mail.gmail.com bug report]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/49EF8DA0.90008@tpf.co.jp draft patch]&lt;br /&gt;
* [http://archives.postgresql.org/message-id/21710.1243620986@sss.pgh.pa.us review of patch]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide schema name and other fields available from SQL GET DIAGNOSTICS in error reports&lt;br /&gt;
* [http://archives.postgresql.org/message-id/dcc563d10810211907n3c59a920ia9eb7cd2a6d5ea58@mail.gmail.com &amp;lt;nowiki&amp;gt;How to get schema name which violates fk constraint&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-11/msg00846.php &amp;lt;nowiki&amp;gt;patch - Report the schema along table name in a referential failure 	error message&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* {{MessageLink|3191.1263306359@sss.pgh.pa.us|Re: NOT NULL violation and error-message}}&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-08/msg00213.php &amp;lt;nowiki&amp;gt;the case for machine-readable error fields&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
| Provide [http://developer.postgresql.org/pgdocs/postgres/libpq-connect.html#LIBPQ-CONNECT-FALLBACK-APPLICATION-NAME fallback_application_name] in contrib/pgbench, oid2name, and dblink.&lt;br /&gt;
* {{MessageLink|w2g9837222c1004070216u3bc46b3ahbddfdffdbfb46212@mail.gmail.com|fallback_application_name and pgbench}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add 64-bit support to /contrib/pgbench&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-07/msg00153.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg00705.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add use of 'const' for variables in source tree}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Remove warnings created by -Wcast-align}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Move platform-specific ps status display info from ps_status.c to ports}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add optional CRC checksum to heap and index pages&lt;br /&gt;
|One difficulty is how to prevent hint bit changes from affecting the computed CRC checksum.&lt;br /&gt;
* http://archives.postgresql.org/message-id/19934.1226601952%40sss.pgh.pa.us&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00002.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg01028.php &amp;lt;nowiki&amp;gt;double-buffering page writes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00524.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01101.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00011.php &amp;lt;nowiki&amp;gt;Re: Block-level CRC checks&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-11/msg00249.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider a faster CRC32 algorithm&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-05/msg01112.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow cross-compiling by generating the zic database on the target system}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve NLS maintenance of libpgport messages linked onto applications}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Use UTF8 encoding for NLS messages so all server encodings can read them properly}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow creation of universal binaries for Darwin&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00884.php &amp;lt;nowiki&amp;gt;Getting to universal binaries for Darwin&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider GnuTLS if OpenSSL license becomes a problem&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-02/msg00892.php&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-05/msg00040.php &amp;lt;nowiki&amp;gt;[PATCH] Add support for GnuTLS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-12/msg01213.php &amp;lt;nowiki&amp;gt;TODO: GNU TLS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider making NAMEDATALEN more configurable in future releases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Research use of signals and sleep wake ups&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-07/msg00003.php &amp;lt;nowiki&amp;gt;Restartable signals 'n all that&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow C++ code to more easily access backend code&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg00302.php &amp;lt;nowiki&amp;gt;Mostly Harmless: Welcoming our C++ friends&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider simplifying how memory context resets handle child contexts&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2007-08/msg00067.php &amp;lt;nowiki&amp;gt;Re: Memory leak in nodeAgg&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create three versions of libpgport to simplify client code&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-10/msg00154.php &amp;lt;nowiki&amp;gt;8.4 TODO item: make src/port support libpq and ecpg directly&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve detection of shared memory segments being used by others by checking the SysV shared memory field 'nattch'&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00656.php &amp;lt;nowiki&amp;gt;postgresql in FreeBSD jails: proposal&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00673.php &amp;lt;nowiki&amp;gt;Re: postgresql in FreeBSD jails: proposal&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement the non-threaded Avahi service discovery protocol&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00939.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-02/msg00097.php &amp;lt;nowiki&amp;gt;Re: Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg01211.php &amp;lt;nowiki&amp;gt;Re: [PATCHES] Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-04/msg00001.php &amp;lt;nowiki&amp;gt;Re: [HACKERS] Avahi support for Postgresql&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Reduce data row alignment requirements on some 64-bit systems&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-10/msg00369.php &amp;lt;nowiki&amp;gt;[WIP] Reduce alignment requirements on 64-bit systems.&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Restructure TOAST internal storage format for greater flexibility&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00049.php &amp;lt;nowiki&amp;gt;Re: PG_PAGE_LAYOUT_VERSION 5 - time for change&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Add regression tests for pg_dump/restore&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01967.php &amp;lt;nowiki&amp;gt;&amp;quot;make install-check-pg_dump&amp;quot; target in src/regress]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Research different memory allocation methods for lists&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-04/msg01467.php &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== /contrib/pg_upgrade ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Handle large object comments&lt;br /&gt;
|This is difficult to do because the large object doesn't exist when --schema-only is loaded.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider using pg_depend for checking object usage in version.c&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|If reindex is necessary, allow it to be done in parallel with pg_dump custom format&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Migrate pg_statistic by dumping it out as a flat file, so analyze is not necessary&lt;br /&gt;
|pg_class.oid is not preserved so schema.tablename must be used.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve testing, perhaps using the buildfarm&lt;br /&gt;
|The buildfarm has access to multiple versions of PostgreSQL.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Create machine-readable output of pg_controldata&lt;br /&gt;
|This would avoid parsing its output.  The problem is we need pg_controldata output from both the old and new clusters so we would need to support both formats.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Remove configure.in check for link failure when cause is found}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Remove readdir() errno patch when runtime/mingwex/dirent.c rev 1.4 is released}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow psql to use readline once non-US code pages work with backslashes}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix problem with shared memory on the Win32 Terminal Server}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve signal handling&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2005-06/msg00027.php &amp;lt;nowiki&amp;gt;Simplify Win32 Signaling code&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Convert MSVC build system to remove most batch files&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-08/msg00961.php &amp;lt;nowiki&amp;gt;MSVC build system&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Support pgxs when using MSVC}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix MSVC NLS support, like for to_char()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-02/msg00485.php &amp;lt;nowiki&amp;gt;NLS on MSVC  strikes back!&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2008-02/msg00038.php &amp;lt;nowiki&amp;gt;Fix for 8.3 MSVC locale (Was  [HACKERS] NLS on MSVC strikes back!)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Find a correct rint() substitute on Windows&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00808.php &amp;lt;nowiki&amp;gt;Minor bug in src/port/rint.c&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix global namespace issues when using multiple terminal server sessions&lt;br /&gt;
* [http://archives.postgresql.org/message-id/48F3BFCC.8030107@dunslane.net problems with Windows global namespace]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change from the current autoconf/gmake build system to cmake&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01869.php &amp;lt;nowiki&amp;gt;About CMake (was Re: [COMMITTERS] pgsql: Append major version number and for libraries soname major)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve consistency of path separator usage&lt;br /&gt;
* http://archives.postgresql.org/message-id/49C0BDC5.4010002@hagander.net&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Fix cross-compiling on Windows&lt;br /&gt;
* http://archives.postgresql.org/pgsql-bugs/2010-10/msg00110.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow multiple  Postgres clusters running on the same machine to distinguish themselves in the event log&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-03/msg01297.php&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2011-05/msg00574.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Wire Protocol Changes ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow dynamic character set handling}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add decoded type, length, precision}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Mark result columns as known-not-null when possible&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-11/msg01029.php &amp;lt;nowiki&amp;gt;Adding nullable indicator to Describe&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide more control over planner treatment of statements being prepared}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Use compression?}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Update clients to use data types, typmod, schema.table.column names of result sets using new statement protocol}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Convert single quotes to apostrophes in the PDF documentation&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2007-12/msg00059.php &amp;lt;nowiki&amp;gt;SGML docs and pdf single-quotes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a manpage for postgresql.conf&lt;br /&gt;
* {{messageLink|20080819194311.GH4428@alvh.no-ip.org|A smaller default postgresql.conf}}&lt;br /&gt;
* {{messageLink|200808211910.37524.peter_e@gmx.net|A smaller default postgresql.conf}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Change the manpage-generating toolchain to use the new XML-based docbook2x tools&lt;br /&gt;
* {{messageLink|200808211910.37524.peter_e@gmx.net|A smaller default postgresql.conf}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider changing documentation format from SGML to XML&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2006-12/msg00152.php &amp;lt;nowiki&amp;gt;Re: Authoring Tools WAS: Switching to XML&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-docs/2011-04/msg00020.php&lt;br /&gt;
* http://wiki.postgresql.org/wiki/Switching_PostgreSQL_documentation_from_SGML_to_XML&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Document support for N&amp;lt;nowiki&amp;gt;' '&amp;lt;/nowiki&amp;gt; national character string literals, if it matches the SQL standard&lt;br /&gt;
* http://archives.postgresql.org/message-id/1275895438.1849.1.camel@fsopti579.F-Secure.com&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add diagrams to the documentation&lt;br /&gt;
* http://archives.postgresql.org/pgsql-docs/2010-07/msg00001.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Exotic Features ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add pre-parsing phase that converts non-ISO syntax to supported syntax&lt;br /&gt;
|This could allow SQL written for other databases to run without modification.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow plug-in modules to emulate features from other databases}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add features of Oracle-style packages&lt;br /&gt;
|A package would be a schema with session-local variables, public/private functions, and initialization functions.  It is also possible to implement these capabilities in any schema and not use a separate &amp;amp;quot;packages&amp;amp;quot; syntax at all.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-08/msg00384.php &amp;lt;nowiki&amp;gt;proposal for PL packages for 8.3.&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider allowing control of upper/lower case folding of unquoted identifiers&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2004-04/msg00818.php &amp;lt;nowiki&amp;gt;Bringing PostgreSQL torwards the standard regarding case folding&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2006-10/msg01527.php &amp;lt;nowiki&amp;gt;Re: [SQL] Case Preservation disregarding case sensitivity?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-03/msg00849.php &amp;lt;nowiki&amp;gt;TODO Item: Consider allowing control of upper/lower case folding of unquoted,  identifiers&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00415.php &amp;lt;nowiki&amp;gt;Identifier case folding notes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg00415.php &amp;lt;nowiki&amp;gt;Identifier case folding notes&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add autonomous transactions&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-01/msg00893.php &amp;lt;nowiki&amp;gt;autonomous transactions&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Give query progress indication&lt;br /&gt;
* [[Query progress indication]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Rethink our type system&lt;br /&gt;
* [[Rethinking datatypes]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Features We Do ''Not'' Want ==&lt;br /&gt;
&lt;br /&gt;
The following features have been discussed ad nauseum on the PostgreSQL mailing lists and the consensus has been that the project is not interested in them.  As such, if you are going to bring them up as potential features, you will want to be familiar with all of the arguments against these features which have been previously made over the years.  If you decide to work on such features anyway, you should be aware that you face a higher-than-normal barrier to get the Project to accept them.&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|All backends running as threads in a single process (not wanted)&lt;br /&gt;
|This eliminates the process protection we get from the current setup. Thread creation is usually the same overhead as process creation on modern systems, so it seems unwise to use a pure threaded model, and MySQL and DB2 have demonstrated that threads introduce as many issues as they solve.  Threading specific operations such as I/O, seq scans, and connection management has been discussed and will probably be implemented to enable specific performance features.  Moving to a threaded engine would also require halting all other work on PostgreSQL for one to two years.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|&amp;quot;Oracle-style&amp;quot; optimizer hints (not wanted)&lt;br /&gt;
|Optimizer hints, as implemented in Oracle and other RDBMSes, are used to work around problems in the optimizer and introduce upgrade and maintenance issues.  We would rather have such problems reported and fixed.  We have discussed a more sophisticated system of per-class cost adjustment instead, but a specification remains to be developed. See [[OptimizerHintsDiscussion|Optimizer Hints Discussion]] for further information.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Embedded server (not wanted)&lt;br /&gt;
|While PostgreSQL clients runs fine in limited-resource environments, the server requires multiple processes and a stable pool of resources to run reliably and efficiently. Stripping down the PostgreSQL server to run in the same process address space as the client application would add too much complexity and failure cases. Besides, there are several very mature embedded SQL databases already available.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Obfuscated function source code (not wanted)&lt;br /&gt;
|Obfuscating function source code has minimal protective benefits because anyone with super-user access can find a way to view the code. At the same time, it would greatly complicate backups and other administrative tasks. To prevent non-super-users from viewing function source code, remove SELECT permission on pg_proc.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-09/msg00668.php &amp;lt;nowiki&amp;gt;Obfuscated stored procedures (was Re: Oracle and Postgresql)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Indeterminate behavior for the GROUP BY clause (not wanted)&lt;br /&gt;
|At least one other database product allows specification of a subset of the result columns which GROUP BY would need to be able to provide predictable results; the server is free to return any value from the group.  This is not viewed as a desirable feature.  PostgreSQL 9.1 will allow result columns that are not referenced by GROUP BY if a primary key for the same table is referenced in GROUP BY.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-03/msg00297.php &amp;lt;nowiki&amp;gt;Re: SQL compatibility reminder: MySQL vs PostgreSQL&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Todo]]&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/Todo:Collate</id>
		<title>Todo:Collate</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/Todo:Collate"/>
				<updated>2011-07-11T16:23:56Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;mark page as out of date&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:'''  This page is out of date; what it describes has been implemented as of 2011.  See [[Todo]] for future tasks.&lt;br /&gt;
&lt;br /&gt;
== SQL standard COLLATE support ==&lt;br /&gt;
&lt;br /&gt;
A collation is a set of rules about how a set of objects should be ordered. In general it only applies to strings because that's the only case that has any kind of debate. This is also the only case the SQL standard worries about. However, in the general case you could probably have a meaningful discussion about how geometric shapes could be ordered.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* Charset/collate support and function parameters [http://archives.postgresql.org/pgsql-hackers/2004-10/msg01006.php]&lt;br /&gt;
* Proof of concept COLLATE support with patch [http://archives.postgresql.org/pgsql-hackers/2005-09/msg00110.php]&lt;br /&gt;
* For review: Initial support for COLLATE [http://archives.postgresql.org/pgsql-patches/2005-09/msg00020.php]&lt;br /&gt;
&lt;br /&gt;
This patch covers all the catalog changes and syntax changes required for SQL complaint COLLATE support. It also has all the necesary changes for b-tree to work with these collations. The only part missing is teaching the planner what indexes may be used for what COLLATE statement, and underlying support for multiple collations (see [[Todo:ICU]]). &lt;br /&gt;
&lt;br /&gt;
This patch has severely bitrotted.&lt;br /&gt;
&lt;br /&gt;
* Removing SORTFUNC_LT/REVLT [http://archives.postgresql.org/pgsql-hackers/2005-12/msg01154.php]&lt;br /&gt;
&lt;br /&gt;
== Related todo items ==&lt;br /&gt;
&lt;br /&gt;
[[Todo:ICU|ICU collation support]]&lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
&lt;br /&gt;
* Design submitted [http://archives.postgresql.org/pgsql-hackers/2005-12/msg01121.php] - not reviewed&lt;br /&gt;
* Partial Patch - abandoned&lt;br /&gt;
&lt;br /&gt;
== Overview of changes required ==&lt;br /&gt;
&lt;br /&gt;
* The collation is a property of a column, not of a value. At any point in a query only a single collation is current. So fields need to be added to the executor to track this.&lt;br /&gt;
* Functions need to know what collation their arguments are, so a field is to be added to the fmgr structure.&lt;br /&gt;
* Changes to grammer to allow:&lt;br /&gt;
** CREATE TABLE .. ( ..., field ''COLLATE &amp;lt;collation&amp;gt;'', ... )&lt;br /&gt;
** ALTER TABLE&lt;br /&gt;
** CREATE INDEX .. ON ( field ''COLLATE &amp;lt;collation&amp;gt;'' )&lt;br /&gt;
** CREATE INDEX .. ON ( (expr ''COLLATE &amp;lt;collation&amp;gt;'') )&lt;br /&gt;
** expr :: expr ''COLLATE &amp;lt;collation&amp;gt;''&lt;br /&gt;
** Possibly: CREATE COLLATE ..&lt;br /&gt;
&lt;br /&gt;
== Discussion ==&lt;br /&gt;
&lt;br /&gt;
PostgreSQL currently only supports one collation at a time, as fixed by the LC_COLLATE variable at the time the database cluster is initialised. Note that this is intrinsically broken because you can choose the encoding per database but usually collation implementations only work on a particular encoding. It's also a major problem because virtually all databases have some strings that should be considered as plain ascii strings (such as path names, urls, or even codes like 'Y' and 'N') even if they have localizable strings as well.&lt;br /&gt;
&lt;br /&gt;
POSIX collation support basically consists of two functions: strxfrm() and strcoll(). The former takes a string and converts it to another string that can be passed to strcmp() to do the actual comparison. The following statement is true:&lt;br /&gt;
&lt;br /&gt;
strcoll(a,b) == strcmp( strxfrm(a), strxfrm(b) )&lt;br /&gt;
&lt;br /&gt;
POSIX collation only works on the current locale. This is somewhat restrictive, so most major operating systems have provided variation that work with multiple locales. This includes Win32, Linux/glibc and Mac OS X. OSes which don't include the BSDs, HPUX and Solaris. &lt;br /&gt;
&lt;br /&gt;
For this reason you can actually hack multi-locale sorting in some operating systems using a pg_strxfrm() function and creating a functional index on that. [http://archives.postgresql.org/pgsql-hackers/2005-01/msg00813.php]&lt;br /&gt;
&lt;br /&gt;
However, it is undesirable to have the COLLATE support depend on which platform you are running. It is possible to call setlocale() repeatedly, though the performance will be variable across platforms. It would be fine on glibc but abysmal on solaris, for example. It should be possible to defend against performance problems when only one locale is actively being used in a given query though.&lt;br /&gt;
&lt;br /&gt;
Supporting [[Todo:ICU|ICU]] would give us uniform support across all platforms.&lt;br /&gt;
&lt;br /&gt;
== Possible Problems ==&lt;br /&gt;
&lt;br /&gt;
Fill me in...&lt;br /&gt;
&lt;br /&gt;
[[Category:Todo detail|Collate]]&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/Switching_PostgreSQL_documentation_from_SGML_to_XML</id>
		<title>Switching PostgreSQL documentation from SGML to XML</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/Switching_PostgreSQL_documentation_from_SGML_to_XML"/>
				<updated>2011-04-05T18:46:13Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;Created page with &amp;quot;For about the last 10 years, there have been occasional discussions about switching the PostgreSQL documentation from SGML to XML (whatever that might mean).  Here are some point…&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For about the last 10 years, there have been occasional discussions about switching the PostgreSQL documentation from SGML to XML (whatever that might mean).  Here are some points to consider.&lt;br /&gt;
&lt;br /&gt;
== Technical points ==&lt;br /&gt;
There is a distinction between changing the source format from SGML to XML versus switching the tool chain from DSSSL to XSLT.  Even though DSSSL is typically associated with SGML and XSLT with XML, in fact all combinations work more or less equally well.&lt;br /&gt;
&lt;br /&gt;
== Arguments on SGML vs XML ==&lt;br /&gt;
* DocBook 5, the next major version, will no longer publish an SGML DTD.  But DocBook 5 has been in the works for years and it might be many more years until it is the standard version and all previous versions have disappeared.&lt;br /&gt;
* SGML is easier to edit than XML, because of tag minimization and some other simplifications.&lt;br /&gt;
* SGML supports conditional sections (used to build the INSTALL file, for example).  That needs a different solution for XML.&lt;br /&gt;
* There might be more editing tools that support XML, but this needs to be substantiated.&lt;br /&gt;
* Translation teams are using XML.&lt;br /&gt;
* We'd probably want to rename *.sgml -&amp;gt; *.xml.  Easier now with Git, but needs some planning.&lt;br /&gt;
&lt;br /&gt;
== Arguments on DSSSL vs XSLT ==&lt;br /&gt;
* The DSSSL tools have been unmaintained for years.&lt;br /&gt;
* Small question marks on FOP (XSLT to PDF tool): Is it maintained, is there a stable version (as opposed to endless development pre-releases), can it run on an entirely free Java installation?&lt;br /&gt;
* The customizations that we have done to the DSSSL stylesheets would have to be ported to XSLT.  This work could start already.&lt;br /&gt;
* The XSLT build is currently a ''lot'' slower than the DSSSL build.&lt;br /&gt;
* XSLT might offer more flexibility such as partial builds.&lt;br /&gt;
* There are probably more tools that work with XSLT in various ways.&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/Python</id>
		<title>Python</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/Python"/>
				<updated>2011-03-18T19:09:57Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;update psycopg version support&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are several Python drivers for PostgreSQL.  This is the incomplete feature matrix for them; please help complete it as you see fit.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Software&lt;br /&gt;
!License&lt;br /&gt;
!Platforms&lt;br /&gt;
!Python versions&lt;br /&gt;
!DB API 2.0&lt;br /&gt;
!Native (uses libpq)&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|[[Psycopg]]&lt;br /&gt;
|LGPL&lt;br /&gt;
|Unix, Win32&lt;br /&gt;
|2.4-3.2&lt;br /&gt;
|yes&lt;br /&gt;
|yes&lt;br /&gt;
|Most popular libpq-based driver&lt;br /&gt;
|-&lt;br /&gt;
|[http://www.pygresql.org/ PyGreSQL]&lt;br /&gt;
|BSD&lt;br /&gt;
|Unix, Win32&lt;br /&gt;
|2.3-2.6&lt;br /&gt;
|yes&lt;br /&gt;
|yes&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[http://code.google.com/p/ocpgdb/ ocpgdb]&lt;br /&gt;
|BSD&lt;br /&gt;
|Unix&lt;br /&gt;
|2.3-2.6&lt;br /&gt;
|yes&lt;br /&gt;
|yes&lt;br /&gt;
|PG8.1+&lt;br /&gt;
|-&lt;br /&gt;
|[http://python.projects.postgresql.org py-postgresql]&lt;br /&gt;
|BSD&lt;br /&gt;
|any (pure Python)&lt;br /&gt;
|3.0+&lt;br /&gt;
|yes&lt;br /&gt;
|no&lt;br /&gt;
|pure Python with optional C accelerator modules, extensive custom API&lt;br /&gt;
|-&lt;br /&gt;
|[http://barryp.org/software/bpgsql/ bpgsql ]&lt;br /&gt;
|LGPL&lt;br /&gt;
|any (pure Python)&lt;br /&gt;
|2.3-2.6&lt;br /&gt;
|yes&lt;br /&gt;
|no&lt;br /&gt;
|labeled alpha&lt;br /&gt;
|-&lt;br /&gt;
|[http://pybrary.net/pg8000/ pg8000]&lt;br /&gt;
|BSD&lt;br /&gt;
|any (pure Python)&lt;br /&gt;
|2.5+ / 3.0+&lt;br /&gt;
|yes&lt;br /&gt;
|no&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Obsolete/stalled:&lt;br /&gt;
* [http://jamwt.com/pgasync/ pgasync], no updates since 2005&lt;br /&gt;
* [http://sourceforge.net/projects/popy/ PoPy], no updates since 2003&lt;br /&gt;
* [http://pypgsql.sourceforge.net/ pyPgSQL], no updates since 2006&lt;br /&gt;
&lt;br /&gt;
There is [http://wiki.python.org/moin/PostgreSQL similar page on the Python wiki]&lt;br /&gt;
&lt;br /&gt;
[[Python PostgreSQL Driver TODO]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Python]]&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/PostgreSQL_9.1_Open_Items</id>
		<title>PostgreSQL 9.1 Open Items</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/PostgreSQL_9.1_Open_Items"/>
				<updated>2011-01-21T15:23:09Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;added raise protocol version number&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Project Planning ==&lt;br /&gt;
See the [[PostgreSQL 9.1 Development Plan]].&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
Issues to reconsider or recheck sometime later in the development cycle:&lt;br /&gt;
&lt;br /&gt;
* [[standard_conforming_strings]] -- readiness of drivers and applications&lt;br /&gt;
* {{MessageLink|4CEA5A0F.1030602@enterprisedb.com|do latches have memory-ordering problems?}}&lt;br /&gt;
* {{MessageLink|201011271931.oARJVV427882@momjian.us|GIST rewrite vs. pg_upgrade}}&lt;br /&gt;
* Review &amp;quot;Long Term&amp;quot; list of items from [[PostgreSQL 9.0 Open Items]]&lt;br /&gt;
* {{MessageLink|29244.1295376372@sss.pgh.pa.us|DO blocks leak memory}}&lt;br /&gt;
* {{MessageLink|1293977249.5984.17.camel@vanquo.pezone.net|raise protocol version number}}&lt;br /&gt;
&lt;br /&gt;
[[Category:PostgreSQL 9.1]]&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/Alpha_release_notes_draft</id>
		<title>Alpha release notes draft</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/Alpha_release_notes_draft"/>
				<updated>2010-12-27T21:42:27Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;New page: The third alpha release for PostgreSQL version 9.1, 9.1alpha3, is now available. This alpha release contains several new major features added since the alpha2 release. Please download, ins...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The third alpha release for PostgreSQL version 9.1, 9.1alpha3, is now&lt;br /&gt;
available. This alpha release contains several new major features added&lt;br /&gt;
since the alpha2 release. Please download, install, and test it to give&lt;br /&gt;
us early feedback on the features being developed for the future&lt;br /&gt;
versions of PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
Features added in 9.1alpha3 since alpha2 include:&lt;br /&gt;
&lt;br /&gt;
* KNN GiST, otherwise known as order-by-operator support for GiST, to optimize nearest-neighbor searches&lt;br /&gt;
&lt;br /&gt;
* Additional instrumentation and monitoring facilities&lt;br /&gt;
&lt;br /&gt;
* Several new built-in functions: format(), pg_read_binary_file(), pg_describe_object()&lt;br /&gt;
&lt;br /&gt;
* New libpq functions: PQping(), PQlibVersion()&lt;br /&gt;
&lt;br /&gt;
* The capability to produce crash dumps on Windows&lt;br /&gt;
&lt;br /&gt;
More detail is available in the release notes:&lt;br /&gt;
http://developer.postgresql.org/pgdocs/postgres/release-9-1-alpha.html&lt;br /&gt;
&lt;br /&gt;
These new features mean that we need you to participate in testing them.&lt;br /&gt;
If you are able to help with organized alpha testing, please see the&lt;br /&gt;
Alpha/Beta testing page: http://wiki.postgresql.org/wiki/HowToBetaTest&lt;br /&gt;
&lt;br /&gt;
Alpha releases are not stable and should never be used in production;&lt;br /&gt;
they are for testing new features only. There is no guarantee that any&lt;br /&gt;
features or APIs present in the alphas will be present, or the same, in&lt;br /&gt;
the final release.&lt;br /&gt;
&lt;br /&gt;
Alpha release information page:&lt;br /&gt;
http://www.postgresql.org/developer/alpha&lt;br /&gt;
&lt;br /&gt;
Download the alpha release here:&lt;br /&gt;
http://www.postgresql.org/ftp/source/v9.1alpha3/&lt;br /&gt;
&lt;br /&gt;
Alpha releases are primarily made in source code form only. Binary&lt;br /&gt;
packages for some operating systems will be prepared in the coming days.&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policy</id>
		<title>PostgreSQL Release Support Policy</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/PostgreSQL_Release_Support_Policy"/>
				<updated>2010-12-16T20:21:45Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;EOL PostgreSQL 8.1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The PostgreSQL project aims to fully support a major release for '''five years''', under the terms of the [http://www.postgresql.org/support/versioning Versioning policy]&lt;br /&gt;
&lt;br /&gt;
After a release falls out of full support, we may (at our committers' discretion) continue to apply further critical fixes to the source code, on a best-effort basis.  No formal releases or binary packages will be produced by the project, but the updated source code will be available from our source code control system.&lt;br /&gt;
&lt;br /&gt;
This policy will be followed on a best-effort basis. In extreme cases it may not be possible to support a release for the planned lifetime; for example if a serious bug is found that cannot be resolved in a given major version without significant risk to the stability of the code or loss of application compatibility. In such cases, early retirement of a major version may be required.&lt;br /&gt;
&lt;br /&gt;
The first version update released after the EOL date will normally be the final one for that version.  Note that this can extend support shortly past the listed date.  For example, [http://www.postgresql.org/docs/7.4/static/release.html 7.4.30] and [http://www.postgresql.org/docs/8.0/static/release.html 8.0.26] were the EOL releases for those two versions.  They were originally targeted for EOL as of July 2010, but those final versions were not actually released until October 2010.&lt;br /&gt;
&lt;br /&gt;
=== End Of Life (EOL) dates ===&lt;br /&gt;
&lt;br /&gt;
Releases which have already reached an EOL release are italicized:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Version&lt;br /&gt;
!EOL Date&lt;br /&gt;
!Release Date&lt;br /&gt;
|-&lt;br /&gt;
|''PostgreSQL 7.4''&lt;br /&gt;
|October 2010 (extended)&lt;br /&gt;
|November 2003&lt;br /&gt;
|-&lt;br /&gt;
|''PostgreSQL 8.0''&lt;br /&gt;
|October 2010 (extended)&lt;br /&gt;
|January 2005&lt;br /&gt;
|-&lt;br /&gt;
|''PostgreSQL 8.1''&lt;br /&gt;
|November 2010&lt;br /&gt;
|November 2005&lt;br /&gt;
|-&lt;br /&gt;
|PostgreSQL 8.2&lt;br /&gt;
|December 2011&lt;br /&gt;
|December 2006&lt;br /&gt;
|-&lt;br /&gt;
|PostgreSQL 8.3&lt;br /&gt;
|February 2013&lt;br /&gt;
|February 2008&lt;br /&gt;
|-&lt;br /&gt;
|PostgreSQL 8.4&lt;br /&gt;
|July 2014&lt;br /&gt;
|July 2009&lt;br /&gt;
|-&lt;br /&gt;
|PostgreSQL 9.0&lt;br /&gt;
|September 2015&lt;br /&gt;
|September 2010&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: Versions 8.1 and earlier are [http://www.postgresql.org/about/news.865 not supported] on Windows platforms.&lt;/div&gt;</summary>
		<author><name>Petere</name></author>	</entry>

	<entry>
		<id>http://wiki.postgresql.org/wiki/Todo</id>
		<title>Todo</title>
		<link rel="alternate" type="text/html" href="http://wiki.postgresql.org/wiki/Todo"/>
				<updated>2010-10-29T06:48:49Z</updated>
		
		<summary type="html">&lt;p&gt;Petere:&amp;#32;Add email link to Change foreign key constraint for array -&amp;gt; element to mean element in array?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;margin: 1ex 1em; float: right;&amp;quot;&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This list contains '''all known PostgreSQL bugs and feature requests'''. If you would like to work on an item, please read the [[Developer FAQ]] first. There is also a [[Development_information|development information page]].&lt;br /&gt;
&lt;br /&gt;
* {{TodoPending}} - marks ordinary, incomplete items&lt;br /&gt;
* {{TodoEasy}} - marks items that are easier to implement&lt;br /&gt;
* {{TodoDone}} - marks changes that are done, and will appear in the PostgreSQL 9.1 release.&lt;br /&gt;
&lt;br /&gt;
For help on editing this list, please see [[Talk:Todo]]. &amp;lt;b&amp;gt;Please do not add items here without discussion on the mailing list.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding: 1ex 4em;&amp;quot;&amp;gt;&lt;br /&gt;
== Administration ==&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow administrators to cancel multi-statement idle transactions&lt;br /&gt;
|This allows locks to be released, but it is complex to report the cancellation back to the client.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-12/msg01340.php &amp;lt;nowiki&amp;gt;Cancelling idle in transaction state&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-12/msg00441.php &amp;lt;nowiki&amp;gt;Re: Cancelling idle in transaction state&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Check for unreferenced table files created by transactions that were in-progress when the server terminated abruptly&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-patches/2006-06/msg00096.php &amp;lt;nowiki&amp;gt;Removing unreferenced files&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Set proper permissions on non-system schemas during db creation&lt;br /&gt;
|Currently all schemas are owned by the super-user because they are copied from the template1 database.  However, since all objects are inherited from the template database, it is not clear that setting schemas to the db owner is correct.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow log_min_messages to be specified on a per-module basis&lt;br /&gt;
|This would allow administrators to see more detailed information from specific sections of the backend, e.g. checkpoints, autovacuum, etc. Another idea is to allow separate configuration files for each module, or allow arbitrary SET commands to be passed to them. See also [[Logging Brainstorm]].}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Simplify ability to create partitioned tables&lt;br /&gt;
|This would allow creation of partitioned tables without requiring creation of triggers or rules for INSERT/UPDATE/DELETE, and constraints for rapid partition selection.  Options could include range and hash partition selection. See also [[Table partitioning]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow auto-selection of partitioned tables for min/max() operations&lt;br /&gt;
|There was a patch on -hackers from July 2009, but it has not been merged: [http://archives.postgresql.org/pgsql-hackers/2009-07/msg01115.php &amp;lt;nowiki&amp;gt;MIN/MAX optimization for partitioned table&amp;lt;/nowiki&amp;gt;]}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow custom variables to appear in pg_settings()&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00850.php &amp;lt;nowiki&amp;gt;Re: count(*) performance improvement ideas&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Have custom variables be transaction safe&lt;br /&gt;
* {{MessageLink|4B577E9F.8000505@dunslane.net|Custom GUCs still a bit broken}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Implement the SQL standard mechanism whereby REVOKE ROLE revokes only the privilege granted by the invoking role, and not those granted by other roles&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-bugs/2007-05/msg00010.php &amp;lt;nowiki&amp;gt;Re: Grantor name gets lost when grantor role dropped&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve server security options&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01875.php &amp;lt;nowiki&amp;gt;Re: [0/4] Proposal of SE-PostgreSQL patches&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-05/msg00000.php &amp;lt;nowiki&amp;gt;Re: [0/4] Proposal of SE-PostgreSQL patches&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Prevent query cancel packets from being replayed by an attacker, especially when using SSL&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-08/msg00345.php &amp;lt;nowiki&amp;gt;Replay attack of query cancel&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Provide a way to query the log collector subprocess to determine what the currently active log file is&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-general/2008-11/msg00418.php &amp;lt;nowiki&amp;gt;Current log files when rotating?&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow the client to authenticate the server in a Unix-domain socket connection, e.g., using SO_PEERCRED&lt;br /&gt;
* http://archives.postgresql.org/message-id/20090401173756.GB21229@svana.org&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow custom daemons to be automatically stopped/started along postmaster&lt;br /&gt;
|This allows easier administration of daemons like user job schedulers or replication-related daemons.&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2010-02/msg01701.php &amp;lt;nowiki&amp;gt;Re: scheduler in core&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Configuration files ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemDone&lt;br /&gt;
|Allow pg_hba.conf to specify host names along with IP addresses&lt;br /&gt;
|Host name lookup could occur when the postmaster reads the pg_hba.conf file, or when the backend starts.  Another solution would be to reverse lookup the connection IP and check that hostname against the host names in pg_hba.conf. We could also then check that the host name maps to the IP address. &lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00569.php &amp;lt;nowiki&amp;gt;TODO Item: Allow pg_hba.conf to specify host names along with IP addresses&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-08/msg00613.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow postgresql.conf file values to be changed via an SQL API, perhaps using SET GLOBAL&lt;br /&gt;
* http://archives.postgresql.org/pgsql-hackers/2010-10/msg00764.php&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow the server to be stopped/restarted via an SQL API}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Consider normalizing fractions in postgresql.conf, perhaps using '%'&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-06/msg00550.php &amp;lt;nowiki&amp;gt;Fractions in GUC variables&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow Kerberos to disable stripping of realms so we can check the username@realm against multiple realms&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2007-11/msg00009.php &amp;lt;nowiki&amp;gt;krb_match_realm patch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add functions to check correctness of configuration files before they are loaded &amp;quot;live&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Improve LDAP authentication configuration options&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg01745.php &amp;lt;nowiki&amp;gt;Proposed Patch - LDAPS support for servers on port 636 w/o TLS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add external tool to auto-tune some postgresql.conf parameters&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-06/msg00000.php &amp;lt;nowiki&amp;gt;Re: Overhauling GUCS&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-11/msg00033.php &amp;lt;nowiki&amp;gt;Simple postgresql.conf wizard&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Add 'hostgss' pg_hba.conf option to allow GSS link-level encryption&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-07/msg01454.php &amp;lt;nowiki&amp;gt;Re: Plans for 8.4&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Process pg_hba.conf keywords as case-insensitive&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-09/msg00432.php &amp;lt;nowiki&amp;gt;More robust pg_hba.conf parsing/error logging&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Tablespaces ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow a database in tablespace t1 with tables created in tablespace t2 to be used as a template for a new database created with default tablespace t2&lt;br /&gt;
|Currently all objects in the default database tablespace must have default tablespace specifications. This is because new databases are created by copying directories. If you mix default tablespace tables and tablespace-specified tables in the same directory, creating a new database from such a mixed directory would create a new database with tables that had incorrect explicit tablespaces.  To fix this would require modifying pg_class in the newly copied database, which we don't currently do.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow reporting of which objects are in which tablespaces&lt;br /&gt;
|This item is difficult because a tablespace can contain objects from multiple databases. There is a server-side function that returns the databases which use a specific tablespace, so this requires a tool that will call that function and connect to each database to find the objects in each database for that tablespace.}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow WAL replay of CREATE TABLESPACE to work when the directory structure on the recovery computer is different from the original}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow per-tablespace quotas}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Collector ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Allow statistics last vacuum/analyze execution times to be displayed without requiring track_counts to be enabled&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-docs/2007-04/msg00028.php &amp;lt;nowiki&amp;gt;row-level stats and last analyze time&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
|Clear table counters on TRUNCATE&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2008-04/msg00169.php &amp;lt;nowiki&amp;gt;Small TRUNCATE glitch&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItem&lt;br /&gt;
| Allow the clearing of cluster-level statistics&lt;br /&gt;
* [http://archives.postgresql.org/pgsql-hackers/2009-03/msg00917.php &amp;lt;nowiki&amp;gt;Resetting cluster-wide statistics&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
* ''pg_stat_reset_shared('bgwriter')'' (9.0) now handles the ''pg_stat_bgwriter'' subset of this&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{TodoEndSubsection}}&lt;br /&gt;
&lt;br /&gt;
=== Point-In-Time Recovery (PITR) ===&lt;br /&gt;
{{TodoSubsection}}&lt;br /&gt;
&lt;br /&gt;
{{TodoItemEasy&lt;br /&gt;
|Create dump tool for write-a