TODO 12.5 KB
Newer Older
1 2
TODO list for PostgreSQL
========================
Bruce Momjian's avatar
Bruce Momjian committed
3
Last updated:		Tue Sep 21 15:54:14 EDT 1999
Marc G. Fournier's avatar
Marc G. Fournier committed
4

Bruce Momjian's avatar
Bruce Momjian committed
5
Current maintainer:	Bruce Momjian (maillist@candle.pha.pa.us)
Marc G. Fournier's avatar
Marc G. Fournier committed
6

Bruce Momjian's avatar
Bruce Momjian committed
7
The most recent version of this document can be viewed at
Bruce Momjian's avatar
Bruce Momjian committed
8
the PostgreSQL web site, http://www.PostgreSQL.org.
Bruce Momjian's avatar
Bruce Momjian committed
9

10
A dash(-) marks changes that will appear in the next release.
Bruce Momjian's avatar
Bruce Momjian committed
11

Bruce Momjian's avatar
Bruce Momjian committed
12

Marc G. Fournier's avatar
Marc G. Fournier committed
13 14
RELIABILITY
-----------
15 16 17

RESOURCES

Bruce Momjian's avatar
Bruce Momjian committed
18
* Elog() does not free all its memory(Jan)
19
* spinlock stuck problem when elog(FATAL) and elog(ERROR) inside bufmgr
Bruce Momjian's avatar
Bruce Momjian committed
20
* Recover or force failure when disk space is exhausted
21 22 23 24 25 26

PARSER

* Disallow inherited columns with the same name as new columns
* INSERT INTO ... SELECT with AS columns matching result columns problem
* SELECT pg_class FROM pg_class generates strange error
Bruce Momjian's avatar
Bruce Momjian committed
27
* Alter TABLE ADD COLUMN does not honor DEFAULT, add CONSTRAINT
28 29
* Do not allow bpchar column creation without length
* Select a[1] FROM test fails, it needs test.a[1]
Bruce Momjian's avatar
Bruce Momjian committed
30
* -Array index references without table name cause problems
Bruce Momjian's avatar
Bruce Momjian committed
31
	(see TODO.detail/array)
32
* Update table SET table.value = 3 fails
33
* Creating index of TIMESTAMP & RELTIME fails, or rename to DATETIME(Thomas)
34
* SELECT foo UNION SELECT foo is incorrectly simplified to SELECT foo
Bruce Momjian's avatar
Bruce Momjian committed
35 36
* -INSERT ... SELECT ... GROUP BY groups by target columns not source columns
* -CREATE TABLE test (a char(5) DEFAULT text '', b int4) fails on INSERT
Bruce Momjian's avatar
Bruce Momjian committed
37
* UNION with LIMIT fails
38 39
* Unique index on base column not honored on inserts from inherited table
  INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail
Bruce Momjian's avatar
Bruce Momjian committed
40
  (see TODO.detail/inherit)
Bruce Momjian's avatar
Bruce Momjian committed
41
* CREATE TABLE x AS SELECT 1 UNION SELECT 2 fails
Bruce Momjian's avatar
Bruce Momjian committed
42
* CREATE TABLE test(col char(2) DEFAULT user) fails in length restriction
Bruce Momjian's avatar
Bruce Momjian committed
43 44
* mismatched types in CREATE TABLE ... DEFAULT causes problems
	(see TODO.detail/default)
Bruce Momjian's avatar
Bruce Momjian committed
45
* SELECT ... UNION ... ORDER BY fails when sort expr not in result list
Bruce Momjian's avatar
Bruce Momjian committed
46 47
* Be smarter about promoting types when UNION merges different data types
* SELECT ... UNION ... GROUP BY fails if column types disagree
Bruce Momjian's avatar
Bruce Momjian committed
48
* redesign INSERT ... SELECT to have two levels of target list
Bruce Momjian's avatar
Bruce Momjian committed
49
* -select * from pg_class where oid in (0,-1)
Bruce Momjian's avatar
Bruce Momjian committed
50
* have INTERSECT/EXCEPT prevent duplicates unless ALL is specified
51 52 53 54

VIEWS

* Views containing aggregates sometimes fail(Jan)
Bruce Momjian's avatar
Bruce Momjian committed
55
* Views with spaces in view name fail when referenced
Bruce Momjian's avatar
Bruce Momjian committed
56

57 58 59 60
MISC

