]> granicus.if.org Git - postgresql/blobdiff - doc/TODO
Add question mark:
[postgresql] / doc / TODO
index 0c5c80cdd7fb14c131c76614d78caa646949acb8..56e22ff9357e66245c2e87f6849c7feaa22c3b07 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -2,12 +2,12 @@
 PostgreSQL TODO List
 ====================
 Current maintainer:    Bruce Momjian (pgman@candle.pha.pa.us)
-Last updated:          Fri Sep 16 12:46:03 EDT 2005
+Last updated:          Sat Apr 29 21:45:16 EDT 2006
 
 The most recent version of this document can be viewed at
 http://www.postgresql.org/docs/faqs.TODO.html.
 
-#A hyphen, "-", marks changes that will appear in the upcoming 8.1 release.#
+#A hyphen, "-", marks changes that will appear in the upcoming 8.2 release.#
 #A percent sign, "%", marks items that are easier to implement.#
 
 Bracketed items, "[]", have more detail.
@@ -20,12 +20,11 @@ first.
 Administration
 ==============
 
-* %Remove behavior of postmaster -o after making postmaster/postgres
-  flags unique
-* %Allow pooled connections to list all prepared queries
+* %Remove behavior of postmaster -o
+* -%Allow pooled connections to list all prepared statements
 
   This would allow an application inheriting a pooled connection to know
-  the queries prepared in the current session.
+  the statements prepared in the current session.
 
 * Allow major upgrades without dump/reload, perhaps using pg_upgrade 
   [pg_upgrade]
@@ -47,6 +46,19 @@ Administration
 * Support table partitioning that allows a single table to be stored
   in subtables that are partitioned based on the primary key or a WHERE
   clause
+* Add function to report the time of the most recent server reload
+* Allow statistics collector information to be pulled from the collector
+  process directly, rather than requiring the collector to write a
+  filesystem file twice a second?
+* Allow log_min_messages to be specified on a per-module basis
+
+  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.
+
+* -Re-enable the GUC full_page_writes in 8.2 when reliability issues have
+  been addressed
 
 
 * Improve replication solutions
@@ -62,25 +74,31 @@ Administration
 
 * Configuration files
 
-       o %Add "include file" functionality in postgresql.conf
+       o -Add "include file" functionality in postgresql.conf
        o %Allow commenting of variables in postgresql.conf to restore them
          to defaults
 
          Currently, if a variable is commented out, it keeps the
          previous uncommented value until a server restarted.
 
-       o %Allow pg_hba.conf settings to be controlled via SQL
+       o %Allow per-database permissions to be set via GRANT
+
+         Allow database connection checks based on GRANT rules in
+         addition to the existing access checks in pg_hba.conf.
 
-         This would add a function to load the SQL table from
-          pg_hba.conf, and one to writes its contents to the flat file.
-         The table should have a line number that is a float so rows
-         can be inserted between existing rows, e.g. row 2.5 goes
-         between row 2 and row 3.
+       o Allow pg_hba.conf to specify host names along with IP addresses
+
+         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.
 
        o %Allow postgresql.conf file values to be changed via an SQL
          API, perhaps using SET GLOBAL
        o Allow the server to be stopped/restarted via an SQL API
-       o Issue a warning if a change-on-restart-only postgresql.conf value
+       o -Issue a warning if a change-on-restart-only postgresql.conf value
          is modified  and the server config files are reloaded
        o Mark change-on-restart-only values in postgresql.conf
 
@@ -134,17 +152,19 @@ Administration
            pg_stop_backup() is called or the server is stopped
 
            Doing this will allow administrators to know more easily when
-           the archive contins all the files needed for point-in-time
+           the archive contains all the files needed for point-in-time
            recovery.
 
          o %Create dump tool for write-ahead logs for use in determining
            transaction id for point-in-time recovery
-         o Allow a warm standby system to also allow read-only queries
+         o Allow a warm standby system to also allow read-only statements
            [pitr]
 
            This is useful for checking PITR recovery.
 
          o Allow the PITR process to be debugged and data examined
+         o Add reporting of the current WAL file, perhaps as part of
+           partial log file archiving
 
 
 Monitoring
@@ -157,6 +177,7 @@ Monitoring
 
 * %Add ability to monitor the use of temporary sort files
 * Allow server logs to be remotely read and removed using SQL commands
+* Allow protocol-level BIND parameter values to be logged
 
 
 Data Types
@@ -167,7 +188,7 @@ Data Types
   Change the MONEY data type to use DECIMAL internally, with special
   locale-aware output formatting.
 
