]> granicus.if.org Git - postgresql/blobdiff - doc/TODO
Add question mark:
[postgresql] / doc / TODO
index b38a717f1e24a1149ac3f71ff6402a667882b431..56e22ff9357e66245c2e87f6849c7feaa22c3b07 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -2,7 +2,7 @@
 PostgreSQL TODO List
 ====================
 Current maintainer:    Bruce Momjian (pgman@candle.pha.pa.us)
-Last updated:          Fri Feb  3 22:23:19 EST 2006
+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.
@@ -50,6 +50,15 @@ Administration
 * 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
@@ -65,20 +74,26 @@ 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
@@ -148,6 +163,8 @@ Administration
            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
@@ -184,19 +201,21 @@ Data Types
   inaccurate, in one sense.
 
 * %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
 * -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 + INT4 to increment the host part of the address, or
+* -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 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
@@ -208,7 +227,6 @@ Data Types
          computations should adjust based on the time zone rules.
 
        o Fix SELECT '0.01 years'::interval, '0.01 months'::interval
-       o Fix SELECT INTERVAL '1' MONTH
        o Add a GUC variable to allow output of interval values in ISO8601 
          format
        o Improve timestamptz subtraction to be DST-aware
@@ -223,14 +241,31 @@ Data Types
        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.
@@ -262,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
@@ -272,7 +307,12 @@ Functions
 
 * %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_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
@@ -289,7 +329,7 @@ Functions
        o to_char(INTERVAL '3 years 5 months','MM') => 41
 
 * -Add sleep() function, remove from regress.c
-* Allow user-defined functions retuning a domain value to enforce domain
+* -Allow user-defined functions retuning a domain value to enforce domain
   constraints
 * Add SPI_gettypmod() to return the typemod for a TupleDesc
 
@@ -319,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
@@ -340,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.
 
@@ -350,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
@@ -360,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
@@ -389,7 +431,7 @@ SQL Commands
 
 * 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
 
@@ -412,7 +454,15 @@ SQL Commands
 * 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
@@ -428,7 +478,7 @@ 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
@@ -453,8 +503,10 @@ 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
@@ -485,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
@@ -595,17 +647,21 @@ 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 statements
+       o -Improve psql's handling of multi-line statements
 
          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
@@ -633,14 +689,13 @@ Clients
 
 * 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 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
@@ -671,9 +726,10 @@ 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
+libpq
 
        o Add a function to support Parse/DescribeStatement capability
        o Add PQescapeIdentifier()
@@ -692,6 +748,17 @@ 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
 =====================
@@ -806,7 +873,14 @@ 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 statements, and allow
   it to be used for all statements with little performance impact
@@ -940,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
@@ -962,7 +1040,7 @@ Locking
 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
@@ -970,6 +1048,14 @@ Startup Time Improvements
   Solaris) might benefit from threading.  Also explore the idea of
   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
 
   It is unclear if this should be done inside the backend code or done
@@ -1007,7 +1093,7 @@ Write-Ahead Log
   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
 
@@ -1024,19 +1110,24 @@ Write-Ahead Log
   remove the 'fsync' parameter (which results in an an inconsistent
   database) in favor of this capability.
 
-* Allow control over which tables are WAL-logged [walcontrol]
+* 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.  To do this, only a single writer can modify the table, and
-  writes must happen only on new pages.  Readers can continue accessing
-  the table.  This would affect COPY, and perhaps INSERT/UPDATE too.
-  Another option is to avoid transaction logging entirely and truncate 
-  or drop the table on crash recovery.  These should be implemented 
-  using ALTER TABLE, e.g. ALTER TABLE PERSISTENCE [ DROP | TRUNCATE | 
-  STABLE | DEFAULT ].  Tables using non-default logging should not use
-  referential integrity with default-logging tables, and tables using
-  stable logging probably can not have indexes.  One complexity is
-  the handling of indexes on TOAST tables.
+  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
@@ -1129,7 +1220,7 @@ Source Code
 * %Promote debug_query_string into a server-side function current_query()
 * %Allow the identifier length to be increased via a configure option
 * 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
@@ -1145,11 +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)
+* -%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
@@ -1174,6 +1271,9 @@ Source Code
          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