* User who can create databases can modify pg_database table
* Plpgsql does not handle quoted mixed-case identifiers
Bruce Momjian's avatar
Bruce Momjian committed
61
* Fix btree to give a useful elog when key > 1/2 (page - overhead)
Bruce Momjian's avatar
Bruce Momjian committed
62
* pg_dump should preserve primary key information
Marc G. Fournier's avatar
Marc G. Fournier committed
63 64 65

ENHANCEMENTS
------------
66 67 68

URGENT

Bruce Momjian's avatar
Bruce Momjian committed
69 70
* Add referential integrity(Jan?)(see TODO.detail/primary)
* Add OUTER joins, left and right(see TODO.detail/outer)(Thomas, Bruce)
Bruce Momjian's avatar
Bruce Momjian committed
71
* Allow long tuples by chaining or auto-storing outside db (chaining,large objs)
72
* Eliminate limits on query length
Bruce Momjian's avatar
Bruce Momjian committed
73
* Fix memory leak for expressions?, aggregates?(see TODO.detail/memory)(Tom?)
Bruce Momjian's avatar
Bruce Momjian committed
74

75 76
ADMIN

Bruce Momjian's avatar
Bruce Momjian committed
77
* Better interface for adding to pg_group
78
* More access control over who can create tables and access the database
Bruce Momjian's avatar
Bruce Momjian committed
79 80 81 82
* Add syslog functionality
* Allow elog() to return error codes, not just messages
* Allow international error message support and add error codes
* Generate postmaster pid file and remove flock/fcntl lock code
Bruce Momjian's avatar
Bruce Momjian committed
83 84
	(see TODO.detail/flock)
* Add ability to specifiy location of lock/socket files (see TODO.detail/flock)
Bruce Momjian's avatar
Bruce Momjian committed
85

86 87
TYPES

Bruce Momjian's avatar
Bruce Momjian committed
88 89 90 91
* Add BIT, BIT VARYING
* Nchar (as distinguished from ordinary varchar),
* Domain capability
* Add STDDEV/VARIANCE() function for standard deviation computation/variance
92 93
* Allow compression of large fields or a compressed field type
* Large objects
94 95
	o Fix large object mapping scheme, own typeid or reltype(Peter)
	o Allow large text type to use large objects(Peter)
Bruce Momjian's avatar
Bruce Momjian committed
96 97
	o Not to stuff everything as files in a single directory, hash dirs
	o Allow large object vacuuming
98
	o Tables that start with xinv confused to be large objects
Bruce Momjian's avatar
Bruce Momjian committed
99 100 101 102 103 104
* Allow pg_descriptions when creating types, tables, columns, and functions
* Add IPv6 capability to INET/CIDR types
* Make a separate SERIAL type?
* Store binary-compatible type information in the system
* Allow user to define char1 column
* Add support for & operator
105 106
* Allow LOCALE on a per-column basis, default to ASCII
* Allow array on int8[]
Bruce Momjian's avatar
Bruce Momjian committed
107
* Allow nulls in arrays
108
* Remove Money type, add money formatting for decimal type
109
* Declare typein/out functions in pg_proc with a special "C string" data type
110
* Add non-large-object binary field
Bruce Momjian's avatar
Bruce Momjian committed
111
* Add index on NUMERIC/DECIMAL type
Bruce Momjian's avatar
Bruce Momjian committed
112
* Make Absolutetime/Relativetime int4 because time_t can be int8 on some ports
Bruce Momjian's avatar
Bruce Momjian committed
113
* Functions returning sets don't really work right(see TODO.detail/functions)
114 115

VIEWS
Bruce Momjian's avatar
Bruce Momjian committed
116

Bruce Momjian's avatar
Bruce Momjian committed
117
* Allow DISTINCT on views
Bruce Momjian's avatar
Bruce Momjian committed
118
* Allow views of aggregate columns
Bruce Momjian's avatar
Bruce Momjian committed
119 120
* Allow views with subselects

121
INDEXES
Bruce Momjian's avatar
Bruce Momjian committed
122 123

* Allow CREATE INDEX zman_index ON test (date_trunc( 'day', zman ) datetime_ops)
124
  fails index can't store constant parameters
Bruce Momjian's avatar
Bruce Momjian committed
125 126 127 128
* Allow creation of functional indexes to use default types
* Permissions on indexes - prevent them?
* Allow SQL function indexes
* Add FILLFACTOR to index creation
129 130 131 132
* Allow indexing of LIKE with localle character sets
* Allow indexing of more than eight columns

COMMANDS
Bruce Momjian's avatar
Bruce Momjian committed
133 134

* ALTER TABLE ADD COLUMN to inherited table put column in wrong place
Bruce Momjian's avatar
Bruce Momjian committed
135
	(see TODO.detail/inherit)