-* Change NUMERIC to enforce the maximum precision, and increase it
+* Change NUMERIC to enforce the maximum precision
 * Add NUMERIC division operator that doesn't round?
 
   Currently NUMERIC _rounds_ the result to the specified precision.  
@@ -179,25 +200,22 @@ Data Types
   The positive modulus result returned by NUMERICs might be considered
   inaccurate, in one sense.
 
-* Have sequence dependency track use of DEFAULT sequences,
-  seqname.nextval?
 * %Disallow changing default expression of a SERIAL column?
+* %Disallow ALTER SEQUENCE changes for SERIAL sequences because pg_dump
+  does not dump the changes
 * Fix data types where equality comparison isn't intuitive, e.g. box
-* %Prevent INET cast to CIDR if the unmasked bits are not zero, or
-  zero the bits
-* %Prevent INET cast to CIDR from droping netmask, SELECT '1.1.1.1'::inet::cidr
-* Allow INET + INT4 to increment the host part of the address, or
+* -Zero umasked bits in conversion from INET cast to CIDR
+* -Prevent INET cast to CIDR from dropping netmask, SELECT '1.1.1.1'::inet::cidr
+* -Allow INET + INT8 to increment the host part of the address or
   throw an error on overflow
-* %Add 'tid != tid ' operator for use in corruption recovery
+* -Add 'tid != tid ' operator for use in corruption recovery
 * Allow user-defined types to specify a type modifier at table creation
   time
 
 
 * Dates and Times
 
-       o Allow infinite dates just like infinite timestamps
-       o Add a GUC variable to allow output of interval values in ISO8601 
-         format
+       o Allow infinite dates and intervals just like infinite timestamps
        o Merge hardwired timezone names with the TZ database; allow either 
          kind everywhere a TZ name is currently taken
        o Allow customization of the known set of TZ names (generalize the
@@ -209,15 +227,45 @@ Data Types
          computations should adjust based on the time zone rules.
 
        o Fix SELECT '0.01 years'::interval, '0.01 months'::interval
+       o Add a GUC variable to allow output of interval values in ISO8601 
+         format
+       o Improve timestamptz subtraction to be DST-aware
+
+         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.
+
+       o Fix interval display to support values exceeding 2^31 hours
+       o Add overflow checking to timestamp and interval arithmetic    
        o Add ISO INTERVAL handling
-               o Add support for day-time syntax, INTERVAL '1 2:03:04' DAY TO 
+               o -Add support for day-time syntax, INTERVAL '1 2:03:04' DAY TO 
                  SECOND
+               o Support ISO INTERVAL syntax if units cannot be determined from
+                 the string, and are supplied after the string
+
+                 The SQL standard states that the units after the string
+                 specify the units of the string, e.g. INTERVAL '2' MINUTE
+                 should return '00:02:00'. The current behavior has the units
+                 restrict the interval value to the specified unit or unit
+                 range, INTERVAL '70' SECOND returns '00:00:10'.
+
+                 For syntax that isn't uniquely ISO or PG syntax, like '1' or
+                 '1:30', treat as ISO if there is a range specification clause,
+                 and as PG if there no clause is present, e.g. interpret '1:30'
+                 MINUTE TO SECOND as '1 minute 30 seconds', and interpret
+                 '1:30' as '1 hour, 30 minutes'.
+
+                 This makes common cases like SELECT INTERVAL '1' MONTH
+                 SQL-standard results. The SQL standard supports a limited
+                 number of unit combinations and doesn't support unit names in
+                 the string. The PostgreSQL syntax is more flexible in the
+                 range of units supported, e.g. PostgreSQL supports '1 year 1
+                 hour', while the SQL standard does not.
+
                o Add support for year-month syntax, INTERVAL '50-6' YEAR TO MONTH
-               o For syntax that isn't uniquely ISO or PG syntax, like '1:30' or
-                 '1', treat as ISO if there is a range specification clause,
-                 and as PG if there no clause is present, e.g. interpret 
-                         '1:30' MINUTE TO SECOND as '1 minute 30 seconds', and 
-                         interpret '1:30' as '1 hour, 30 minutes'
                o Interpret INTERVAL '1 year' MONTH as CAST (INTERVAL '1 year' AS
                  INTERVAL MONTH), and this should return '12 months'
                o Round or truncate values to the requested precision, e.g.
@@ -227,7 +275,7 @@ Data Types
 
 * Arrays
 
-       o Allow NULLs in arrays
+       o -Allow NULLs in arrays
        o Delay resolution of array expression's data type so assignment
          coercion can be performed on empty array expressions
 
@@ -249,7 +297,7 @@ Functions
 =========
 
 * Allow INET subnet tests using non-constants to be indexed
-* Add transaction_timestamp(), statement_timestamp(), clock_timestamp()
+* -Add transaction_timestamp(), statement_timestamp(), clock_timestamp()
   functionality
 
   Current CURRENT_TIMESTAMP returns the start time of the current
@@ -257,8 +305,14 @@ Functions
   make time reporting more consistent and will allow reporting of
   the statement start time.
 
-* %Add pg_get_acldef(), pg_get_typedefault(), and pg_get_attrdef()
-* Allow to_char() to print localized month names
+* %Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),
+  pg_get_tabledef(), pg_get_domaindef(), pg_get_functiondef()
+* -Allow to_char() to print localized month names
+* Allow to_date() and to_timestamp() accept localized month names
+* Add missing parameter handling in to_char()
+
+       http://archives.postgresql.org/pgsql-hackers/2005-12/msg00948.php
+
 * Allow functions to have a schema search path specified at creation time
 * Allow substring/replace() to get/set bit values
 * Allow to_char() on interval values to accumulate the highest unit
@@ -274,7 +328,10 @@ Functions
        o to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') => 0:1:19:20
        o to_char(INTERVAL '3 years 5 months','MM') => 41
 
-* Add sleep() function, remove from regress.c
+* -Add sleep() function, remove from regress.c
+* -Allow user-defined functions retuning a domain value to enforce domain
+  constraints
+* Add SPI_gettypmod() to return the typemod for a TupleDesc
 
 
 Multi-Language Support
@@ -302,10 +359,10 @@ Multi-Language Support
 Views / Rules
 =============
 
-* %Automatically create rules on views so they are updateable, per SQL99
+* Automatically create rules on views so they are updateable, per SQL99
 
   We can only auto-create rules for simple views.  For more complex
-  cases users will still have to write rules.
+  cases users will still have to write rules manually.
 
 * Add the functionality for WITH CHECK OPTION clause of CREATE VIEW
 * Allow NOTIFY in rules involving conditionals
@@ -323,7 +380,7 @@ SQL Commands
 * Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT
 * Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY
 * %Allow SET CONSTRAINTS to be qualified by schema/table name
-* %Allow TRUNCATE ... CASCADE/RESTRICT
+* -Allow TRUNCATE ... CASCADE/RESTRICT
 
   This is like DELETE CASCADE, but truncates.
 
@@ -333,8 +390,8 @@ SQL Commands
   called, and the table is locked in exclusive mode.
 
 * Allow PREPARE of cursors
-* Allow PREPARE to automatically determine parameter types based on the SQL
-  statement
+* -Allow PREPARE to automatically determine parameter types based on the SQL
+  statement (Neil)
 * Allow finer control over the caching of prepared query plans
 
   Currently, queries prepared via the libpq API are planned on first
@@ -343,6 +400,8 @@ SQL Commands
   manually or automatically when statistics for execute parameters
   differ dramatically from those used during planning.
 
+* Invalidate prepared queries, like INSERT, when the table definition
+  is altered
 * Allow LISTEN/NOTIFY to store info in memory rather than tables?
 
   Currently LISTEN/NOTIFY information is stored in pg_listener. Storing
@@ -355,13 +414,31 @@ SQL Commands
   information.
 
 * Add a GUC variable to warn about non-standard SQL usage in queries
-* Add MERGE command that does UPDATE/DELETE, or on failure, INSERT (rules,
-  triggers?)
+* Add SQL-standard MERGE command, typically used to merge two tables
+  [merge]
+
+  This is similar to UPDATE, then for unmatched rows, INSERT.
+  Whether concurrent access allows modifications which could cause
+  row loss is implementation independent.
+
+* Add REPLACE or UPSERT command that does UPDATE, or on failure, INSERT
+  [merge]
+
+  To implement this cleanly requires that the table have a unique index
+  so duplicate checking can be easily performed.  It is possible to
+  do it without a unique index if we require the user to LOCK the table
+  before the MERGE.
+
 * Add NOVICE output level for helpful messages like automatic sequence/index
   creation