Bruce Momjian's avatar
Bruce Momjian committed
136
* Add ALTER TABLE DROP/ALTER COLUMN feature
Bruce Momjian's avatar
Bruce Momjian committed
137 138
* Allow CLUSTER on all tables at once, and improve CLUSTER, loses NOT
	NULL specification on table(see TODO.detail/cluster)
139
* Generate error on CREATE OPERATOR of ~~, ~ and and ~*
Bruce Momjian's avatar
Bruce Momjian committed
140
* Add SIMILAR TO to allow character classes, 'pg_[a-c]%'
Bruce Momjian's avatar
Bruce Momjian committed
141
* Auto-destroy sequence on DROP of table with SERIAL(Ryan)
Bruce Momjian's avatar
Bruce Momjian committed
142 143
* Allow LOCK TABLE tab1, tab2, tab3 so all tables locked in unison
* Allow INSERT/UPDATE of system-generated oid value for a row
Bruce Momjian's avatar
Bruce Momjian committed
144
* Allow ESCAPE '\' at the end of LIKE for ANSI compliance(see TODO.detail/like)
Bruce Momjian's avatar
Bruce Momjian committed
145
* Rewrite the LIKE handling by rewriting the user string with the 
Bruce Momjian's avatar
Bruce Momjian committed
146
  supplied ESCAPE(see TODO.detail/like)
Bruce Momjian's avatar
Bruce Momjian committed
147
* Move LIKE index optimization handling to the optimizer
Bruce Momjian's avatar
Bruce Momjian committed
148
* Allow RULE recompilation
Bruce Momjian's avatar
Bruce Momjian committed
149
* Support UNION/INTERSECT/EXCEPT in sub-selects
Bruce Momjian's avatar
Bruce Momjian committed
150
  
151 152
CLIENTS

Bruce Momjian's avatar
Bruce Momjian committed
153
* Make NULL's come out at the beginning or end depending on the 
154
  ORDER BY direction
Bruce Momjian's avatar
Bruce Momjian committed
155
* Allow flag to control COPY input/output of NULLs
Bruce Momjian's avatar
Bruce Momjian committed
156
* Update reltuples from COPY command
Bruce Momjian's avatar
Bruce Momjian committed
157 158
* Allow psql \copy to allow delimiters
* Add a function to return the last inserted oid, for use in psql scripts
Bruce Momjian's avatar
Bruce Momjian committed
159
* Allow psql to print nulls as distinct from ""(see TODO.detail/nulls)
Bruce Momjian's avatar
Bruce Momjian committed
160
* PQrequestCancel() be able to terminate backend waiting for lock
Bruce Momjian's avatar
Bruce Momjian committed
161

162 163 164 165 166 167 168
EXOTIC FEATURES

* Add sql3 recursive unions
* Add the concept of dataspaces
* Add replication of distributed databases
* Allow queries across multiple databases

169 170
MISC

Bruce Momjian's avatar
Bruce Momjian committed
171
* Increase identifier length(NAMEDATALEN) if small performance hit
Bruce Momjian's avatar
Bruce Momjian committed
172 173 174
* Allow row re-use without vacuum(Vadim)
* Create a background process for each database that runs while
  database is idle, finding superceeded rows, gathering stats and vacuuming
Bruce Momjian's avatar
Bruce Momjian committed
175
* Add UNIQUE capability to non-btree indexes
Bruce Momjian's avatar
Bruce Momjian committed
176
* -Certain indexes will not shrink, i.e. oid indexes with many inserts
Bruce Momjian's avatar
Bruce Momjian committed
177 178 179 180 181
* Restore unused oid's on backend exit if no one else has gotten oids
* Have UPDATE/DELETE clean out indexes
* Allow WHERE restriction on ctid
* Allow cursors to be DECLAREd/OPENed/CLOSEed outside transactions
* Allow PQrequestCancel() to terminate when in waiting-for-lock state
Bruce Momjian's avatar
Bruce Momjian committed
182 183
* -Transaction log, so re-do log can be on a separate disk by
  with after-row images(Vadim) (see TODO.detail/logging)
Bruce Momjian's avatar
Bruce Momjian committed
184 185
* Populate backend status area and write program to dump status data
* Make oid use unsigned int more reliably, pg_atoi()
186
* Allow subqueries in target list
Bruce Momjian's avatar
Bruce Momjian committed
187 188 189
* Put sort files, large objects in their own directory
* Do autocommit so always in a transaction block(?)
* Show location of syntax error in query (see TODO.detail/yacc)
Bruce Momjian's avatar
Bruce Momjian committed
190 191
* Redesign the function call interface to handle NULLs better
	(see TODO.detail/function)