-* %Add COMMENT ON for all cluster global objects (roles, databases
+* -Add COMMENT ON for all cluster global objects (roles, databases
   and tablespaces)
-* %Make row-wise comparisons work per SQL spec
+* -Make row-wise comparisons work per SQL spec
+
+  Right now, '(a, b) < (1, 2)' is processed as 'a < 1 and b < 2', but
+  the SQL standard requires it to be processed as a column-by-column
+  comparison, so the proper comparison is '(a < 1) OR (a = 1 AND b < 2)'.
+
 * Add RESET CONNECTION command to reset all session state
 
   This would include resetting of all variables (RESET ALL), dropping of
@@ -373,11 +450,26 @@ SQL Commands
   is for this to be a protocol-only feature.  Another approach is to 
   notify the protocol when a RESET CONNECTION command is used.
 
-* Add GUC to issue notice about queries that use unjoined tables
+* Add GUC to issue notice about statements that use unjoined tables
 * Allow EXPLAIN to identify tables that were skipped because of 
   constraint_exclusion
 * Allow EXPLAIN output to be more easily processed by scripts
-* Eventually enable escape_string_warning and standard_conforming_strings
+* -Enable escape_string_warning and standard_conforming_strings
+* Make standard_conforming_strings the default in 8.3?
+
+  When this is done, backslash-quote should be prohibited in non-E''
+  strings because of possible confusion over how such strings treat
+  backslashes.  Basically, '' is always safe for a literal single
+  quote, while \' might or might not be based on the backslash
+  handling rules.
+
+* Simplify dropping roles that have objects in several databases
+* Allow COMMENT ON to accept an expression rather than just a string
+* Allow the count returned by SELECT, etc to be to represent as an int64
+  to allow a higher range of values
+* Make CLUSTER preserve recently-dead tuples per MVCC requirements
+* Add SQL99 WITH clause to SELECT
+* Add SQL99 WITH RECURSIVE to SELECT
 
 
 * CREATE
@@ -386,16 +478,13 @@ SQL Commands
          expressions like SELECT col1 || col2
        o Use more reliable method for CREATE DATABASE to get a consistent
          copy of db?
-       o Add ON COMMIT capability to CREATE TABLE AS ... SELECT
+       o -Add ON COMMIT capability to CREATE TABLE AS ... SELECT
 
 
 * UPDATE
        o Allow UPDATE to handle complex aggregates [update]?
-       o Allow an alias to be provided for the target table in
-         UPDATE/DELETE
-
-         This is not SQL-spec but many DBMSs allow it.
-
+       o -Allow an alias to be provided for the target table in
+         UPDATE/DELETE (Neil)
        o Allow UPDATE tab SET ROW (col, ...) = (...) for updating multiple
          columns
 
@@ -414,9 +503,13 @@ SQL Commands
          Currently non-global system tables must be in the default database
          tablespace. Global system tables can never be moved.
 
-       o %Disallow dropping of an inherited constraint
-       o %Prevent child tables from altering or dropping constraints 
+       o Prevent parent tables from altering or dropping constraints
+         like CHECK that are inherited by child tables unless CASCADE
+         is used
+       o %Prevent child tables from altering or dropping constraints
           like CHECK that were inherited from the parent table
+       o Have ALTER INDEX update the name of a constraint using that index
+       o Add ALTER TABLE RENAME CONSTRAINT, update index name also
 
 
 * CLUSTER
@@ -425,7 +518,7 @@ SQL Commands
 
          This might require some background daemon to maintain clustering
          during periods of low usage. It might also require tables to be only
-         paritally filled for easier reorganization.  Another idea would
+         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
@@ -444,7 +537,7 @@ SQL Commands
          This requires the use of a savepoint before each COPY line is
          processed, with ROLLBACK on COPY failure.
 
-       o %Have COPY return the number of rows loaded/unloaded?
+       o -Have COPY return the number of rows loaded/unloaded?
        o Allow COPY on a newly-created table to skip WAL logging
 
          On crash recovery, the table involved in the COPY would
@@ -453,6 +546,11 @@ SQL Commands
          the table at the same time, which is something that is 
          currently allowed.
 
+       o Allow COPY to output from views
+
+         Another idea would be to allow actual SELECT statements in a COPY.
+
+
 * GRANT/REVOKE
 
        o Allow column-level privileges
@@ -466,6 +564,8 @@ SQL Commands
        * Allow GRANT/REVOKE permissions to be inherited by objects based on
          schema permissions
 
+       * Allow SERIAL sequences to inherit permissions from the base table?
+
 
 * CURSOR
 
@@ -479,7 +579,7 @@ SQL Commands
        o Prevent DROP TABLE from dropping a row referenced by its own open
          cursor?
 
-       o %Allow pooled connections to list all open WITH HOLD cursors
+       o -Allow pooled connections to list all open WITH HOLD cursors
 
          Because WITH HOLD cursors exist outside transactions, this allows
          them to be listed so they can be closed.
@@ -514,22 +614,20 @@ SQL Commands
        o Add table function support to pltcl, plpython
        o Add capability to create and call PROCEDURES
        o Allow PL/pgSQL to handle %TYPE arrays, e.g. tab.col%TYPE[]
-       o Allow function argument names to be queries from PL/PgSQL
+       o Allow function argument names to be statements from PL/PgSQL
        o Add MOVE to PL/pgSQL
        o Add support for polymorphic arguments and return types to
          languages other than PL/PgSQL
        o Add support for OUT and INOUT parameters to languages other 
          than PL/PgSQL
        o Add single-step debugging of PL/PgSQL functions
+       o Allow PL/PgSQL to support WITH HOLD cursors
 
 
 Clients
 =======
 
-* Add a libpq function to support Parse/DescribeStatement capability
-* Prevent libpq's PQfnumber() from lowercasing the column name?
-* Add PQescapeIdentifier() to libpq
-* Have initdb set the input DateStyle (MDY or DMY) based on locale?
+* -Have initdb set the input DateStyle (MDY or DMY) based on locale
 * Have pg_ctl look at PGHOST in case it is a socket directory?
 * Allow pg_ctl to work properly with configuration files located outside
   the PGDATA directory
@@ -549,39 +647,66 @@ Clients
          This would allow non-psql clients to pull the same information out
          of the database as psql.
 
-       o Fix psql's display of schema information (Neil)
+       o Fix psql's \d commands more consistent
+
+         http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php
+         http://archives.postgresql.org/pgsql-hackers/2004-11/msg00014.php
+
        o Allow psql \pset boolean variables to set to fixed values, rather
          than toggle
        o Consistently display privilege information for all objects in psql
-       o Improve psql's handling of multi-line queries
+       o -Improve psql's handling of multi-line statements
 
-         Currently, while \e saves a single query as one entry, interactive
-         queries are saved one line at a time.  Ideally all queries
-         whould be saved like \e does.
+         Currently, while \e saves a single statement as one entry, interactive
+         statements are saved one line at a time.  Ideally all statements
+         would be saved like \e does.
 
-       o Allow multi-line column values to align in the proper columns
+       o -Allow multi-line column values to align in the proper columns
 
          If the second output column value is 'a\nb', the 'b' should appear
          in the second display column, rather than the first column as it
          does now.
 
+       o Display IN, INOUT, and OUT parameters in \df+
+
+         It probably requires psql to output newlines in the proper
+         column, which is already on the TODO list.
+
+       o Add auto-expanded mode so expanded output is used if the row
+         length is wider than the screen width.  
+
+         Consider using auto-expanded mode for backslash commands like \df+.
+
+       o Prevent tab completion of SET TRANSACTION from querying the
+         database and therefore preventing the transaction isolation
+         level from being set.
+
+         Currently, SET <tab> 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.
+
 
 * pg_dump
 
-       o %Have pg_dump use multi-statement transactions for INSERT dumps
        o %Allow pg_dump to use multiple -t and -n switches [pg_dump]
-       o %Add dumping of comments on composite type columns
-       o %Add dumping of comments on index columns
-       o %Replace crude DELETE FROM method of pg_dumpall --clean for 
-          cleaning of roles with separate DROP commands
-       o Stop dumping CASCADE on DROP TYPE commands in clean mode
+       o %Add dumping of comments on index columns and composite type columns
        o %Add full object name to the tag field.  eg. for operators we need
          '=(integer, integer)', instead of just '='.
        o Add pg_dumpall custom format dumps?
        o %Add CSV output format
-       o Update pg_dump and psql to use the new COPY libpq API (Christopher)
+       o -Update pg_dump and psql to use the new COPY libpq API (Christopher)
        o Remove unnecessary function pointer abstractions in pg_dump source
          code
+       o Allow selection of individual object(s) of all types, not just
+         tables
+       o In a selective dump, allow dumping of an object and all its 
+         dependencies
+       o Add options like pg_restore -l and -L to pg_dump
+       o Stop dumping CASCADE on DROP TYPE commands in clean mode
+       o Allow pg_dump --clean to drop roles that own objects or have
+         privileges
+       o Add -f to pg_dumpall
 
 
 * ecpg
@@ -601,6 +726,38 @@ Clients
        o Make SET CONNECTION thread-aware, non-standard?
        o Allow multidimensional arrays
        o Add internationalized message strings
+       o Add COPY TO STDIN / STDOUT handling
+
+
+* libpq
+
+       o Add a function to support Parse/DescribeStatement capability
+       o Add PQescapeIdentifier()
+       o Prevent PQfnumber() from lowercasing unquoted the column name
+
+         PQfnumber() should never have been doing lowercasing, but 
+         historically it has so we need a way to prevent it
+
+       o Allow statement results to be automatically batched to the client
+
+         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.
+
+       o Add new version of PQescapeString() that doesn't double backslashes
+         that are part of a client-only multibyte sequence
+
+         Single-quote is not a valid byte in any supported client-only
+         encoding.  This requires using mblen() to determine if the 
+         backslash is inside or outside a multi-byte sequence.
+
+       o Add new version of PQescapeString() that doesn't double
+         backslashes when standard_conforming_strings is true and
+         non-E strings are used
 
 
 Referential Integrity
@@ -642,7 +799,13 @@ Referential Integrity
 Dependency Checking
 ===================
 
-* Flush cached query plans when the dependent objects change
+* Flush cached query plans when the dependent objects change,
+  when the cardinality of parameters changes dramatically, or
+  when new ANALYZE statistics are available
+
+  A more complex solution would be to save multiple plans for different
+  cardinality and use the appropriate plan based on the EXECUTE values.
+
 * Track dependencies in function bodies and recompile/invalidate
 
   This is particularly important for references to temporary tables
@@ -655,8 +818,6 @@ Dependency Checking
 Exotic Features
 ===============
 
-* Add SQL99 WITH clause to SELECT
-* Add SQL99 WITH RECURSIVE to SELECT
 * Add pre-parsing phase that converts non-ISO syntax to supported
   syntax
 
@@ -666,14 +827,14 @@ Exotic Features
 * Allow plug-in modules to emulate features from other databases
 * SQL*Net listener that makes PostgreSQL appear as an Oracle database
   to clients
-* Allow queries across databases or servers with transaction
+* Allow statements across databases or servers with transaction
   semantics
 
   This can be done using dblink and two-phase commit.
 
 * Add the features of packages
 
-       o  Make private objects accessable only to objects in the same schema
+       o  Make private objects accessible only to objects in the same schema
        o  Allow current_schema.objname to access current schema objects
        o  Add session variables
        o  Allow nested schemas
@@ -712,10 +873,23 @@ Indexes
 * Allow accurate statistics to be collected on indexes with more than
   one column or expression indexes, perhaps using per-index statistics
 * Add fillfactor to control reserved free space during index creation
-* Allow the creation of indexes with mixed ascending/descending specifiers
+* Allow the creation of indexes with mixed ascending/descending
+  specifiers
+
+  This is possible now by creating an operator class with reversed sort
+  operators.  One complexity is that NULLs would then appear at the start
+  of the result set, and this might affect certain sort types, like
+  merge join.
+
 * Allow constraint_exclusion to work for UNIONs like it does for
-  inheritance, allow it to work for UPDATE and DELETE queries, and allow
-  it to be used for all queries with little performance impact
+  inheritance, allow it to work for UPDATE and DELETE statements, and allow
+  it to be used for all statements with little performance impact
+* Allow CREATE INDEX to take an additional parameter for use with
+  special index types
+* Consider compressing indexes by storing key values duplicated in
+  several rows as a single index entry
+
+  This is difficult because it requires datatype-specific knowledge.
 
 
 * GIST
@@ -749,7 +923,8 @@ Fsync
 * Determine optimal fdatasync/fsync, O_SYNC/O_DSYNC options
 
   Ideally this requires a separate test program that can be run
-  at initdb time or optionally later.
+  at initdb time or optionally later.  Consider O_SYNC when
+  O_DIRECT exists.
 
 * %Add an option to sync() before fsync()'ing checkpoint files
 * Add program to test if fsync has a delay compared to non-fsync
@@ -775,24 +950,35 @@ Cache Usage
   faster than a sequential scan it must avoid access to the heap
   to obtain tuple visibility information.
 
+* Add estimated_count(*) to return an estimate of COUNT(*)
+
+  This would use the planner ANALYZE statistics to return an estimated
+  count.
+
 * Allow data to be pulled directly from indexes
 
   Currently indexes do not have enough tuple visibility information 
   to allow data to be pulled from the index without also accessing 
-  the heap.  One way to allow this is to set a bit to index tuples 
+  the heap.  One way to allow this is to set a bit on index tuples 
   to indicate if a tuple is currently visible to all transactions 
   when the first valid heap lookup happens.  This bit would have to 
-  be cleared when a heap tuple is expired.
+  be cleared when a heap tuple is expired.  
 
+  Another idea is to maintain a bitmap of heap pages where all rows
+  are visible to all backends, and allow index lookups to reference 
+  that bitmap to avoid heap lookups, perhaps the same bitmap we might
+  add someday to determine which heap pages need vacuuming.  Frequently
+  accessed bitmaps would have to be stored in shared memory.  One 8k
+  page of bitmaps could track 512MB of heap pages.
 
-* Consider automatic caching of queries at various levels:
+* Consider automatic caching of statements at various levels:
 
        o Parsed query tree
        o Query execute plan
        o Query results
 
 * Allow sequential scans to take advantage of other concurrent
-  sequentiqal scans, also called "Synchronised Scanning"
+  sequential scans, also called "Synchronised Scanning"
 
   One possible implementation is to start sequential scans from the lowest
   numbered buffer in the shared cache, and when reaching the end wrap
@@ -805,7 +991,7 @@ Vacuum
 
 * Improve speed with indexes
 
-  For large table adjustements during VACUUM FULL, it is faster to 
+  For large table adjustments during VACUUM FULL, it is faster to 
   reindex rather than update the index.
 
 * Reduce lock time during VACUUM FULL by moving tuples with read lock,
@@ -828,7 +1014,11 @@ Vacuum
   index entry) might be slow and unreliable, especially for user-defined
   index functions.
 