192
* Document/trigger/rule so changes to pg_shadow recreate pg_pwd
Bruce Momjian's avatar
Bruce Momjian committed
193
	(see TODO.detail/pg_shadow)
194
* Missing optimizer selectivities for date, r-tree, etc.
Bruce Momjian's avatar
Bruce Momjian committed
195
	(see TODO.detail/optimizer)
196 197
* Overhaul mdmgr/smgr to fix double unlinking and double opens, cleanup
* Overhaul bufmgr/lockmgr/transaction manager
Bruce Momjian's avatar
Bruce Momjian committed
198
* Add PL/Perl(Mark Hollomon)
199
* Make postgres user have a password by default
Bruce Momjian's avatar
Bruce Momjian committed
200
* Add configure test to check for C++ need for *.h and namespaces
201
* Allow BLCKSZ <= 64k, not <= 32k
Bruce Momjian's avatar
Bruce Momjian committed
202
* redesign UNION structures to have separarate target lists
Bruce Momjian's avatar
Bruce Momjian committed
203
* Allow multi-level query trees for INSERT INTO ... SELECT
Bruce Momjian's avatar
Bruce Momjian committed
204 205 206

PERFORMANCE
-----------
207 208 209

FSYNC

Bruce Momjian's avatar
Bruce Momjian committed
210 211 212
* -Allow transaction commits with rollback with no-fsync performance
	(see TODO.detail/fsync)
* -Prevent fsync in SELECT-only queries
Bruce Momjian's avatar
Bruce Momjian committed
213

214 215
INDEXES

216
* Use indexes in ORDER BY for restrictive data sets, min(), max()
Bruce Momjian's avatar
Bruce Momjian committed
217 218
* Pull requested data directly from indexes, bypassing heap data
* Use index to restrict rows returned by multi-key index when used with
219 220
  non-consecutive keys or OR clauses, so fewer heap accesses
* Convert function(constant) into a constant for index use
Bruce Momjian's avatar
Bruce Momjian committed
221
* Allow LIMIT ability on single-table queries that have no ORDER BY to use
Bruce Momjian's avatar
Bruce Momjian committed
222
  a matching index(see TODO.detail/limit)
Bruce Momjian's avatar
Bruce Momjian committed
223
* Improve LIMIT processing by using index to limit rows processed
Bruce Momjian's avatar
Bruce Momjian committed
224
	(see TODO.detail/limit) 
Bruce Momjian's avatar
Bruce Momjian committed
225
* Have optimizer take LIMIT into account when considering index scans
Bruce Momjian's avatar
Bruce Momjian committed
226
	(see TODO.detail/limit)
Bruce Momjian's avatar
Bruce Momjian committed
227
* Make index creation use psort code, because it is now faster(Vadim)
228
* Allow creation of sort temp tables > 1 Gig
Bruce Momjian's avatar
Bruce Momjian committed
229 230 231
* Create more system table indexes for faster cache lookups
* fix indexscan() so it does leak memory by not requiring caller to free
* Improve _bt_binsrch() to handle equal keys better, remove _bt_firsteq()(Tom)
Bruce Momjian's avatar
Bruce Momjian committed
232
* Allow SELECT * FROM tab WHERE int2col = 4 use int2col index
Bruce Momjian's avatar
Bruce Momjian committed
233
	(see TODO.detail/optimizer)
Bruce Momjian's avatar
Bruce Momjian committed
234
* Allow optimizer to prefer plans that match ORDER BY
Bruce Momjian's avatar
Bruce Momjian committed
235

236 237
CACHE

Bruce Momjian's avatar
Bruce Momjian committed
238
* Cache most recent query plan(s)(see TODO.detail/prepare)
239
* Shared catalog cache, reduce lseek()'s by caching table size in shared area
Bruce Momjian's avatar
Bruce Momjian committed
240 241 242
* elog() flushes cache, try invalidating just entries from current xact,
  perhaps using invalidation cache

Bruce Momjian's avatar
Bruce Momjian committed
243

244 245
MISC

246
* Allow compression of log and meta data
Bruce Momjian's avatar
Bruce Momjian committed
247
* Update pg_statistic table to remove operator column
Bruce Momjian's avatar
Bruce Momjian committed
248 249
* Allow char() not to use variable-sized header to reduce disk size
* Do async I/O to do better read-ahead of data
Bruce Momjian's avatar
Bruce Momjian committed
250
* -Fix memory exhaustion when using many OR's(see TODO.detail/cnfify)
Bruce Momjian's avatar
Bruce Momjian committed
251
* Get faster regex() code from Henry Spencer <henry@zoo.utoronto.ca>
252
  when it is available