-* %Add system view to show free space map contents
+* -Add system view to show free space map contents
+* Allow FSM to return free space toward the beginning of the heap file,
+  in hopes that empty pages at the end can be truncated by VACUUM
+* Allow FSM page return free space based on table clustering, to assist
+  in maintaining clustering?
 
 
 * Auto-vacuum
@@ -838,33 +1028,33 @@ Vacuum
          empty?
        o Improve xid wraparound detection by recording per-table rather
          than per-database
+       o Consider logging activity either to the logs or a system view
 
 
 Locking
 =======
 
-* Add code to detect an SMP machine and handle spinlocks accordingly
-  from distributted.net, http://www1.distributed.net/source,
-  in client/common/cpucheck.cpp
-
-  On SMP machines, it is possible that locks might be released shortly,
-  while on non-SMP machines, the backend should sleep so the process
-  holding the lock can complete and release it.
-
-* Research use of sched_yield() for spinlock acquisition failure
 * Fix priority ordering of read and write light-weight locks (Neil)
 
 
 Startup Time Improvements
 =========================
 
-* Experiment with multi-threaded backend [thread]
+* Experiment with multi-threaded backend for backend creation [thread]
 
   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,
+  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 query faster.
+  a single session using multiple threads to execute a statement faster.
+
+* Experiment with multi-threaded backend better resource utilization
+
+  This would allow a single query to make use of multiple CPU's or
+  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.
 
 * Add connection pooling
 
@@ -897,11 +1087,13 @@ Write-Ahead Log
           into a partially-written page, but later the full page will be
           replaced from WAL.
 
+* Allow WAL traffic to be streamed to another server for stand-by
+  replication
 * Reduce WAL traffic so only modified values are written rather than
   entire rows?
 * Allow the pg_xlog directory location to be specified during initdb
   with a symlink back to the /data location
-* Allow WAL information to recover corrupted pg_controldata
+* -Allow WAL information to recover corrupted pg_controldata
 * Find a way to reduce rotational delay when repeatedly writing
   last WAL page
 
@@ -918,11 +1110,30 @@ Write-Ahead Log
   remove the 'fsync' parameter (which results in an an inconsistent
   database) in favor of this capability.
 
+* Allow WAL logging to be turned off for a table, but the table
+  might be dropped or truncated during crash recovery [walcontrol]
+
+  Allow tables to bypass WAL writes and just fsync() dirty pages on
+  commit.  This should be implemented using ALTER TABLE, e.g. ALTER 
+  TABLE PERSISTENCE [ DROP | TRUNCATE | DEFAULT ].  Tables using 
+  non-default logging should not use referential integrity with 
+  default-logging tables.  A table without dirty buffers during a
+  crash could perhaps avoid the drop/truncate.
+
+* Allow WAL logging to be turned off for a table, but the table would
+  avoid being truncated/dropped [walcontrol]
+
+  To do this, only a single writer can modify the table, and writes 
+  must happen only on new pages so the new pages can be removed during
+  crash recovery.  Readers can continue accessing the table.  Such 
+  tables probably cannot have indexes.  One complexity is the handling 
+  of indexes on TOAST tables.
+
 
 Optimizer / Executor
 ====================
 