Bruce Momjian's avatar
Bruce Momjian committed
253 254 255
* Use mmap() rather than SYSV shared memory(?)
* Process const = const parts of OR clause in separate pass
* Make oid use oidin/oidout not int4in/int4out in pg_type.h
Bruce Momjian's avatar
Bruce Momjian committed
256
* Improve Subplan list handling
Bruce Momjian's avatar
Bruce Momjian committed
257
* Allow Subplans to use efficient joins(hash, merge) with upper variable
Bruce Momjian's avatar
Bruce Momjian committed
258 259 260
* use fmgr_info()/fmgr_faddr() instead of fmgr() calls in high-traffic
  places, like GROUP BY, UNIQUE, index processing, etc.
* improve dynamic memory allocation by introducing tuple-context memory
Bruce Momjian's avatar
Bruce Momjian committed
261
  allocation(see TODO.detail/memory)
Bruce Momjian's avatar
Bruce Momjian committed
262
* fix memory leak in cache code when non-existant table is referenced
263
* In WHERE tab1.x=3 AND tab1.x=tab2.y, add tab2.y=3
Bruce Momjian's avatar
Bruce Momjian committed
264
* pass atttypmod through parser in more cases(see TODO.detail/atttypmod)
265
* remove duplicate type in/out functions for disk and net
Bruce Momjian's avatar
Bruce Momjian committed
266
* change VACUUM ANALYZE to use btree comparison functions, not <,=,> calls
Bruce Momjian's avatar
Bruce Momjian committed
267 268
* Allow persistent backends(see TODO.detail/persistent)
* Misc(see TODO.detail/performance)
269

270 271
SOURCE CODE
-----------
Bruce Momjian's avatar
Bruce Momjian committed
272
* Add use of 'const' for varibles in source tree
273
* Fix C optimizer problem where fmgr_ptr calls return different types
Bruce Momjian's avatar
Bruce Momjian committed
274 275
	(see TODO.detail/alpha)
* -Add needed includes and removed unneeded include files(Bruce)
Bruce Momjian's avatar
Bruce Momjian committed
276
* Make configure --enable-debug add -g on compile line
Bruce Momjian's avatar
Bruce Momjian committed
277
* Does Mariposa source contain any other bug fixes?
Bruce Momjian's avatar
Bruce Momjian committed
278
* Remove SET KSQO option if OR processing is improved
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299

---------------------------------------------------------------------------


Developers who have claimed items are:
--------------------------------------
	* Billy is Billy G. Allie <Bill.Allie@mug.org>
	* Brook is Brook Milligan <brook@trillium.NMSU.Edu>
	* Bruce is Bruce Momjian<maillist@candle.pha.pa.us>
	* Bryan is Bryan Henderson<bryanh@giraffe.netgate.net>
	* D'Arcy is D'Arcy J.M. Cain <darcy@druid.net>
	* David is David Hartwig <daveh@insightdist.com>
	* Edmund is Edmund Mergl <E.Mergl@bawue.de>
	* Goran is Goran Thyni <goran@kyla.kiruna.se>
	* Hiroshi is Hiroshi Inoue<Inoue@tpf.co.jp>
	* Jan is Jan Wieck <wieck@sapserv.debis.de>
 	* Marc is Marc Fournier <scrappy@hub.org>
	* Massimo Dal Zotto <dz@cs.unitn.it>
	* Michael is Michael Meskes <meskes@postgresql.org>
	* Oleg is Oleg Bartunov <oleg@sai.msu.su>
	* Peter is Peter T Mount <peter@retep.org.uk>
Bruce Momjian's avatar
Bruce Momjian committed
300
	* Ryan is Ryan Bradetich <rbrad@hpb50023.boi.hp.com>
301 302 303 304 305 306 307 308
	* Stefan Simkovics <ssimkovi@rainbow.studorg.tuwien.ac.at>
	* Tatsuo is Tatsuo Ishii <t-ishii@sra.co.jp>
	* Tom is Tom Lane <tgl@sss.pgh.pa.us>
	* Thomas is Thomas Lockhart <lockhart@alumni.caltech.edu>
	* TomH is Tom I Helbekkmo <tih@Hamartun.Priv.NO>
	* Vadim is "Vadim B. Mikheev" <vadim@krs.ru>