-* Add missing optimizer selectivities for date, r-tree, etc
+* Improve selectivity functions for geometric operators
 * Allow ORDER BY ... LIMIT # to select high/low value without sort or
   index using a sequential scan for highest/lowest values
 
@@ -937,9 +1148,10 @@ Optimizer / Executor
 * Have EXPLAIN ANALYZE highlight poor optimizer estimates
 * Consider using hash buckets to do DISTINCT, rather than sorting
 
-  This would be beneficial when there are few distinct values.
+  This would be beneficial when there are few distinct values.  This is
+  already used by GROUP BY.
 
-* Log queries where the optimizer row estimates were dramatically
+* Log statements where the optimizer row estimates were dramatically
   different from the number of rows actually found?
 
 
@@ -990,6 +1202,7 @@ Miscellaneous Performance
 
 * Research storing disk pages with no alignment/padding
 
+
 Source Code
 ===========
 
@@ -1006,9 +1219,8 @@ Source Code
 * Acquire lock on a relation before building a relcache entry for it
 * %Promote debug_query_string into a server-side function current_query()
 * %Allow the identifier length to be increased via a configure option
-* Remove Win32 rename/unlink looping if unnecessary
 * Allow cross-compiling by generating the zic database on the target system
-* Improve NLS maintenace of libpgport messages linked onto applications
+* Improve NLS maintenance of libpgport messages linked onto applications
 * Allow ecpg to work with MSVC and BCC
 * Add xpath_array() to /contrib/xml2 to return results as an array
 * Allow building in directories containing spaces
@@ -1016,7 +1228,7 @@ Source Code
   This is probably not possible because 'gmake' and other compiler tools
   do not fully support quoting of paths with spaces.
 
-* Allow installing to directories containing spaces
+* -Allow installing to directories containing spaces
 
   This is possible if proper quoting is added to the makefiles for the
   install targets.  Because PostgreSQL supports relocatable installs, it
@@ -1024,10 +1236,17 @@ Source Code
   spaces and then copy the install to a directory with spaces.
 
 * Fix sgmltools so PDFs can be generated with bookmarks
-* %Clean up compiler warnings (especially with gcc version 4)
-* Add function to return the thread safety status of libpq and ecpg
+* -%Clean up compiler warnings (especially with gcc version 4)
 * Use UTF8 encoding for NLS messages so all server encodings can
   read them properly
+* Update Bonjour to work with newer cross-platform SDK
+* -Remove BeOS and QNX-specific code
+* Split out libpq pgpass and environment documentation sections to make
+  it easier for non-developers to find
+* Improve port/qsort() to handle sorts with 50% unique and 50% duplicate
+  value [qsort]
+
+  This involves choosing better pivot points for the quicksort.
 
 
 * Win32
@@ -1042,6 +1261,18 @@ Source Code
        o Re-enable timezone output on log_line_prefix '%t' when a
          shorter timezone string is available
        o Fix problem with shared memory on the Win32 Terminal Server
+       o Improve signal handling,
+         http://archives.postgresql.org/pgsql-patches/2005-06/msg00027.php
+       o Add long file support for binary pg_dump output
+
+         While Win32 supports 64-bit files, the MinGW API does not,
+         meaning we have to build an fseeko replacement on top of the
+         Win32 API, and we have to make sure MinGW handles it.  Another
+         option is to wait for the MinGW project to fix it, or use the
+         code from the LibGW32C project as a guide.
+
+       o Port contrib/xml2
+       o Check WSACancelBlockingCall() for interrupts (win32intr)
 
 
 * Wire Protocol Changes
@@ -1050,7 +1281,7 @@ Source Code
        o Add decoded type, length, precision
        o Use compression?
        o Update clients to use data types, typmod, schema.table.column names
-         of result sets using new query protocol
+         of result sets using new statement protocol
 
 
 ---------------------------------------------------------------------------
@@ -1063,12 +1294,10 @@ Developers who have claimed items are:
 * Bruce is Bruce Momjian <pgman@candle.pha.pa.us> of Software Research Assoc.
 * Christopher is Christopher Kings-Lynne <chriskl@familyhealth.com.au> of
     Family Health Network
-* Claudio is Claudio Natoli <claudio.natoli@memetrics.com>
 * D'Arcy is D'Arcy J.M. Cain <darcy@druid.net> of The Cain Gang Ltd.
 * Fabien is Fabien Coelho <coelho@cri.ensmp.fr>
 * Gavin is Gavin Sherry <swm@linuxworld.com.au> of Alcove Systems Engineering
 * Greg is Greg Sabino Mullane <greg@turnstep.com>
-* Hiroshi is Hiroshi Inoue <Inoue@tpf.co.jp>
 * Jan is Jan Wieck <JanWieck@Yahoo.com> of Afilias, Inc.
 * Joe is Joe Conway <mail@joeconway.com>
 * Karel is Karel Zak <zakkr@zf.jcu.cz>
@@ -1084,4 +1313,5 @@ Developers who have claimed items are:
 * Simon is Simon Riggs <simon@2ndquadrant.com>
 * Stephan is Stephan Szabo <sszabo@megazone23.bigpanda.com>
 * Tatsuo is Tatsuo Ishii <t-ishii@sra.co.jp> of Software Research Assoc.
+* Teodor is Teodor Sigaev <teodor@sigaev.ru>
 * Tom is Tom Lane <tgl@sss.pgh.pa.us> of Red Hat